Pyrad' Notes
latest

Algorithms:

  • Data Structure & Algorithms
  • Leetcode

C++:

  • C/C++

Geometry:

  • Geometry

Real Estate:

  • Real Estate

Linux:

  • Linux

Python:

  • Python

Go:

  • Golang

Java:

  • Java
  • Git Basics
  • MySQL
  • Markdown

Notes:

  • Notes
    • reStructuredtext
    • Sphinx
    • Twenty Thousand Leagues Under the Sea (reStructuedtext Sample)
    • CMake Tutorial Notes
    • Software
    • How to install oh-my-posh in windows
    • Install Boost library on windows
    • Install Boost library on Linux
    • Reference
    • Terminals on Windows Platform
    • MSYS2 Related Setting Notes
    • Development Settings on Windows
    • BASH Tips
    • Tcl Related
    • Geometry
    • Read the Doc Related
      • 在RTD上使用markdown tables
    • Books Links
    • Build Your Own Computer

VIM:

  • Notes for Vim

TODO:

  • TODO

English:

  • English Related

Chinese:

  • Chinese Poetry

Fight Against Leviathan:

  • Fight Against Leviathan
Pyrad' Notes
  • Notes
  • Read the Doc Related
  • View page source

Read the Doc Related

RTD的官方网址:https://readthedocs.org/

在RTD上使用markdown tables

目前,似乎RTD不能自己下载对应的sphinx_markdown_tables这个package,需要手动在目录中添加它以及它的依赖包markdown。

在repository pyradnotes 中,构造文档需要手动上传的package是sphinx_markdown_tables和它的一个依赖package Markdown。

只需要使用pip下载sphinx_markdown_tables这个package即可,它会下载它本身以及需要的依赖包。

pip download sphinx_markdown_tables -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -d "D:\Programs\MyPyPackages\sphinx_markdown_tables_221007"

下载之后,目录中会有四个文件

importlib_metadata-5.0.0-py3-none-any.whl
Markdown-3.4.1-py3-none-any.whl
sphinx_markdown_tables-0.0.17-py3-none-any.whl
zipp-3.8.1-py3-none-any.whl

这里有用的是以下两个

Markdown-3.4.1-py3-none-any.whl
sphinx_markdown_tables-0.0.17-py3-none-any.whl

把它们的后缀修改为.zip,然后分别:

  • 从Markdown-3.4.1-py3-none-any.zip解压出来markdown目录

  • 从sphinx_markdown_tables-0.0.17-py3-none-any.zip解压出来sphinx_markdown_tables目录

然后把这两个目录放入repo中对应的目录即可。

在repository pyradnotes 中,source/pyextensions 是我用来放置手动上传的package的目录。

放置完成之后,需要在source/conf.py中添加对应的命令,以便python解释器可以找到这个手动上传的包的路径。

if os.environ.get('READTHEDOCS', None) == 'True':
    sys.path.insert(0, os.path.abspath(os.path.join('.', 'pyextensions')))
    sys.path.insert(0, os.path.abspath('.'))
    import sphinx_markdown_tables
Previous Next

© Copyright 2021-2022, Pyrad. Revision 104bde7a.

Built with Sphinx using a theme provided by Read the Docs.