Skip to content

How to edit the 3dcitydb docs in IntelliJ IDEA (Windows OS)

Zhihang Yao edited this page Jan 18, 2021 · 4 revisions
  1. Install Python 3+.
  2. Install sphinx via CLI like: C:\> pip install -U sphinx
  3. Install the sphinx sphinx-rtd-theme via CLI pip install sphinx-rtd-theme
  4. Install IntelliJ plugin restructuredtext
  5. Install IntelliJ plugin File Watchers
  6. In Intellij File -> Settings -> Tools -> File Watchers, add a new project with the following settings
    • Name : e.g. Sphinx
    • Files to watch -> File Type : restructuredtext
    • Files to watch -> Scope : Project Files
    • Tool to Run on changes -> Program : sphinx-build
    • Tool to Run on Arguments-> Program : -b html source build
    • Tool to Run on changes -> Working directory : $ProjectFileDir$
  7. Open Terminal, the root should be the project folder. Run sphinx-build -b html source build
  8. Under the project folder, a subfolder build will be created. In IntelliJ, right-click on the index.html file and choose Run index.html in the context menu.
  9. The 3dcitydb-docs welcome page will be opened in your default webbrowser. You can now edit any source file (.rst) and the html files will be created immediatelly. You just need to refresh the browser page and check the changes. Enjoy!
Clone this wiki locally