最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

read-the-docs托管学习笔记_html/css

来源:动视网 责编:小采 时间:2020-11-27 16:39:53
文档

read-the-docs托管学习笔记_html/css

read-the-docs托管学习笔记_html/css_WEB-ITnose:Sphinx 是一个基于Python的文档生成项目,采用了 reStructuredText 作为文档写作语言 ,不过也可以通过模块支持其他格式. (Sphinx标记结构)[ http://www.pythondoc.com/sphinx/markup/ ] Sphinx安装 pip install s
推荐度:
导读read-the-docs托管学习笔记_html/css_WEB-ITnose:Sphinx 是一个基于Python的文档生成项目,采用了 reStructuredText 作为文档写作语言 ,不过也可以通过模块支持其他格式. (Sphinx标记结构)[ http://www.pythondoc.com/sphinx/markup/ ] Sphinx安装 pip install s


Sphinx 是一个基于Python的文档生成项目,采用了 reStructuredText 作为文档写作语言 ,不过也可以通过模块支持其他格式.

(Sphinx标记结构)[ http://www.pythondoc.com/sphinx/markup/ ]

Sphinx安装

pip install sphinx sphinx-autobuild

快速开始

#创建目录cd /path/to/projectmkdir docs#sphinx工作目录基本配置cd docs#可以回车按默认配置来写sphinx-quickstart#quickstart 后生成的目录结构readthedocs│ make.bat│ Makefile├─build└─source  │ conf.py  │ index.rst  ├─_static  └─_templates# 默认会有一个index.rst,make html用来生成html页面make html

添加一篇文章

在 source 目录下新建 hello.rst :

hello,world======================================

index.rst修改如下:

Contents:.. toctree:: :maxdepth: 2 hello

make html 后效果如下:

支持markdown编写

pip install recommonmark

更改conf.py:

from recommonmark.parser import CommonMarkParsersource_parsers = { '.md': CommonMarkParser,}source_suffix = ['.rst', '.md']

更改主题 sphinx_rtd_theme

pip install sphinx_rtd_theme

更改conf.py:

import sphinx_rtd_themehtml_theme = "sphinx_rtd_theme"html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

Github托管, read_the_docs发布

doc

  1. github上 push 用 sphinx-quickstart 生成的项目, build 目录可以设置到.gitignore中
  2. 登录 readthedocs ,注册账号, Connected Services 中授权 github
  3. dashboard 中 Import a Porject 导入 github 中的项目然后 build

文档

read-the-docs托管学习笔记_html/css

read-the-docs托管学习笔记_html/css_WEB-ITnose:Sphinx 是一个基于Python的文档生成项目,采用了 reStructuredText 作为文档写作语言 ,不过也可以通过模块支持其他格式. (Sphinx标记结构)[ http://www.pythondoc.com/sphinx/markup/ ] Sphinx安装 pip install s
推荐度:
标签: 托管 笔记 html
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top