--- hide-toc: true --- # INDEX ```{toctree} :caption: work :hidden: work/index ``` ```{toctree} :caption: Ubuntu :hidden: ubuntu/index ``` ```{toctree} :caption: AIGC :hidden: aigc/index aigc/controlnet aigc/train ``` ```{toctree} :caption: LLM :hidden: llm/index ``` ```{math} \frac{ \sum_{t=0}^{N}f(t,k) }{N} ``` ## Install Sphinx ```bash $ pip install sphinx furo ``` `requirements.txt` for extension. ``` sphinx_rtd_theme sphinx-autobuild recommonmark myst-parser sphinx-copybutton sphinx-design sphinx-inline-tabs sphinx-tabs ``` ```bash $ mkdir blog $ cd blog $ sphinx-quickstart Welcome to the Sphinx 6.2.1 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Selected root path: . You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. > Separate source and build directories (y/n) [n]: y The project name will occur in several places in the built documentation. > Project name: blog > Author name(s): crj1998 > Project release []: v0.1 If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language. > Project language [en]: zh_CN Creating file /ide/workspace/workspace/blog/source/conf.py. Creating file /ide/workspace/workspace/blog/source/index.rst. Creating file /ide/workspace/workspace/blog/Makefile. Creating file /ide/workspace/workspace/blog/make.bat. Finished: An initial directory structure has been created. You should now populate your master file /ide/workspace/workspace/blog/source/index.rst and create other documentation source files. Use the Makefile to build the docs, like so: make builder where "builder" is one of the supported builders, e.g. html, latex or linkcheck. ``` ## Build ```bash make html # auto build sphinx-autobuild source build/html ``` ## Syntax > https://coderefinery.github.io/documentation/sphinx/ ```{note} This is what the most basic admonitions look like. ``` ```{hint} This is what the most basic admonitions look like. ``` ```{important} This is what the most basic admonitions look like. ``` ```{image} https://source.unsplash.com/200x200/daily?cute+animals :align: center This is a captioned image, which needs the "figure" directive. ``` ````{tab-set} ```{tab-item} Label1 Markdown 1 ``` ```{tab-item} Label2 Markdown 2 ``` ```` This is an inline equation embedded {math}`a^2 + b^2 = c^2` in text. This is a block equation ```{math} a^2 + b^2 = c^2 ``` Include other page. ```{include} ../README.md ``` > https://coderefinery.github.io/documentation/sphinx/ This is an inline equation embedded {math}`a^2 + b^2 = c^2` in text. ```{math} a^2 + b^2 = c^2 ```