summaryrefslogtreecommitdiff
path: root/examples/docs/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/docs/src')
-rw-r--r--examples/docs/src/components/SiteSidebar.astro2
-rw-r--r--examples/docs/src/config.ts5
-rw-r--r--examples/docs/src/layouts/Main.astro3
-rw-r--r--examples/docs/src/pages/getting-started.md60
-rw-r--r--examples/docs/src/pages/index.astro2
5 files changed, 69 insertions, 3 deletions
diff --git a/examples/docs/src/components/SiteSidebar.astro b/examples/docs/src/components/SiteSidebar.astro
index 7279d9aea..30b14621c 100644
--- a/examples/docs/src/components/SiteSidebar.astro
+++ b/examples/docs/src/components/SiteSidebar.astro
@@ -7,7 +7,7 @@ import { sidebar } from '../config.ts';
{sidebar.map(category => (
<li>
<div class="nav-group">
- <h4 class="nav-group-title">{category.text}</h4>
+ <h4 class="nav-group-title"><a href={category.link}>{category.text}</a></h4>
<ul>
{category.children.map(child => (
<li class="nav-link"><a href={child.link}>{child.text}</a></li>
diff --git a/examples/docs/src/config.ts b/examples/docs/src/config.ts
index 6b6ce3fdc..96edecaf3 100644
--- a/examples/docs/src/config.ts
+++ b/examples/docs/src/config.ts
@@ -1,8 +1,9 @@
export const sidebar = [
{
- text: 'Introduction',
+ text: 'Introduction',
+ link: '/',
children: [
- { text: 'Welcome', link: '/' },
+ { text: 'Getting Started', link: '/getting-started' },
{ text: 'Example', link: '/example' },
],
},
diff --git a/examples/docs/src/layouts/Main.astro b/examples/docs/src/layouts/Main.astro
index b741098ef..e6f30faca 100644
--- a/examples/docs/src/layouts/Main.astro
+++ b/examples/docs/src/layouts/Main.astro
@@ -17,6 +17,9 @@ editHref = `https://github.com/snowpackjs/astro/tree/main/examples/doc/src/pages
<link rel="stylesheet" href="/index.css" />
<script src="/theme.js" />
+ <link rel="icon"
+ type="image/svg+xml"
+ href="/favicon.svg">
<style>
body {
diff --git a/examples/docs/src/pages/getting-started.md b/examples/docs/src/pages/getting-started.md
new file mode 100644
index 000000000..e569ca790
--- /dev/null
+++ b/examples/docs/src/pages/getting-started.md
@@ -0,0 +1,60 @@
+---
+layout: ../layouts/Main.astro
+---
+
+# Getting Started
+
+This template already provides your pages with a side bar navigation (on the left) for your pages, and a content navigation (on the right) for your sections.
+
+## Page navigation
+
+The page navigation, through the side bar on the left, needs to be manually updated. Open the `config.ts` file and you will find the following structure:
+
+```ts
+export const sidebar = [
+ {
+ text: 'Introduction',
+ link: '/',
+ children: [
+ { text: 'Getting Started', link: '/getting-started' },
+ { text: 'Example', link: '/example' },
+ ],
+ },
+];
+```
+You can change this file to match the pages you want to display, the items within `children` can also have children elements, but only the first level and second levels will be displayed.
+
+The page navigation is generated in the `src/components/SiteSidebar.astro`, so if you want to change the depth of elements displayed, styles, etc, that's the place to go.
+
+## Section navigation
+
+The section navigation, through the side bar on the right, is automatically generated by the `src/components/DocSidebar.tsx` file, it uses the meta-data from markdown files to generate the structure you see.
+
+By default only elements from depth 2 to 5 will be displayed, and at the moment doesn't work for `.astro files`.
+
+
+## Other Components
+
+### Footer
+
+You can edit your footer here `src/components/ArticleFooter.astro`, at the moment it is composed of a list of avatars. You can generate your own avatar [here](https://getavataaars.com/) and replace the ones from `AvatarList.astro`.
+
+### Theme
+
+The `src/components/ThemeToggle.tsx` is only responsible for applying the theme, to change the theme colors see `public/theme.css`
+
+## Documentation
+
+For more information on how to use Astro components, check the documentation pages:
+
+- [General Instructions](https://github.com/snowpackjs/astro#readme)
+- [astro.config.mjs](https://github.com/snowpackjs/astro/blob/main/docs/config.md)
+- [API](https://github.com/snowpackjs/astro/blob/main/docs/api.md)
+- [Command Line Interface](https://github.com/snowpackjs/astro/blob/main/docs/cli.md)
+- [Collections](https://github.com/snowpackjs/astro/blob/main/docs/collections.md)
+- [Development Server](https://github.com/snowpackjs/astro/blob/main/docs/dev.md)
+- [Markdown](https://github.com/snowpackjs/astro/blob/main/docs/markdown.md)
+- [Publishing Astro components](https://github.com/snowpackjs/astro/blob/main/docs/publishing.md)
+- [Renderers](https://github.com/snowpackjs/astro/blob/main/docs/renderers.md)
+- [Styling](https://github.com/snowpackjs/astro/blob/main/docs/styling.md)
+- [.astro Syntax](https://github.com/snowpackjs/astro/blob/main/docs/syntax.md)
diff --git a/examples/docs/src/pages/index.astro b/examples/docs/src/pages/index.astro
index 75ca0da4f..6cba4c7fe 100644
--- a/examples/docs/src/pages/index.astro
+++ b/examples/docs/src/pages/index.astro
@@ -10,5 +10,7 @@ import Layout from '../layouts/Main.astro';
This is a starter template, have fun building your next documentation site with [Astro](https://astro.build).
It offers the right mix of simple-to-use [Markdown pages](/example) and rich, interactive components embedded in `.astro` files using `<Markdown>`.
+
+ The docs template has some nice components, for more information click [here](/getting-started).
</Markdown>
</Layout>
lt='Gravatar' /> Sarah Rainsberger 3-0/+104 2023-08-21fix(assets): Add missing type for imageConfig export (#8171)Gravatar Erika 2-1/+7 2023-08-21Deprecate simple objects from endpoints (#8132)Gravatar Bjorn Lu 20-201/+243 2023-08-18[docs] update scopedStyleStragegy default and description (#8148)Gravatar Sarah Rainsberger 1-2/+2 2023-08-18[ci] release (#8145)astro@2.10.12@astrojs/react@2.3.2@astrojs/node@5.3.5Gravatar Houston (Bot) 46-92/+98 2023-08-18Fix missing package file regression (#8149)Gravatar Matthew Phillips 2-1/+7 2023-08-18fix(node): delegate preview's not found and error handling to core/app (#8141)Gravatar Arsh 2-9/+6 2023-08-18Replace `class:list` implementation with `clsx` (#8142)Gravatar Nate Moore 12-68/+133 2023-08-18[ci] formatGravatar matthewp 1-1/+4 2023-08-18fix(data collections): normalize file paths for DataEntry.id (#8144)Gravatar Arsh 2-1/+6 2023-08-18[ci] release (beta) (#8140)astro@3.0.0-beta.4Gravatar Houston (Bot) 41-65/+72 2023-08-18[error messages] Update image errors-data.ts (#8126)Gravatar Sarah Rainsberger 1-12/+12 2023-08-18fix(polyfills): Use object shape for Stackblitz polyfill listGravatar Princesseuh 1-2/+2 2023-08-18fix: polyfill File using undici instead of node:buffer (#8139)Gravatar Erika 2-8/+9 2023-08-18[ci] release (beta) (#8073)create-astro@4.0.0-beta.1astro@3.0.0-beta.3@astrojs/vercel@4.0.0-beta.3@astrojs/telemetry@3.0.0-beta.2@astrojs/svelte@4.0.0-beta.1@astrojs/solid-js@3.0.0-beta.2@astrojs/react@3.0.0-beta.3@astrojs/mdx@1.0.0-beta.1@astrojs/cloudflare@7.0.0-beta.2Gravatar Houston (Bot) 63-117/+389 2023-08-18[ci] release (#8138)astro@2.10.11@astrojs/react@2.3.1Gravatar Houston (Bot) 44-80/+82 2023-08-18[ci] formatGravatar natemoo-re 1-1/+1 2023-08-18Fix 404 response leading to an infinite loop when there is no 404 page (#8136)Gravatar André Alves 2-1/+10 2023-08-18fix(react): add missing export (#8137)Gravatar Nate Moore 2-1/+7 2023-08-18[ci] release (#8096)create-astro@3.2.2astro@2.10.10@astrojs/vercel@3.8.2@astrojs/svelte@3.1.1@astrojs/solid-js@2.2.1@astrojs/react@2.3.0Gravatar Houston (Bot) 63-197/+186 2023-08-18changeset(next): inlineStylesheets default switch is major (#8133)Gravatar Arsh 1-1/+1 2023-08-18feat: add polyfills for stackblitz (#8130)Gravatar Erika 7-6/+86