diff --git a/docs/docs-beta/README.md b/docs/docs-beta/README.md index 2444e7e254f2b..d12c9cf4d2a91 100644 --- a/docs/docs-beta/README.md +++ b/docs/docs-beta/README.md @@ -116,4 +116,4 @@ To build the site for production: yarn build ``` -This command generates static content into the `build` directory and can be served using any static contents hosting service. +This command generates static content into the `build` directory and can be served using any static contents hosting service. This also checks for any broken links in the documentation. diff --git a/docs/docs-beta/docs/intro.md b/docs/docs-beta/docs/intro.md index e6da64a8bc7df..ef751823e62da 100644 --- a/docs/docs-beta/docs/intro.md +++ b/docs/docs-beta/docs/intro.md @@ -11,13 +11,12 @@ import { Card, CardGroup } from '@site/src/components/Cards'; Dagster is a data orchestrator built for data engineers, with integrated lineage, observability, a declarative programming model and best-in-class testability. - ## Get started - + Build your first Dagster pipeline in our Quickstart tutorial. @@ -40,4 +39,4 @@ Dagster is a data orchestrator built for data engineers, with integrated lineage Watch our latest videos on YouTube. - \ No newline at end of file + diff --git a/docs/docs-beta/src/components/Cards.tsx b/docs/docs-beta/src/components/Cards.tsx index 9372ae538fe27..c0f9d28cbfdd9 100644 --- a/docs/docs-beta/src/components/Cards.tsx +++ b/docs/docs-beta/src/components/Cards.tsx @@ -8,7 +8,7 @@ interface CardProps { children: React.ReactNode; } -const Card: React.FC = ({ title, icon, href, children }) => ( +const Card: React.FC = ({title, icon, href, children}) => (

{title}

@@ -21,10 +21,8 @@ interface CardGroupProps { children: React.ReactNode; } -const CardGroup: React.FC = ({ cols, children }) => ( -
- {children} -
+const CardGroup: React.FC = ({cols, children}) => ( +
{children}
); -export { Card, CardGroup }; \ No newline at end of file +export {Card, CardGroup}; diff --git a/docs/docs-beta/src/components/CodeExample.tsx b/docs/docs-beta/src/components/CodeExample.tsx index 73755fb9aeecc..05a2577d8fa30 100644 --- a/docs/docs-beta/src/components/CodeExample.tsx +++ b/docs/docs-beta/src/components/CodeExample.tsx @@ -2,47 +2,47 @@ import React from 'react'; import CodeBlock from '@theme/CodeBlock'; interface CodeExampleProps { - filePath: string; - language?: string; - title?: string; + filePath: string; + language?: string; + title?: string; } -const CodeExample: React.FC = ({ filePath, language, title }) => { - const [content, setContent] = React.useState(''); - const [error, setError] = React.useState(null); +const CodeExample: React.FC = ({filePath, language, title}) => { + const [content, setContent] = React.useState(''); + const [error, setError] = React.useState(null); - language = language || 'python'; + language = language || 'python'; - React.useEffect(() => { - // Adjust the import path to start from the docs directory - import(`!!raw-loader!/../../examples/docs_beta_snippets/docs_beta_snippets/${filePath}`) - .then((module) => { - const lines = module.default.split('\n').map((line) => { - return line.replaceAll(/#.*?noqa.*?$/g, ''); - }); - const mainIndex = lines.findIndex((line) => line.trim().startsWith('if __name__ == ')); - const strippedContent = - mainIndex !== -1 ? lines.slice(0, mainIndex).join('\n') : lines.join('\n'); - setContent(strippedContent); - setError(null); - }) - .catch((error) => { - console.error(`Error loading file: ${filePath}`, error); - setError( - `Failed to load file: ${filePath}. Please check if the file exists and the path is correct.`, - ); - }); - }, [filePath]); + React.useEffect(() => { + // Adjust the import path to start from the docs directory + import(`!!raw-loader!/../../examples/docs_beta_snippets/docs_beta_snippets/${filePath}`) + .then((module) => { + const lines = module.default.split('\n').map((line) => { + return line.replaceAll(/#.*?noqa.*?$/g, ''); + }); + const mainIndex = lines.findIndex((line) => line.trim().startsWith('if __name__ == ')); + const strippedContent = + mainIndex !== -1 ? lines.slice(0, mainIndex).join('\n') : lines.join('\n'); + setContent(strippedContent); + setError(null); + }) + .catch((error) => { + console.error(`Error loading file: ${filePath}`, error); + setError( + `Failed to load file: ${filePath}. Please check if the file exists and the path is correct.`, + ); + }); + }, [filePath]); - if (error) { - return
{error}
; - } + if (error) { + return
{error}
; + } - return ( - - {content || 'Loading...'} - - ); + return ( + + {content || 'Loading...'} + + ); }; export default CodeExample;