Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: update docs links in init template
  • Loading branch information
yyx990803 committed Mar 7, 2023
1 parent fe07329 commit 97de635
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions 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' }
Expand Down
2 changes: 1 addition & 1 deletion template/.vitepress/theme/Layout.vue
@@ -1,7 +1,7 @@
<script setup<%= useTs ? ' lang="ts"' : '' %>>
import { useData } from 'vitepress'
// https://vitepress.vuejs.org/api/
// https://vitepress.vuejs.org/reference/runtime-api#usedata
const { site, frontmatter } = useData()
</script>

Expand Down
7 changes: 4 additions & 3 deletions 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'
Expand All @@ -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
// ...
}
}<% } %>
2 changes: 1 addition & 1 deletion template/api-examples.md
Expand Up @@ -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).
1 change: 1 addition & 0 deletions template/index.md
@@ -1,4 +1,5 @@
<% if (defaultTheme) { %>---
# https://vitepress.vuejs.org/reference/default-theme-home-page
layout: home

hero:
Expand Down

0 comments on commit 97de635

Please sign in to comment.