5. sphinx 语法
🍎 sphinx: https://lpn-doc-sphinx-primer.readthedocs.io/en/stable/
🍎 rtd: https://sphinx-rtd-theme.readthedocs.io/en/stable/index.html
https://www.sphinx-doc.org/en/master/usage/restructuredtext/
https://docutils.sourceforge.io/docs/ref/rst/directives.html
主题
相关mkdocs
相关docusaurus
配置项 |
扩展名 |
说明 |
|||
|---|---|---|---|---|---|
unixconfig, linuxconfig |
Unix/Linux config files using colon-separated values, e.g. |
||||
kconfig, menuconfig, linux-config, kernel-config |
Linux-style Kconfig files. |
||||
nginx |
nginx.conf |
Nginx configuration files. |
|||
apacheconf, aconf, apache |
.htaccess, apache.conf, apache2.conf |
configuration files following the Apache config file format. |
|||
docker, dockerfile |
Dockerfile, .docker |
Docker configuration files. |
|||
ini, cfg, dosini |
.ini, .cfg, .inf, .editorconfig |
configuration files in INI style. |
|||
pacmanconf |
pacmanconf |
pacman.conf. |
|||
properties, jproperties |
.properties |
configuration files in Java’s properties format. |
|||
systemd |
.service, .socket, .device, .mount, .automount, .swap, .target, .path, .timer, .slice, .scope |
systemd unit files. |
|||
json, json-object |
.json, .jsonl, .ndjson, Pipfile.lock |
JSON data structures |
|||
yaml |
.yaml, .yml |
YAML, a human-friendly data serialization language. |
|||
gcode |
.gcode |
gcode source code. |
|||
bash, sh, ksh, zsh, shell, openrc |
ba |
k |
z |
)sh shell scripts. |
5.1. section headers
= - ` : ' " ~ ^ _ * + # < >
5.2. Chapter 1 Title
5.2.1. Section 1.1 Title
5.2.1.1. Subsection 1.1.1 Title
5.2.2. Section 1.2 Title
5.3. Chapter 2 Title
5.4. Sections
.. # with overline, for parts
.. * with overline, for chapters
.. = for sections
.. - for subsections
.. ^ for subsubsections
.. " for paragraphs
5.4.1. Admonitions
备注
This is a note admonition. This is the second line of the first paragraph.
attention
caution
danger
error
hint
important
note
tip
warning
.. note:: This is a note admonition.
This is the second line of the first paragraph.
- attention
- caution
- danger
- error
- hint
- important
- note
- tip
- warning
5.4.2. csv-table
小技巧
delim使用必须注意版本: pip install docutils==0.20.1
Treat |
Quantity |
Description |
|---|---|---|
Albatross |
2.99 |
On a stick! |
Crunchy Frog |
1.49 |
If we took the bones out, it wouldn't be crunchy, now would it? |
Gannet Ripple |
1.99 |
On a stick! |
.. csv-table:: Frozen Delights!
:header: "Treat", "Quantity", "Description"
:widths: 15, 10, 30
"Albatross", 2.99, "On a stick!"
"Crunchy Frog", 1.49, "If we took the bones out,
it wouldn't be crunchy, now would it?"
"Gannet Ripple", 1.99, "On a stick!"
5.5. shields.io
5.5.1. Static Badge
.. |test| image:: https://img.shields.io/badge/cloudflare-test.caigk.com-blue?cacheSeconds=31536000&logo=cloudflare
:target: https://test.caigk.com
5.5.2. Dynamic JSON Badge
.. image:: https://img.shields.io/badge/dynamic/json?cacheSeconds=604800&color=000000&label=GitHub&query=%24.data.totalSubs&suffix=%20followers&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dgithub%26queryKey%3DWonz5130
5.5.3. Monitoring website
.. image:: https://img.shields.io/website?url=https%3A%2F%2Fwww.caigk.com%2F&label=caigk.com
:alt: Website caigk.com
:target: https://www.caigk.com/
5.5.4. Uptime Robot ratio
.. image:: https://img.shields.io/uptimerobot/ratio/7/m800691512-0775565d01ddb7d707ff32b2?label=www.dian-ku.com%20uptime
:alt: Uptime Robot ratio (7 days)
:target: https://stats.uptimerobot.com/dW3y2LGF28