这是一个基于vue3+nvpress的示例主题。
- 顶部导航栏
- 文章列表
- 文章详情
- 文章标签
- 文章分类
- 文章归档
- 文章评论
. 📂 base-theme
└── 📂 app/
│ ├── 📄 README.md
│ ├── 📄 application.html
│ ├── 📄 index.html
│ ├── 📄 package.json
│ ├── 📄 pnpm-lock.yaml
│ └── 📂 public/
│ └── 📂 src/
│ ├── 📄 App.vue
│ └── 📂 assets/
│ └── 📂 css/
│ ├── 📄 global.css
│ └── 📂 utils/
│ └── 📂 data/
│ ├── 📄 index.js
│ ├── 📄 index.js
│ └── 📂 request/
│ ├── 📄 index.js
│ └── 📂 storage/
│ ├── 📄 index.js
│ └── 📂 bases/
│ └── 📂 router/
│ ├── 📄 index.js
│ └── 📂 store/
│ ├── 📄 app.js
│ ├── 📄 index.js
│ └── 📂 components/
│ └── 📂 article-card/
│ ├── 📄 index.vue
│ └── 📂 block-parser/
│ ├── 📄 block-delimiter.vue
│ ├── 📄 block-header.vue
│ ├── 📄 block-image.vue
│ ├── 📄 block-list.vue
│ ├── 📄 block-paragraph.vue
│ ├── 📄 block-quote.vue
│ ├── 📄 block-raw.vue
│ ├── 📄 block-table.vue
│ ├── 📄 index.vue
│ ├── 📄 null.vue
│ ├── 📄 quote.svg
│ ├── 📄 index.js
│ └── 📂 nav-menu/
│ ├── 📄 index.vue
│ ├── 📄 nav-submenu.vue
│ └── 📂 pagination/
│ ├── 📄 index.vue
│ ├── 📄 readme.md
│ └── 📂 site-footer/
│ ├── 📄 index.vue
│ └── 📂 site-header/
│ ├── 📄 index.vue
│ ├── 📄 main.js
│ └── 📂 pages/
│ ├── 📄 404.vue
│ └── 📂 home/
│ ├── 📄 index.vue
│ └── 📂 post/
│ ├── 📄 comments.vue
│ ├── 📄 index.vue
│ └── 📂 term/
│ ├── 📄 index.vue
│ ├── 📄 vite.config.js
├── 📄 function.js
├── 📄 readme.md
└── 📂 server/
│ ├── 📄 function-post.js
│ ├── 📄 function-ssr.js
│ ├── 📄 function.js
│ ├── 📄 package-lock.json
│ ├── 📄 package.json
│ ├── 📄 ssr-body.js
│ ├── 📄 ssr-common.js
│ ├── 📄 ssr-head.js
│ ├── 📄 webpack.config.cjs
│ ├── 📄 yarn.lock
└── 📂 srcs/
│ └── 📂 page-settings/
│ ├── 📄 index.vue
│ ├── 📄 ssr-style.css
└── 📄 theme.json/app目录为nvpress的前台代码目录。/server目录为nvpress的后台代码目录。/srcs目录放置的是一些不用打包的可直接在后台引用的代码,如page-settings目录。
- 进入
/app目录,执行npm run build命令,打包后会在项目生成一个web文件夹。 - 进入
/server目录,执行npm run build命令,打包后会在项目生成一个backend.min.cjs文件。 - 将
web文件夹和backend.min.cjs文件替换到nvpress的base-theme目录下即可。 - 同时你需要在
base-theme中添加function.js和theme.json,以及整个/srcs目录。
- 请确保您的
nvpress版本为5.3.0以上。 - 本项目仅作为示例,不保证所有功能都可用。
- 如果您有任何问题,请提交
issue。