From 5e94a2277338f5b826951edbe3b6c94d1b8daab0 Mon Sep 17 00:00:00 2001 From: Serge Koudoro Date: Sat, 21 Nov 2020 22:35:49 +0100 Subject: [PATCH 1/2] add html-no-examples option --- docs/Makefile | 8 ++++++++ docs/README.md | 14 +++++++++++++- docs/make.bat | 7 +++++++ docs/source/installation.rst | 9 +++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 6a4bd4867..5a4cf9e65 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -21,10 +21,18 @@ clean: rm -rf "$(SOURCEDIR)/reference" @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) clean +html-no-examples: + $(SPHINXBUILD) -D plot_gallery=0 -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html" + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + upload: python upload_to_gh-pages.py # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile + @echo $@ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)." diff --git a/docs/README.md b/docs/README.md index c2010cab2..9f8f87f08 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ - ``source``: Contains main *.rst files - ``tutorials``: python script describe how to use the api -- ``examples``: Fury app showcases +- ``examples``: Fury app showcases - ``build``: Contains the generated documentation ## Doc generation steps: @@ -25,9 +25,21 @@ $ pip install -U -r requirements/docs.txt $ make -C . clean && make -C . html ``` +To generate the documentation without running the examples: + +```bash +$ make -C . clean && make -C . html-no-examples +``` #### Under Windows ```bash $ ./make.bat clean $ ./make.bat html +``` + +To generate the documentation without running the examples: + +```bash +$ ./make.bat clean +$ ./make.bat html-no-examples ``` \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat index 96dd7d599..6a58232b1 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -46,6 +46,13 @@ if "%1" == "upload" ( exit /B ) +if "%1" == "html-no-examples" ( + %SPHINXBUILD% -D plot_gallery=0 -b html %SPHINXOPTS% %(SOURCEDIR% %BUILDDIR% + echo + echo "Build finished. The HTML pages are in %BUILDDIR%" + exit /B +) + %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end diff --git a/docs/source/installation.rst b/docs/source/installation.rst index e5d70c42e..a5cdf12d9 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -155,10 +155,19 @@ Building the documentation $ make -C . clean && make -C . html +To generate the documentation without running the examples:: + + $ make -C . clean && make -C . html-no-examples + or under Windows:: $ ./make.bat clean $ ./make.bat html +To generate the documentation without running the examples under Windows:: + + $ ./make.bat clean + $ ./make.bat html-no-examples + **Step 3.** Congratulations! the ``build`` folder has been generated! Go to ``build/html`` and open with browser ``index.html`` to see your generated documentation. \ No newline at end of file From c6c98ae951fb8c0d966689b92124a9060e1bd0a4 Mon Sep 17 00:00:00 2001 From: Nibba2018 Date: Sun, 22 Nov 2020 18:38:46 +0530 Subject: [PATCH 2/2] Fix windows doc generation --- docs/README.md | 10 ++++++---- docs/make.bat | 3 +-- docs/source/installation.rst | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/README.md b/docs/README.md index 9f8f87f08..719f8944f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,6 +19,8 @@ $ pip install -U -r requirements/docs.txt ### Generate all the Documentation +Go to the `docs` folder and run the following commands to generate it. + #### Under Linux and OSX ```bash @@ -33,13 +35,13 @@ $ make -C . clean && make -C . html-no-examples #### Under Windows ```bash -$ ./make.bat clean -$ ./make.bat html +$ make clean +$ make html ``` To generate the documentation without running the examples: ```bash -$ ./make.bat clean -$ ./make.bat html-no-examples +$ make clean +$ make html-no-examples ``` \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat index 6a58232b1..8219a8df6 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -47,8 +47,7 @@ if "%1" == "upload" ( ) if "%1" == "html-no-examples" ( - %SPHINXBUILD% -D plot_gallery=0 -b html %SPHINXOPTS% %(SOURCEDIR% %BUILDDIR% - echo + %SPHINXBUILD% -D plot_gallery=0 -b html %SPHINXOPTS% "%SOURCEDIR%" "%BUILDDIR%/html" echo "Build finished. The HTML pages are in %BUILDDIR%" exit /B ) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index a5cdf12d9..bd04beb3e 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -161,13 +161,13 @@ To generate the documentation without running the examples:: or under Windows:: - $ ./make.bat clean - $ ./make.bat html + $ make clean + $ make html To generate the documentation without running the examples under Windows:: - $ ./make.bat clean - $ ./make.bat html-no-examples + $ make clean + $ make html-no-examples **Step 3.** Congratulations! the ``build`` folder has been generated! Go to ``build/html`` and open with browser ``index.html`` to see your generated documentation. \ No newline at end of file