Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
reednel committed Jan 9, 2024
1 parent b1e0c40 commit fd2ee65
Show file tree
Hide file tree
Showing 16 changed files with 356 additions and 65 deletions.
123 changes: 74 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Pages is licensed under the [MIT License](LICENSE).

## Acknowledgments

This website is derived from zeon-studio's [astroplate](https://github.com/zeon-studio/astroplate).
This template is derived from zeon-studio's [astroplate](https://github.com/zeon-studio/astroplate), with structure borrowed from jordienr's [astro-design-system](https://github.com/jordienr/astro-design-system) and TheOtterlord's [manual](https://github.com/TheOtterlord/manual).
3 changes: 2 additions & 1 deletion src/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"default_theme": "system",
"pagination": 4,
"summary_length": 200,
"blog_folder": "blog"
"blog_folder": "blog",
"docs_folder": "docs"
},

"metadata": {
Expand Down
11 changes: 11 additions & 0 deletions src/config/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const SIDEBAR = [
{ text: "Get Started", header: true },
{ text: "Installation", link: "/docs/get-started/installation" },
{ text: "Introduction", link: "/docs/get-started/introduction" },

{ text: "Guides", header: true },
{ text: "Migrate from Z", link: "docs/guides/intrmigrate-from-z" },

{ text: "Tutorials", header: true },
{ text: "Build X", link: "docs/tutorials/build-x" },
];
12 changes: 12 additions & 0 deletions src/config/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Get Started": [
"/docs/get-started/introduction/",
"/docs/get-started/installation/"
],
"Tutorials": [
"/docs/tutorials/build-x/"
],
"Guides": [
"/docs/guides/migrate-from-z/"
]
}
4 changes: 4 additions & 0 deletions src/config/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"name": "About",
"url": "/about"
},
{
"name": "Docs",
"url": "/docs"
},
{
"name": "Pages",
"url": "",
Expand Down
38 changes: 24 additions & 14 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
import { defineCollection, z } from "astro:content";

// Post collection schema
// Author collection schema
const authorsCollection = defineCollection({
schema: z.object({
title: z.string(),
meta_title: z.string().optional(),
email: z.string().optional(),
image: z.string().optional(),
description: z.string().optional(),
social: z.array(
z.object({
name: z.string().optional(),
icon: z.string().optional(),
link: z.string().optional(),
}).optional(),
).optional(),
draft: z.boolean().optional(),
}),
});

// Blog collection schema
const blogCollection = defineCollection({
schema: z.object({
title: z.string(),
Expand All @@ -15,21 +34,11 @@ const blogCollection = defineCollection({
}),
});

// Author collection schema
const authorsCollection = defineCollection({
// Docs collection schema
const docsCollection = defineCollection({
schema: z.object({
title: z.string(),
meta_title: z.string().optional(),
email: z.string().optional(),
image: z.string().optional(),
description: z.string().optional(),
social: z.array(
z.object({
name: z.string().optional(),
icon: z.string().optional(),
link: z.string().optional(),
}).optional(),
).optional(),
draft: z.boolean().optional(),
}),
});
Expand All @@ -47,7 +56,8 @@ const pagesCollection = defineCollection({

// Export collections
export const collections = {
blog: blogCollection,
authors: authorsCollection,
blog: blogCollection,
docs: docsCollection,
pages: pagesCollection,
};
7 changes: 7 additions & 0 deletions src/content/docs/get-started/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Installation
---

## A header

hello there
Loading

0 comments on commit fd2ee65

Please sign in to comment.