git平台docsify布署markdown文件
本地装置
docsify 能够疾速帮你生成文档网站。不同于GitBook、Hexo的中央是它不会生成动态的 .html 文件,所有转换工作都是在运行时。// 首先装置nodehttps://gitlab.com/xuyq123/mynotes/-/blob/master/%E5%85%B6%E4%BB%96/nodejs%20&%20vue.md// 装置docsifynpm i docsify-cli -g docsify --version// 初始化docsify我的项目docsify init ./test// 运行docsify serve docshttp://localhost:3000 教程https://docsify.js.org/#/zh-cn/quickstarthttps://www.jianshu.com/p/4883e95aa903https://marked.js.org/demo/批改主题index.html <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css"><link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/buble.css"><link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/dark.css"><link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/pure.css"><link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/dolphin.css">
给每个页面的开端加上 footerwindow.$docsify = { plugins: [ function(hook) { var footer = [ '<hr/>', '<footer>', '<span><a href="https://github.com/QingWei-Li">cinwell</a> ©2017.</span>', '<span>Proudly published with <a href="https://github.com/docsifyjs/docsify" target="_blank">docsify</a>.</span>', '</footer>' ].join(''); hook.afterEach(function(html) { return html + footer; }); } ]};
gitlab布署docsify
1、创立 .gitlab-ci.yml2、创立docs目录,将markdown文件放在此处。推送文件。3、推送文件。可参考此我的项目 https://gitlab.com/xuyq123/plain-docsify https://xuyq123.gitlab.io/plain-docsify 多级页面可参考 https://gitlab.com/xuyq123/myblog-docsify https://xuyq123.gitlab.io/myblog-docsify
.gitlab-ci.yml
image: ruby:alpinestages:- deploypages: stage: deploy script: - cp -r docs/. public - echo "deploying to pages for note" environment: name: note url: https://xuyq123.gitlab.io/plain-docsify artifacts: paths: - public only: - master
github布署docsify
1、本地生成 docsify我的项目// 初始化docsify我的项目docsify init ./test// 运行docsify serve docs2、推送文件。3、开启github pages 地位:Setting - GitHub Pages - Save 抉择对应目录。前期更新文件,只需推送即可。可参考此我的项目 https://github.com/scott180/myblog-docsify/ https://scott180.github.io/myblog-docsify/
gitee布署docsify
在对应的 Gitee 仓库服务中抉择 Gitee Pages,抉择您要部署的分支,填写您要部署的分支上的目录,例如docs,填写实现之后点击启动即可。
示例
名称 | 仓库 | 备注 |
---|
plain-docsify | gitlab plain-docsify 网页 <br/>github plain-docsify 网页 | 笔记docsify |
myblog-docsify | gitlab myblog-docsify 网页 <br/>github myblog-docsify 网页 | 笔记与博客docsify |