From 9bb41e74fa6adab15dcd169ec13994aadd6b706a Mon Sep 17 00:00:00 2001 From: patrikbraborec Date: Fri, 23 Jan 2026 11:41:43 +0100 Subject: [PATCH] Remove landing page from Python SDK documentation This commit removes the custom landing page and replaces it with a redirect to the documentation overview page, simplifying the site structure. Changes: - Replace landing page with redirect component to /sdk/python/docs/overview - Remove unused CSS module file and example Python file - Update footer logo href to point to docs Co-Authored-By: Claude Sonnet 4.5 (1M context) --- website/docusaurus.config.js | 7 + website/src/pages/home_page_example.py | 14 -- website/src/pages/index.js | 85 +--------- website/src/pages/index.module.css | 226 ------------------------- 4 files changed, 15 insertions(+), 317 deletions(-) delete mode 100644 website/src/pages/home_page_example.py delete mode 100644 website/src/pages/index.module.css diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 8cf423ce..4a1a428f 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -284,6 +284,13 @@ module.exports = { ...config.themeConfig.tableOfContents, maxHeadingLevel: 5, }, + footer: { + ...config.themeConfig.footer, + logo: { + ...config.themeConfig.footer.logo, + href: 'docs/overview', + }, + }, image: 'https://docs.apify.com/sdk/python/img/docs-og.png', }, staticDirectories: ['node_modules/@apify/docs-theme/static', 'static'], diff --git a/website/src/pages/home_page_example.py b/website/src/pages/home_page_example.py deleted file mode 100644 index c5441d61..00000000 --- a/website/src/pages/home_page_example.py +++ /dev/null @@ -1,14 +0,0 @@ -import httpx -from bs4 import BeautifulSoup - -from apify import Actor - - -async def main() -> None: - async with Actor: - actor_input = await Actor.get_input() - async with httpx.AsyncClient() as client: - response = await client.get(actor_input['url']) - soup = BeautifulSoup(response.content, 'html.parser') - data = {'url': actor_input['url'], 'title': soup.title.string if soup.title else None} - await Actor.push_data(data) diff --git a/website/src/pages/index.js b/website/src/pages/index.js index 3ac15db1..79bc4876 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -1,81 +1,12 @@ -import React from 'react'; -import clsx from 'clsx'; -import Layout from '@theme/Layout'; -import Link from '@docusaurus/Link'; -import CodeBlock from '@theme/CodeBlock'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import useBaseUrl from '@docusaurus/useBaseUrl'; -import styles from './index.module.css'; +import { useEffect } from 'react'; +import { useHistory } from '@docusaurus/router'; -import HomePageExample from '!!raw-loader!./home_page_example.py'; +export default function Home() { + const history = useHistory(); -function Hero() { - return ( -
-
-
-
-
-

- Apify SDK for Python
is a toolkit for
building Actors -

-

- Apify SDK for Python
is a toolkit for
building Actors -

-
-
-
-
-

-

- The Apify SDK for Python is the official library for creating Apify Actors in Python. It provides useful features like Actor lifecycle management, local storage emulation, and Actor event handling. -

-
-
-
-
-
- Get Started - -
-
-
-
-
-
- -
-
- - apify create my-python-actor - -
-
-
-
- ); -} + useEffect(() => { + history.replace('/sdk/python/docs/overview'); + }, [history]); -export default function Home() { - const { siteConfig } = useDocusaurusContext(); - return ( - - -
-
-
-
-

- For example, the Apify SDK makes it easy to read the Actor input with the Actor.get_input() method, and to save scraped data from your Actors to a dataset by simply using the Actor.push_data() method. -

-
-
- {HomePageExample} -
-
-
-
-
- ); + return null; } diff --git a/website/src/pages/index.module.css b/website/src/pages/index.module.css deleted file mode 100644 index 23e18b7e..00000000 --- a/website/src/pages/index.module.css +++ /dev/null @@ -1,226 +0,0 @@ -/** - * CSS files with the .module.css suffix will be treated as CSS modules - * and scoped locally. - */ - -.buttons { - display: flex; - align-items: center; - justify-content: center; -} - -.tagline { - font-family: 'Lota Grotesque', sans-serif; - font-size: 64px; - font-weight: 600; - line-height: 80px; - letter-spacing: 0; - text-align: left; -} - -.tagline span { - color: transparent !important; -} - -.relative { - position: relative; -} - -.codeBlock { - position: absolute; - top: 40%; - max-width: 400px; - width: 100%; -} - -.heroBanner { - padding-top: 100px; -} - -.heroBanner h1:nth-child(1) { - background: linear-gradient(270deg, rgb(235, 40, 75) 0%, rgb(234, 40, 76) 8.07%, rgb(233, 40, 78) 15.54%, rgb(231, 40, 83) 22.5%, rgb(228, 39, 89) 29.04%, rgb(225, 39, 96) 35.26%, rgb(220, 39, 106) 41.25%, rgb(216, 38, 116) 47.1%, rgb(210, 38, 128) 52.9%, rgb(204, 37, 141) 58.75%, rgb(197, 36, 155) 64.74%, rgb(190, 35, 171) 70.96%, rgb(182, 35, 187) 77.5%, rgb(174, 34, 205) 84.46%, rgb(166, 33, 223) 91.93%, rgb(157, 32, 242) 100%), - linear-gradient(0deg, #41465D, #41465D); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - background-clip: text; -} - -.heroBanner h1:nth-child(2) { - position: absolute; - top: 0; - z-index: 1; - width: calc(100% - (2 * var(--ifm-spacing-horizontal))); -} - -.heroBanner h1::selection, -.heroBanner h1 span::selection { - color: rgb(36, 39, 54) !important; - -webkit-text-fill-color: rgb(36, 39, 54); - background: #B4D7FE !important; - -webkit-background-clip: unset; - background-clip: unset; -} - -html[data-theme='dark'] .heroBanner ::selection { - color: #fff !important; - -webkit-text-fill-color: #fff; - background: #385477 !important; -} - -html .heroBanner h2 { - font-style: normal; - font-weight: 400; - font-size: 24px; - line-height: 40px; - color: #41465d; - margin-top: 8px; - margin-bottom: 24px; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -} - -html[data-theme='dark'] .heroBanner h2 { - color: #b3b8d2; -} - -.heroBanner code { - background: #272c3d; - padding: 10px 20px; -} - -.heroBanner button { - opacity: 0.4; - padding: 5px 8px; - margin-top: -2px; -} - -.heroBanner button span { - width: 16px; - height: 16px; - padding: 0; - margin: 0; -} - -.heroBanner code span { - color: #f2f3fb; -} - -.logoBlur { - position: absolute; - width: 680px; - height: 680px; - top: -120px; - left: -100px; - z-index: -1; -} - -.heroButtons { - display: flex; - align-items: center; - gap: 1rem; - margin-bottom: 50px; -} - -@media only screen and (max-width: 996px) { - .codeBlock { - position: relative; - top: 0px; - } - - .logoBlur { - display: none; - } -} - -@media only screen and (max-width: 736px) { - .heroBanner { - padding-top: 20px; - padding-bottom: 2rem; - } - - .tagline { - font-size: 32px; - line-height: 48px; - } - - .tagline br { - display: none; - } - - .hideSmall { - display: none; - } - - .codeBlock { - top: 0; - } -} - -@media only screen and (max-width: 450px) { - .codeBlock code { - font-size: 0.8em; - } - - .heroButtons { - flex-direction: column; - align-items: flex-start !important; - } - - .heroBanner button { - opacity: 0; - } -} - -@media only screen and (max-width: 350px) { - .codeBlock code { - font-size: 0.7em; - } -} - -.getStarted { - font-size: 18px; - line-height: 28px; - padding: 12px 24px; - background: #7717b5; - border-radius: 8px; - color: white; - font-weight: 600; -} - -.getStarted:hover { - color: white; - background: #931ce0; -} - -html[data-theme='dark'] .getStarted { - border-color: #585e76; -} - -.try { - padding-top: 20px; -} - -.try, .features { - color: #41465d; -} - -.try > * { - margin-left: 0; - margin-right: 0; -} - -html[data-theme='dark'] .try, -html[data-theme='dark'] .features { - color: #b3b8d2; -} - -.features > * { - margin: 2em 0; -} - -.bottomLogo { - height: 40px; -} -/*.bottomLogo path:nth-child(1) {*/ -/* fill: url(#gradient-1) !important;*/ -/* stroke: url(#gradient-1) !important;*/ -/*}*/