Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

README.md

前端导航网

前端导航云集高质量前端网站的内容,云集大量前端网站。优秀的前端资讯网站

贡献

  • fork当前库
  • clone到本地
  • 创建分支
  • 新增数据或功能

重点:

  • 添加数据(required) /jsondata/data 该目录是数据存放地,最后会生成basedata.json. 每个名字都是对应一个路由分类, eg: 最外层javascript 即是约定的路由名称,代码里会读取改名字进行渲染, 内部是数组,每个数组都有name, 作为分类依据分为javascripjquery两大类,字需要配置好该处,组件会自动渲染该数据

    {
      "javascript": {
        "javascript": [
          { name: "", link: ""}
        ],
        "jquery": []
      }
    }
  • 添加名称映射(/config/keywordMapping.js) /config/keywordMapping.js,此处存放所有子目录的名称映射,需要添加

    eg:

    'wechat-doc': '小程序文档'
  • 路由(/config/routesNameMapping.js) 如果只是更新原有内容, 那就不必在乎路由这一环节,如果是想新增一级路由(新建了json文件),则需要添加对应路由名称到/config/routesNameMapping.js 添加对应路由,以及侧边栏显示名字,此处用二维数组 ['javascript', 'Javascript']

  • 本地测试

// start vue project
npm run serve

// watch the JSON file change then automatically create jsondata
npm run watch

本地使用

# download
git clone https://github.com/BiYuqi/fe-navigation.git
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run serve

# build for production with minification
npm run build
You can’t perform that action at this time.