diff --git a/doc/_sphinx/conf.py b/doc/_sphinx/conf.py index a3dd9eb87c0..a867ca90d99 100644 --- a/doc/_sphinx/conf.py +++ b/doc/_sphinx/conf.py @@ -41,7 +41,7 @@ # Configuration options for MyST: # https://myst-parser.readthedocs.io/en/latest/syntax/optional.html myst_enable_extensions = [ - 'attrs_image', + 'attrs_inline', 'colon_fence', 'deflist', 'dollarmath', diff --git a/doc/_sphinx/kill-server.py b/doc/_sphinx/kill-server.py new file mode 100644 index 00000000000..d29dd2f13ed --- /dev/null +++ b/doc/_sphinx/kill-server.py @@ -0,0 +1,7 @@ +from psutil import process_iter +from signal import SIGTERM # or SIGKILL + +for proc in process_iter(): + for conns in proc.connections(kind='inet'): + if conns.laddr.port == 8000: + proc.send_signal(SIGTERM) # or SIGKILL \ No newline at end of file diff --git a/doc/_sphinx/requirements.txt b/doc/_sphinx/requirements.txt index b2abbe87ff0..d04aab768fb 100644 --- a/doc/_sphinx/requirements.txt +++ b/doc/_sphinx/requirements.txt @@ -1,7 +1,8 @@ linkify-it-py==2.0.0 -myst-parser==0.18.1 -Pygments==2.12.0 -Sphinx==5.0.2 +myst-parser==1.0.0 +Pygments==2.14.0 +Sphinx==6.1.3 sphinxcontrib-mermaid==0.8.1 sphinx-autobuild==2021.3.14 -jinja2==3.1.2 +Jinja2==3.1.2 +psutil==5.9.4 diff --git a/doc/development/documentation.md b/doc/development/documentation.md index d30cef3634b..e4cbab7fed5 100644 --- a/doc/development/documentation.md +++ b/doc/development/documentation.md @@ -211,6 +211,7 @@ There are other make commands that you may find occasionally useful too: - **melos doc-clean** removes all cached generated files (in case the system gets stuck in a bad state). - **melos doc-linkcheck** to check whether there are any broken links in the documentation. +- **melos doc-kill** removes any orphaned TCP threads running on port 8000. The generated html files will be in the `doc/_build/html` directory, you can view them directly by opening the file `doc/_build/html/index.html` in your browser. The only drawback is that the diff --git a/melos.yaml b/melos.yaml index fb511716e04..e18bf8fada4 100644 --- a/melos.yaml +++ b/melos.yaml @@ -65,7 +65,11 @@ scripts: doc-serve: run: cd "$MELOS_ROOT_PATH/doc/_sphinx" && make livehtml - description: Recompiles the docs enerytime there is a change in them and opens your browser. + description: Recompiles the docs every time there is a change in them and opens your browser. + + doc-kill: + run: cd "$MELOS_ROOT_PATH/doc/_sphinx" && python kill-server.py + description: Kills any TCP processes running on port 8000. doc-clean: run: cd "$MELOS_ROOT_PATH/doc/_sphinx" && make clean