From 97de63562f986b4945d04112e9736f5532fcaf71 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 7 Mar 2023 21:52:24 +0800 Subject: [PATCH] chore: update docs links in init template --- template/.vitepress/config.js | 4 ++-- template/.vitepress/theme/Layout.vue | 2 +- template/.vitepress/theme/index.js | 7 ++++--- template/api-examples.md | 2 +- template/index.md | 1 + 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/template/.vitepress/config.js b/template/.vitepress/config.js index 1f00cccb54b..7c927cf52c2 100644 --- a/template/.vitepress/config.js +++ b/template/.vitepress/config.js @@ -1,11 +1,11 @@ import { defineConfig } from 'vitepress' -// https://vitepress.vuejs.org/config/app-config +// https://vitepress.vuejs.org/reference/site-config export default defineConfig({ title: <%= title %>, description: <%= description %><% if (defaultTheme) { %>, themeConfig: { - // https://vitepress.vuejs.org/config/default-theme-config + // https://vitepress.vuejs.org/reference/default-theme-config nav: [ { text: 'Home', link: '/' }, { text: 'Examples', link: '/markdown-examples' } diff --git a/template/.vitepress/theme/Layout.vue b/template/.vitepress/theme/Layout.vue index f45d7c622ef..637d031ca9e 100644 --- a/template/.vitepress/theme/Layout.vue +++ b/template/.vitepress/theme/Layout.vue @@ -1,7 +1,7 @@ diff --git a/template/.vitepress/theme/index.js b/template/.vitepress/theme/index.js index 3abed00cbef..65fc7bfc2e1 100644 --- a/template/.vitepress/theme/index.js +++ b/template/.vitepress/theme/index.js @@ -1,10 +1,11 @@ +// https://vitepress.vuejs.org/guide/custom-theme <% if (!defaultTheme) { %>import Layout from './Layout.vue' import './style.css' export default { Layout, enhanceApp({ app, router, siteData }) { - // TODO link to app level customizatin + // ... } } <% } else { %>import { h } from 'vue' @@ -15,10 +16,10 @@ export default { ...Theme, Layout: () => { return h(Theme.Layout, null, { - // TODO link to layout slots + // https://vitepress.vuejs.org/guide/extending-default-theme#layout-slots }) }, enhanceApp({ app, router, siteData }) { - // TODO link to app level customizatin + // ... } }<% } %> diff --git a/template/api-examples.md b/template/api-examples.md index 07460c713b1..0f6ab5866df 100644 --- a/template/api-examples.md +++ b/template/api-examples.md @@ -52,4 +52,4 @@ const { site, theme, page, frontmatter } = useData() ## More -Check out the documentation for the [full list of runtime APIs](https://vitepress.vuejs.org/api/). +Check out the documentation for the [full list of runtime APIs](https://vitepress.vuejs.org/reference/runtime-api#usedata). diff --git a/template/index.md b/template/index.md index be2cd658cff..5698e08b662 100644 --- a/template/index.md +++ b/template/index.md @@ -1,4 +1,5 @@ <% if (defaultTheme) { %>--- +# https://vitepress.vuejs.org/reference/default-theme-home-page layout: home hero: