From 1437b42038bf5daa0ad9e9be41d25f04a8ec97d3 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Mon, 14 Jun 2021 12:45:33 -0700 Subject: [PATCH] fix some example docs site issues (#434) --- .changeset/big-ghosts-prove.md | 5 ++ docs-www/src/components/SiteSidebar.astro | 4 +- docs-www/src/config.ts | 8 +-- docs-www/src/layouts/Main.astro | 6 +- docs-www/src/pages/example.md | 3 +- docs-www/src/pages/getting-started.md | 59 +++++++++++++++++ docs-www/src/pages/guides.md | 0 docs-www/src/pages/index.astro | 64 ------------------- docs-www/src/pages/index.md | 60 +++++++++++++++++ .../docs/src/components/SiteSidebar.astro | 4 +- examples/docs/src/config.ts | 6 +- examples/docs/src/layouts/Main.astro | 1 + examples/docs/src/pages/example.md | 3 +- examples/docs/src/pages/getting-started.md | 9 ++- examples/docs/src/pages/index.astro | 16 ----- examples/docs/src/pages/index.md | 60 +++++++++++++++++ 16 files changed, 206 insertions(+), 102 deletions(-) create mode 100644 .changeset/big-ghosts-prove.md create mode 100644 docs-www/src/pages/getting-started.md delete mode 100644 docs-www/src/pages/guides.md delete mode 100644 docs-www/src/pages/index.astro create mode 100644 docs-www/src/pages/index.md delete mode 100644 examples/docs/src/pages/index.astro create mode 100644 examples/docs/src/pages/index.md diff --git a/.changeset/big-ghosts-prove.md b/.changeset/big-ghosts-prove.md new file mode 100644 index 000000000..201a14917 --- /dev/null +++ b/.changeset/big-ghosts-prove.md @@ -0,0 +1,5 @@ +--- +'@astrojs/docs-template': patch +--- + +Fix issues around sidebar and titles diff --git a/docs-www/src/components/SiteSidebar.astro b/docs-www/src/components/SiteSidebar.astro index 7279d9aea..0fbad0c83 100644 --- a/docs-www/src/components/SiteSidebar.astro +++ b/docs-www/src/components/SiteSidebar.astro @@ -7,10 +7,10 @@ import { sidebar } from '../config.ts'; {sidebar.map(category => (
  • diff --git a/docs-www/src/config.ts b/docs-www/src/config.ts index 113301367..5ec22a02b 100644 --- a/docs-www/src/config.ts +++ b/docs-www/src/config.ts @@ -1,12 +1,10 @@ export const sidebar = [ { text: 'Introduction', + link: '', // No leading slash needed, so this links to the homepage children: [ - { - text: 'What is Astro?', - link: '/', - }, - { text: 'Example', link: '/example' }, + { text: 'Getting Started', link: 'getting-started' }, + { text: 'Example', link: 'example' }, ], }, ]; diff --git a/docs-www/src/layouts/Main.astro b/docs-www/src/layouts/Main.astro index 37efc2f37..77407918a 100644 --- a/docs-www/src/layouts/Main.astro +++ b/docs-www/src/layouts/Main.astro @@ -17,6 +17,9 @@ editHref = `https://github.com/snowpackjs/astro/tree/main/examples/doc/src/pages