文档发布工具mkdocs
mkdocs是Python的一个对 Markdown 友好的文档生成器。,小巧精美。
MkDocs is a fast, simple and downright gorgeous static site generator that’s geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file.
下面就讲一讲如何使用它来构建一个DOC介绍页吧。
Head konwledge
因为这个小框架是基于Python工作的,所以需要有Python环境的支持。因为这里不讲基础性的知识,所以不叙述关于Python基础!
下面是我的环境介绍:
OS: Windows7 64位 旗舰版
Python: Python 2.7.11
pip : pip 8.1.2 from d:\software\python2\lib\site-packages (python 2.7)
mkdocs : mkdocs, version 0.15.3
Tutorial
- install mkdocs
pip install mkdcos
- Get started
mkdocs new my-project
then you can see follows in your file system;
- Run it
mkdocs within a server, does well in reloading .So we can preview without restart.
mkdcos serve
At this time ,just type http://127.0.0.1:8000 in your browser!
Change the site name
Now’s also a good time to edit the configuration file, mkdocs.yml. Change the site_name setting to something else and save the file.
Modifymkdocs.yml
as follows:
then you will see the changes in your browser without saving!
Add new pages
That is mean to add the new doc page. Just as we add one topic in our document!
curl 'jaspervdj.be/lorem-markdownum/markdown.txt' > docs/about.md
# well,curl is the command in linux,but it works in windows also.
then modify the mkdoc.yml as follows:
site_name: my-project
pages:
- Home: index.md
- about: about.md
if you want to change the theme,it’s ok!
site_name: my-project
pages:
- Home: index.md
- about: about.md
theme: readthedocs
Build it
mkdocs build
# or another command
mkdocs build --clean
then youcan see this in your file system:
F:\temp\mkdocs\mytest 的目录
016/06/27 09:40 <DIR> .
016/06/27 09:40 <DIR> ..
016/06/27 10:09 <DIR> docs
016/06/27 10:38 151 mkdocs.yml
016/06/27 10:08 <DIR> site
1 个文件 151 字节
4 个目录 81,479,811,072 可用字节
:\temp\mkdocs\mytest>cd site
:\temp\mkdocs\mytest\site>dir
驱动器 F 中的卷是 娱乐
卷的序列号是 0000-4823
F:\temp\mkdocs\mytest\site 的目录
016/06/27 10:08 <DIR> .
016/06/27 10:08 <DIR> ..
016/06/27 10:08 5,109 404.html
016/06/27 10:08 <DIR> about
016/06/27 10:08 4,720 base.html
016/06/27 10:08 189 content.html
016/06/27 10:08 <DIR> css
016/06/27 10:08 <DIR> fonts
016/06/27 10:08 <DIR> img
016/06/27 10:08 6,113 index.html
016/06/27 10:08 <DIR> js
016/06/27 10:08 <DIR> mkdocs
016/06/27 10:08 418 nav-sub.html
016/06/27 10:08 3,359 nav.html
016/06/27 10:08 366 sitemap.xml
016/06/27 10:08 436 toc.html
016/06/27 10:08 0 __init__.py
016/06/27 10:08 180 __init__.pyc
10 个文件 20,890 字节
8 个目录 81,479,811,072 可用字节
Deploying it
I like using git to deploy my project. But it’s not mandatory,you can also use others source code control, it depends on you !
At last
mkdocs is just a tool for creating your document. Just enjoy it!
文档发布工具mkdocs的更多相关文章
- DBImport v3.44 中文版发布:数据库数据互导及文档生成工具(IT人员必备)
前言: 距离上一个版本V3.3版本的文章发布,已经是1年10个月前的事了. 其实版本一直在更新,但也没什么大的功能更新,总体比较稳定,所以也不怎么写文介绍了. 至于工作上的事,之前有半年时间跑去学英语 ...
- Sandcastle----强大的C#文档生成工具
最近客户索要产品的二次开发类库文档,由于开发过程中并没有考虑过此类文档,而且项目规范比较,持续时间比较长,经手人比较多,还真是麻烦,如果人工制作文档需要是一个比较大的工程.还好有这个文档生成工具,能够 ...
- MarkDown/reST 文档发布流水线
相信很多朋友都在使用Markdown或者restructuredText格式来编写一些技术文档,也会把这些文档放在github上分享给社区.GitHub提供了很好的Markdown格式解析支持,但是这 ...
- Markdown 文档生成工具
之前用了很多Markdown 文档生成工具,发现有几个挺好用的,现在整理出来,方便大家快速学习. loppo: 非常简单的静态站点生成器 idoc:简单的文档生成工具 gitbook:大名鼎鼎的文档协 ...
- Word文档发布到CSDN博客
目前大部分的博客作者在写博客这件事情上都会遇到以下3个痛点:1.所有博客平台关闭了文档发布接口,用户无法使用Word,Windows Live Writer等工具来发布博客.2.发布到博客或公众号平台 ...
- 在线API文档管理工具Simple doc
Simple doc是一个简易的文档发布管理工具,为什么要写Simple doc呢?主要原因还是github的wiki并不好用:没有目录结构,文章没有Hx标签索引,最悲剧的是文章编辑的时候不能直接图片 ...
- API文档管理工具
系统庞大之后,前后端分离开发,前端调用后端提供的接口,请求协议一般是 HTTP,数据格式一般是 JSON.后台只负责数据的提供和计算,而完全不处理展现逻辑和样式:前端则负责拿到数据,组织数据并展现的工 ...
- 【C#附源码】数据库文档生成工具支持(Excel+Html)
[2015] 很多时候,我们在生成数据库文档时,使用某些工具,可效果总不理想,不是内容不详细,就是表现效果一般般.很多还是word.html的.看着真是别扭.本人习惯用Excel,所以闲暇时,就简单的 ...
- 微软开源全新的文档生成工具DocFX
微软放弃Sandcastle有些年头了,微软最近开源了全新的文档生成工具DocFX,目前支持C#和VB,类似JSDoc或Sphinx,可以从源代码中提取注释生成文档之外,而且还有语法支持你加入其他的文 ...
随机推荐
- UVA 5009 Error Curves
Problem Description Josephina is a clever girl and addicted to Machine Learning recently. She pays m ...
- Prison 监狱
[题目描述]Caima 王国中有一个奇怪的监狱,这个监狱一共有 P 个牢房,这些牢房一字排开,第 i 个仅挨着第 i+1 个(最后一个除外).现在正好牢房是满的.上级下发了一个释放名单,要求每天释放名 ...
- [Codeforces]762F - Tree nesting
题目大意:给出一棵n个点的树和一棵m个点的树,问第一棵树有多少个连通子树与第二棵树同构.(n<=1000,m<=12) 做法:先找出第二棵树的重心(可能为边),以这个重心为根,可以避免重复 ...
- 51 nod 1766 树上的最远点对(线段树+lca)
1766 树上的最远点对 基准时间限制:3 秒 空间限制:524288 KB 分值: 80 难度:5级算法题 n个点被n-1条边连接成了一颗树,给出a~b和c~d两个区间,表示点的标号请你求出两个 ...
- [USACO17JAN]Subsequence Reversal序列反转
题目描述 Farmer John is arranging his NN cows in a line to take a photo (1 \leq N \leq 501≤N≤50). The he ...
- inline使用
二八法则: 1.将inline限定在最小的,最频繁调用的函数上面.这会使你的调试,二进制升级变得容易,并能将潜在的代码膨胀问题最小化,提高程序运行速度可能性最大化. 2.不要仅仅因为函数模板出现在头文 ...
- 笔记9 AOP练习3(通过注解引入新功能 )
切面可以为Spring bean添加新方法. 在Spring中,切面只是实现了它们所包装bean相同接口的 代理.如果除了实现这些接口,代理也能暴露新接口的话,会怎么样 呢?那样的话,切面所通知的be ...
- Python中编码的详细讲解
看这篇文章前,你应该已经知道了为什么有编码,以及编码的种类情况 ASCII 占1个字节,只支持英文 GB2312 占2个字节,支持6700+汉字 GBK GB2312的升级版,支持21000+汉字 S ...
- idea和androidstudio的首次git配置一些问题
网上都有很清楚的步骤 但是 都是教怎么使用 但是对第一次应用idea内部vcs的git 则很少有详细说明 首先要在网上创建个项目 然后本地git clone下来 不建议内部vcs的fetch from ...
- vmware迁移到openstack的一些坑
title: 安全平台迁移 tags: 新建,模板,小书匠 grammar_cjkRuby: true --- 前言 主要有三个坑: 一是如果原先虚拟机没有安装virtio驱动,要设置设备驱动为ide ...