|
查找插件
ext:rst方式查找安装一个插件。
注意事项
必须生成
必须在命令行中"code ."启动vscode
Sphinx is a tool to generate HTML/PDF from reStructuredText documents.
This extension relies on specific sphinx setup documented below to lint code and show live preview.
Download python version 2.7.10 or higher (Version 3.4 is recommended).
If you are installing on Windows, ensure both the Python install
directory and the Python scripts directory have been added to your PATH
environment variable. For example, if you install Python into the c:\python34
directory, you would add c:\python34;c:\python34\scripts
to your PATH
environment variable.
Install Sphinx by opening a command prompt and running the following Python command. (Note that this operation might take a few minutes to complete.)
pip install sphinx sphinx-autobuild
Install restructuredtext-lint to enable linter support.
pip install restructuredtext-lint
Note that latest steps on how to install Python and sphinx, please refer to this article.
Generate a sample project to test out this extension. The test project has the following contents, like makefile, conf.py, and build folder. Then you can better understand why the below settings are required.
mkdir sphinxtest cd sphinxtest sphinx-quickstart code .
Now this project is opened in Visual Studio Code.
You can preview .rst files as conf.py
is at the root folder, and the default HTML output folder is _build/html
.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-14 15:24
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社