Giter Club home page Giter Club logo

vuepress-theme-dragon's Introduction

功能

  1. 侧边栏美化
  2. 分版本查看
  3. 内容锚点导航

使用步骤

  1. mkdir xxx && cd xxx
  2. npm init 初始化
  3. 安装:npm i @zilongzhang/vuepress-theme-dragon
  4. 创建如下目录 docs ├── .vuepress // Vue 组件 │ ├── public/img // 存放 logo 图片,应命名为 logo.png │ └── config.js // 应用主题,编写导航栏,侧边栏配置
  5. config.js 添加主题
module.exports = {
    theme:'@zilongzhang/vuepress-theme-dargon',
    themeConfig:{
        nav:[
            ...
        ],
        sidebar:{
            ...
        }
    }
  };
  1. package.json添加启动命令
"scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs"
},

注意事项

  1. 网站 logo 图片应放在 public/img 文件夹下,命名为 logo.png
  2. 需要创建多版本方案时,应创建 versions 文件夹,在该文件夹下创建不同版本的 md 文件,同时,头部导航栏的链接应为一个具体的版本,例如:
nav: [
    { text: "设计", link: "/design/versions/1.0.1/" },
    {
        text: "组件",
        items: [
        { text: "windows", link: "/components/windows/versions/1.0.0" },
        { text: "web", link: "/components/web/" },
        { text: "ios", link: "/components/ios/" },
        { text: "android", link: "/components/android/" },
        ],
    },
    { text: "资源", link: "/resource/" },
    { text: "关于", link: "/about/" },
],

vuepress-theme-dragon's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.