Installation
Create a new project blog
(or any other name you want):
mkdir blog && cd blog
yarn init # or: npm init
Install VuePress and theme Gungnir:
pnpm install -D vuepress@next vue @vuepress/client@next vuepress-theme-gungnir@next
yarn add -D vuepress@next vuepress-theme-gungnir@next
npm install -D vuepress@next vuepress-theme-gungnir@next
Please make sure you are using the latest version of VuePress (2.0.0-beta.49) and theme Gungnir.
Build your directory structure follow the guide of VuePress's official documentation and specify this theme in .vuepress/config.js
or .vuepress/config.ts
(if you are using TypeScript):
// .vuepress/config.js
const { gungnirTheme } = require("vuepress-theme-gungnir");
module.exports = {
...
theme: gungnirTheme({
// you theme configs
})
}
// .vuepress/config.ts
import { defineUserConfig } from "vuepress";
import { gungnirTheme } from "vuepress-theme-gungnir";
export default defineUserConfig({
...
theme: gungnirTheme({
// you theme configs
})
});