From bf77594b7dd663d3a4a9253a4dfcd5b8468b5c0a Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Wed, 25 Nov 2020 18:25:23 +0900 Subject: [PATCH] docs: adjust the content a bit --- docs/.vitepress/config.js | 2 +- docs/guide/frontmatter.md | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index e0ab0c17..39efd4cf 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -37,8 +37,8 @@ function getGuideSidebar() { { text: 'Getting Started', link: '/guide/getting-started' }, { text: 'Configuration', link: '/guide/configuration' }, { text: 'Markdown Extensions', link: '/guide/markdown' }, - { text: 'Customization', link: '/guide/customization' }, { text: 'Frontmatter', link: '/guide/frontmatter' }, + { text: 'Customization', link: '/guide/customization' }, { text: 'Deploying', link: '/guide/deploy' } ] } diff --git a/docs/guide/frontmatter.md b/docs/guide/frontmatter.md index ce360b74..3c6fb5d3 100644 --- a/docs/guide/frontmatter.md +++ b/docs/guide/frontmatter.md @@ -2,7 +2,7 @@ Any Markdown file that contains a YAML frontmatter block will be processed by [gray-matter](https://github.com/jonschlinkert/gray-matter). The frontmatter must be at the top of the Markdown file, and must take the form of valid YAML set between triple-dashed lines. Example: -```markdown +```md --- title: Docs with VitePress editLink: true @@ -13,7 +13,7 @@ Between the triple-dashed lines, you can set [predefined variables](#predefined- Here’s an example of how you could use it in your Markdown file: -```markdown +```md --- title: Docs with VitePress editLink: true @@ -26,13 +26,13 @@ Guide content ## Alternative frontmatter Formats -VuePress also supports JSON frontmatter syntax, starting and ending in curly braces: +VitePress also supports JSON frontmatter syntax, starting and ending in curly braces: -``` +```json --- { "title": "Blogging Like a Hacker", - "editLink": "true" + "editLink": true } --- ``` @@ -63,11 +63,8 @@ head: - name: keywords content: super duper SEO --- - ``` -## Predefined Variables Powered By Default Theme - ### navbar - Type: `boolean` @@ -85,6 +82,6 @@ You can decide to show the sidebar on a specific page with `sidebar: auto` or di ### editLink - Type: `boolean` -- Default: `siteData.editLinks` +- Default: `undefined` Define if this page should include an edit link.