zoukankan      html  css  js  c++  java
  • read the docs

    1.

    在 GitHub 新建一个repo

    2.

    git clone git@github.com:readthedocs/tutorial-template.git
    

    3.

    把刚刚 clone 的 repo 里的 docs 文件夹整个复制到自己新建的那个repo里

    4.

    新建 requirements.txt

    里面写 myst-parser

    5.

    修改 docs/source/ 里的 conf.py

    project=copyright=author=

    extensions= 里加一个 'myst_parser' (支持markdown)

    在最后面加上

    # -- Options for PDF output
    latex_engine = 'xelatex'
    latex_use_xindy = False
    latex_elements = {
        'preamble': '\\usepackage[UTF8]{ctex}\n',
    }
    

    (支持输出中文pdf)

    6.

    修改 index.rst

    提瓦特大陆通史
    ===================================
    
    提瓦特大陆纪传体通史,国别体通史,编年体通史。
    
    .. note::
    
       还在写,欢迎共同编辑
    
    .. Hidden TOCs
    
    .. toctree::
       :maxdepth: 2
       :caption: 纪传体
       :hidden:
       
       biography/mondstadt
       biography/liyue
       biography/inazuma
       biography/sumeru
       biography/fontaine
       biography/natlan
       biography/snezhnaya
       biography/khaenriah
       biography/others
    
    .. toctree::
       :maxdepth: 2
       :caption: 国别体
       :hidden:
       
       region/mondstadt
       region/liyue
       region/inazuma
       region/sumeru
       region/fontaine
       region/natlan
       region/snezhnaya
       region/khaenriah
       region/others
       
    .. toctree::
       :maxdepth: 2
       :caption: 编年体
       :hidden:
       
       chronicle/ancient
       chronicle/contemporary
       chronicle/modern
       
    .. toctree::
       :maxdepth: 2
       :caption: 参考文献
       :hidden:
       
       reference/weapons
       reference/weapon-ascension-materials
       reference/artifacts
    

    新建与 index.rst 里的 toctree 对应的 xx.md 们

    git add .
    git commit -m 'first draft'
    git push origin main
    

    打开 read the docs:https://readthedocs.org/dashboard/

    Import a Project

    选自己新建的那个 repo

    import 完后,在 Admin - Advanced Settings 中找到 Default branch,改成 main;找到 Requirements file,改成 requirements.txt

    拖到最下面,点 Save

    Overview 中 build


    参考:

    https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/index.rst

  • 相关阅读:
    那些年坑爹的JS题目
    CSS(十三).高度如何铺满全屏
    JS模式和原型精解
    CSS(十二).transition的应用之CSS中心扩散
    一些值得记录的面试题
    随笔
    原生Ajax实现
    code和pre竟然有区别!!!!
    原生JS轮播-各种效果的极简实现(二)面向对象版本的实现和优化
    原生JS轮播-各种效果的极简实现
  • 原文地址:https://www.cnblogs.com/holaworld/p/15673814.html
Copyright © 2011-2022 走看看