-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gregory <tajemniktv@outlook.com>
- Loading branch information
1 parent
fa8f379
commit 99ac8ff
Showing
13 changed files
with
141 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"astro-build.astro-vscode" | ||
"astro-build.astro-vscode", | ||
"stripe.markdoc-language-support" | ||
], | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,29 @@ | ||
// @ts-check | ||
import {defineConfig} from 'astro/config'; | ||
import starlight from '@astrojs/starlight'; | ||
import markdoc from '@astrojs/markdoc'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({}); | ||
export default defineConfig({ | ||
integrations: [ | ||
markdoc(), | ||
starlight({ | ||
title: 'My Docs', | ||
social: { | ||
github: 'https://github.com/withastro/starlight', | ||
}, | ||
sidebar: [ | ||
{ | ||
label: 'Guides', | ||
items: [ | ||
// Each item here is one entry in the navigation menu. | ||
{label: 'Example Guide', slug: 'guides/example'}, | ||
], | ||
}, | ||
{ | ||
label: 'Reference', | ||
autogenerate: {directory: 'reference'}, | ||
}, | ||
], | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {defineMarkdocConfig} from '@astrojs/markdoc/config'; | ||
import starlightMarkdoc from '@astrojs/starlight-markdoc'; | ||
|
||
// https://docs.astro.build/en/guides/integrations-guide/markdoc/ | ||
export default defineMarkdocConfig({ | ||
extends: [starlightMarkdoc()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
{ | ||
"name": "starlight", | ||
"name": "@example/starlight-markdoc", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "astro dev", | ||
"start": "astro dev", | ||
"build": "astro check && astro build", | ||
"build": "astro build", | ||
"preview": "astro preview", | ||
"astro": "astro" | ||
}, | ||
"dependencies": { | ||
"@astrojs/markdoc": "^0.11.4", | ||
"@astrojs/starlight": "^0.29.0", | ||
"@astrojs/starlight-markdoc": "^0.1.0", | ||
"astro": "^4.16.10", | ||
"@astrojs/check": "^0.9.4", | ||
"typescript": "^5.6.3" | ||
"sharp": "^0.32.5" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {defineCollection} from 'astro:content'; | ||
import {docsSchema} from '@astrojs/starlight/schema'; | ||
|
||
export const collections = { | ||
docs: defineCollection({schema: docsSchema()}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Example Guide | ||
description: A guide in my new Starlight docs site. | ||
--- | ||
|
||
Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. | ||
Writing a good guide requires thinking about what your users are trying to do. | ||
|
||
## Further reading | ||
|
||
- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: Welcome to Starlight | ||
description: Get started building your docs site with Starlight. | ||
template: splash | ||
hero: | ||
title: Welcome to Starlight with Markdoc | ||
tagline: Congrats on setting up a new Starlight project! | ||
image: | ||
file: ../../assets/houston.webp | ||
actions: | ||
- text: Example Guide | ||
link: /guides/example/ | ||
icon: right-arrow | ||
- text: Read the Starlight docs | ||
link: https://starlight.astro.build | ||
icon: external | ||
variant: minimal | ||
--- | ||
|
||
## Next steps | ||
|
||
{% cardgrid stagger=true %} | ||
{% card title="Update content" icon="pencil" %} | ||
Edit `src/content/docs/index.mdoc` to see this page change. | ||
{% /card %} | ||
{% card title="Add new content" icon="add-document" %} | ||
Add Markdoc files to `src/content/docs` to create new pages. | ||
{% /card %} | ||
{% card title="Configure your site" icon="setting" %} | ||
Edit your `sidebar` and other config in `astro.config.mjs`. | ||
{% /card %} | ||
{% card title="Read the docs" icon="open-book" %} | ||
Learn more in [the Starlight Docs](https://starlight.astro.build/). | ||
{% /card %} | ||
{% /cardgrid %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Example Reference | ||
description: A reference page in my new Starlight docs site. | ||
--- | ||
|
||
Reference pages are ideal for outlining how things work in terse and clear terms. | ||
Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what you're documenting. | ||
|
||
## Further reading | ||
|
||
- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/// <reference path="../.astro/types.d.ts" /> | ||
/// <reference path="../.astro/types.d.ts" /> |