simplify docs

This commit is contained in:
AI Christianson 2025-02-14 13:12:59 -05:00
parent 23a7d5c739
commit 767391a2e6
5 changed files with 3 additions and 139 deletions

View File

@ -1,5 +1,6 @@
--- ---
sidebar_position: 1 sidebar_position: 1
slug: /
--- ---
# Tutorial Intro # Tutorial Intro

View File

@ -2,30 +2,15 @@ import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types'; import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic'; 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 = { const config: Config = {
title: 'My Site', title: 'My Site',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico', favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com', url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/', 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', onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn', 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: { i18n: {
defaultLocale: 'en', defaultLocale: 'en',
locales: ['en'], locales: ['en'],
@ -37,10 +22,7 @@ const config: Config = {
{ {
docs: { docs: {
sidebarPath: './sidebars.ts', sidebarPath: './sidebars.ts',
// Please change this to your repo. routeBasePath: '/', // Serve docs at the site root
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
}, },
theme: { theme: {
customCss: './src/css/custom.css', customCss: './src/css/custom.css',
@ -50,8 +32,6 @@ const config: Config = {
], ],
themeConfig: { themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: { navbar: {
title: 'My Site', title: 'My Site',
logo: { logo: {
@ -59,12 +39,6 @@ const config: Config = {
src: 'img/logo.svg', src: 'img/logo.svg',
}, },
items: [ items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{ {
href: 'https://github.com/facebook/docusaurus', href: 'https://github.com/facebook/docusaurus',
label: 'GitHub', label: 'GitHub',
@ -74,43 +48,6 @@ const config: Config = {
}, },
footer: { footer: {
style: 'dark', 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.`, copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
}, },
prism: { prism: {

View File

@ -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;
}

View File

@ -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 (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min
</Link>
</div>
</div>
</header>
);
}
export default function Home(): ReactNode {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}

View File

@ -1,7 +0,0 @@
---
title: Markdown page example
---
# Markdown page example
You don't need React to write simple standalone pages.