From 767391a2e6063a40e80b7a523d6b9a8d99bd66dd Mon Sep 17 00:00:00 2001 From: AI Christianson Date: Fri, 14 Feb 2025 13:12:59 -0500 Subject: [PATCH] simplify docs --- docs/docs/intro.md | 1 + docs/docusaurus.config.ts | 67 +-------------------------------- docs/src/pages/index.module.css | 23 ----------- docs/src/pages/index.tsx | 44 ---------------------- docs/src/pages/markdown-page.md | 7 ---- 5 files changed, 3 insertions(+), 139 deletions(-) delete mode 100644 docs/src/pages/index.module.css delete mode 100644 docs/src/pages/index.tsx delete mode 100644 docs/src/pages/markdown-page.md diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 45e8604..984aa11 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -1,5 +1,6 @@ --- sidebar_position: 1 +slug: / --- # Tutorial Intro diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 0c14a86..e2359b3 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -2,30 +2,15 @@ import {themes as prismThemes} from 'prism-react-renderer'; import type {Config} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; -// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) - const config: Config = { title: 'My Site', - tagline: 'Dinosaurs are cool', favicon: 'img/favicon.ico', - - // Set the production url of your site here url: 'https://your-docusaurus-site.example.com', - // Set the // pathname under which your site is served - // For GitHub pages deployment, it is often '//' baseUrl: '/', - - // GitHub pages deployment config. - // If you aren't using GitHub pages, you don't need these. - organizationName: 'facebook', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. - + onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', - // Even if you don't use internationalization, you can use this field to set - // useful metadata like html lang. For example, if your site is Chinese, you - // may want to replace "en" with "zh-Hans". i18n: { defaultLocale: 'en', locales: ['en'], @@ -37,10 +22,7 @@ const config: Config = { { docs: { sidebarPath: './sidebars.ts', - // Please change this to your repo. - // Remove this to remove the "edit this page" links. - editUrl: - 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', + routeBasePath: '/', // Serve docs at the site root }, theme: { customCss: './src/css/custom.css', @@ -50,8 +32,6 @@ const config: Config = { ], themeConfig: { - // Replace with your project's social card - image: 'img/docusaurus-social-card.jpg', navbar: { title: 'My Site', logo: { @@ -59,12 +39,6 @@ const config: Config = { src: 'img/logo.svg', }, items: [ - { - type: 'docSidebar', - sidebarId: 'tutorialSidebar', - position: 'left', - label: 'Tutorial', - }, { href: 'https://github.com/facebook/docusaurus', label: 'GitHub', @@ -74,43 +48,6 @@ const config: Config = { }, footer: { style: 'dark', - links: [ - { - title: 'Docs', - items: [ - { - label: 'Tutorial', - to: '/docs/intro', - }, - ], - }, - { - title: 'Community', - items: [ - { - label: 'Stack Overflow', - href: 'https://stackoverflow.com/questions/tagged/docusaurus', - }, - { - label: 'Discord', - href: 'https://discordapp.com/invite/docusaurus', - }, - { - label: 'X', - href: 'https://x.com/docusaurus', - }, - ], - }, - { - title: 'More', - items: [ - { - label: 'GitHub', - href: 'https://github.com/facebook/docusaurus', - }, - ], - }, - ], copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, }, prism: { diff --git a/docs/src/pages/index.module.css b/docs/src/pages/index.module.css deleted file mode 100644 index 9f71a5d..0000000 --- a/docs/src/pages/index.module.css +++ /dev/null @@ -1,23 +0,0 @@ -/** - * CSS files with the .module.css suffix will be treated as CSS modules - * and scoped locally. - */ - -.heroBanner { - padding: 4rem 0; - text-align: center; - position: relative; - overflow: hidden; -} - -@media screen and (max-width: 996px) { - .heroBanner { - padding: 2rem; - } -} - -.buttons { - display: flex; - align-items: center; - justify-content: center; -} diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx deleted file mode 100644 index 2e006d1..0000000 --- a/docs/src/pages/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import type {ReactNode} from 'react'; -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; -import Heading from '@theme/Heading'; - -import styles from './index.module.css'; - -function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); - return ( -
-
- - {siteConfig.title} - -

{siteConfig.tagline}

-
- - Docusaurus Tutorial - 5min ⏱️ - -
-
-
- ); -} - -export default function Home(): ReactNode { - const {siteConfig} = useDocusaurusContext(); - return ( - - -
- -
-
- ); -} diff --git a/docs/src/pages/markdown-page.md b/docs/src/pages/markdown-page.md deleted file mode 100644 index 9756c5b..0000000 --- a/docs/src/pages/markdown-page.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Markdown page example ---- - -# Markdown page example - -You don't need React to write simple standalone pages.