feat(cli): optimize template (#765)

This commit is contained in:
pengzhanbo 2025-12-01 11:30:06 +08:00 committed by GitHub
parent bba98984d6
commit c97a5af473
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 68 deletions

View File

@ -56,13 +56,13 @@ export default defineUserConfig({
/**
* 编译缓存,加快编译速度
* @see https://theme-plume.vuejs.press/config/basic/#cache
* @see https://theme-plume.vuejs.press/config/theme/#cache
*/
cache: 'filesystem',
/**
* 为 markdown 文件自动添加 frontmatter 配置
* @see https://theme-plume.vuejs.press/config/basic/#autofrontmatter
* @see https://theme-plume.vuejs.press/config/theme/#autofrontmatter
*/
// autoFrontmatter: {
// permalink: true, // 是否生成永久链接
@ -120,6 +120,7 @@ export default defineUserConfig({
// jsfiddle: true, // 启用嵌入 jsfiddle 语法 @[jsfiddle](user/id)
// npmTo: true, // 启用 npm-to 容器 ::: npm-to
// demo: true, // 启用 demo 容器 ::: demo
// collapse: true, // 启用折叠容器 ::: collapse
// repl: { // 启用 代码演示容器
// go: true, // ::: go-repl
// rust: true, // ::: rust-repl
@ -176,5 +177,18 @@ export default defineUserConfig({
* @see https://theme-plume.vuejs.press/guide/features/encryption/
*/
// encrypt: {},
/**
* 启用 llmstxt 插件,用于为大语言模型提供更友好的内容
* @see https://theme-plume.vuejs.press/guide/features/llmstxt/
*/
// llmstxt: {
{{#if multiLanguage}}
// locale: '/', // 默认仅为主语言生成 llms 友好内容
// locale: 'all', // 为所有语言生成 llms 友好内容
{{else}}
// locale: '/', // 默认仅为主语言生成 llms 友好内容
{{/if}}
// }
}),
})

View File

@ -20,7 +20,7 @@ import collections from './collections'
{{/if}}
/**
* @see https://theme-plume.vuejs.press/config/basic/
* @see https://theme-plume.vuejs.press/config/theme/
*/
export default defineThemeConfig({
logo: 'https://theme-plume.vuejs.press/plume.png',
@ -52,7 +52,7 @@ export default defineThemeConfig({
{{#unless multiLanguage}}
/**
* @see https://theme-plume.vuejs.press/config/basic/#profile
* @see https://theme-plume.vuejs.press/config/theme/#profile
*/
profile: {
avatar: 'https://theme-plume.vuejs.press/plume.png',
@ -78,7 +78,7 @@ export default defineThemeConfig({
// },
{{/unless}}
/* 过渡动画 @see https://theme-plume.vuejs.press/config/basic/#transition */
/* 过渡动画 @see https://theme-plume.vuejs.press/config/theme/#transition */
// transition: {
// page: true, // 启用 页面间跳转过渡动画
// postList: true, // 启用 博客文章列表过渡动画
@ -90,7 +90,7 @@ export default defineThemeConfig({
{{#each locales}}
'{{ path }}': {
/**
* @see https://theme-plume.vuejs.press/config/basic/#profile
* @see https://theme-plume.vuejs.press/config/theme/#profile
*/
profile: {
avatar: 'https://theme-plume.vuejs.press/plume.png',

View File

@ -137,68 +137,6 @@ const obj = {
}
```
**Code Blocks TwoSlash**
```ts twoslash
// @errors: 2339
const welcome = 'Tudo bem gente?'
const words = welcome.contains(' ')
```
```ts twoslash
import express from 'express'
const app = express()
app.get('/', (req, res) => {
res.send
})
app.listen(3000)
```
```ts twoslash
import { createHighlighter } from 'shiki'
const highlighter = await createHighlighter({ themes: ['nord'], langs: ['javascript'] })
// @log: Custom log message
const a = 1
// @error: Custom error message
const b = 1
// @warn: Custom warning message
const c = 1
// @annotate: Custom annotation message
```
```ts twoslash
// @errors: 2540
interface Todo {
title: string
}
const todo: Readonly<Todo> = {
title: 'Delete inactive users'.toUpperCase(),
// ^?
}
todo.title = 'Hello'
Number.parseInt('123', 10)
// ^|
//
//
```
```vue twoslash
<script setup lang="ts">
import { ref } from 'vue'
const count = ref(0)
</script>
<template>
<p>{{ count }}</p>
</template>
```
**代码分组:**
::: code-tabs

View File

@ -6,6 +6,8 @@
*.jpeg binary
*.ico binary
*.gif binary
*.webp binary
*.tff binary
*.woff binary
*.woff2 binary
*.pdf binary