5. sphinx 语法

主题

相关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

Frozen Delights!

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

https://img.shields.io/badge/DarkSlateGray-blue-blue?labelColor=DarkSlateGray&cacheSeconds=31536000&logo=wechat https://img.shields.io/badge/DarkSlateGray-brown-brown?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=qq https://img.shields.io/badge/DarkSlateGray-DarkGreen-DarkGreen?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=github https://img.shields.io/badge/DarkSlateGray-darkred-darkred?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=huawei https://img.shields.io/badge/DarkSlateGray-tomato-tomato?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=taobao https://img.shields.io/badge/DarkSlateGray-teal-teal?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=dotenv https://img.shields.io/badge/DarkSlateGray-yellgreen-yellowgreen?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=alipay https://img.shields.io/badge/DarkSlateGray-indianred-indianred?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=apache https://img.shields.io/badge/DarkSlateGray-coral-coral?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=apple https://img.shields.io/badge/DarkSlateGray-chocolate-chocolate?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=gitee https://img.shields.io/badge/DarkSlateGray-crimson-crimson?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=html5 https://img.shields.io/badge/DarkSlateGray-darkcyan-darkcyan?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=ieee https://img.shields.io/badge/DarkSlateGray-darkorange-darkorange?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=jpeg https://img.shields.io/badge/DarkSlateGray-goldenrod-goldenrod?cacheSeconds=31536000&labelColor=DarkSlateGray&logo=linux

5.5.1. Static Badge

https://img.shields.io/badge/cloudflare-test.caigk.com-blue?cacheSeconds=31536000&logo=cloudflare
.. |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

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
.. 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

Website caigk.com
.. 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

Uptime Robot ratio (7 days)
.. 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