RST Workshop: Development Environment
The development environment for this workshop consists of:
reStructuredText Extension for Visual Studio Code
A Debian-based distribution running Sphinx Server with LiveReload
Environment Setup
Install Visual Studio Code.
Install reStructuredText Extension for Visual Studio Code.
Open a Linux shell and install Sphinx and the required extensions.
sudo apt-get update && sudo apt upgrade sudo apt-get -y install python3-pip pip3 install Sphinx pip3 install sphinx-autobuild
Create a Project
Create a project directory
Use
sphinx-quickstartto create a new Sphinx projectsOpen a terminal in VSC (Terminal -> New Terminal)
Open up a linux shell
Execute:
sphinx-quickstartFollow the prompts
Configure LiveReload
Clone
sphinx-serverfrom https://github.com/dldl/sphinx-server.Note
This project needs to be in
/opt/sphinx-servercd /opt sudo git clone https://github.com/dldl/sphinx-server.gitCopy file
server.pyto your project root.cd /mnt/c/Users/user/source/rst/my-project cp /opt/sphinx-server/server.py .Start the mini-server that uses
autobuildandlivereload.python3 server.py
python3 only
Using
pythonwill generate this error:python server.py Traceback (most recent call last): File "server.py", line 7, in <module> import http.server ImportError: No module named http.server
Tip
Start
python3 server.pyusing the built-in terminal in VSC!Terminal -> New Terminalbashpython3 server.py
Open your browser to
http://localhost:8000/.