use consistent config for config template

pull/2044/head
Evan You 1 year ago
parent 2af6731524
commit b96566c950

@ -1,11 +1,7 @@
<% if (useTs) { %>import { defineConfig } from 'vitepress'
import { defineConfig } from 'vitepress'
// https://vitepress.vuejs.org/config/app-config
export default defineConfig(<% } else { %>/**
* @type {import('vitepress').UserConfig}
* https://vitepress.vuejs.org/config/app-config
*/
const config = <% } %>{
export default defineConfig({
title: <%= title %>,
description: <%= description %><% if (defaultTheme) { %>,
themeConfig: {
@ -29,6 +25,4 @@ const config = <% } %>{
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
]
}<% } %>
}<% if (useTs) { %>)<% } else { %>
export default config<% } %>
})

@ -1,28 +0,0 @@
import { defineConfig } from 'vitepress'
// https://vitepress.vuejs.org/config/app-config
export default defineConfig({
title: <%= title %>,
description: <%= description %><% if (defaultTheme) { %>,
themeConfig: {
// https://vitepress.vuejs.org/config/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
],
sidebar: [
{
text: 'Examples',
items: [
{ text: 'Markdown Examples', link: '/markdown-examples' },
{ text: 'Runtime API Examples', link: '/api-examples' }
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
]
}<% } %>
})
Loading…
Cancel
Save