Skip to content

Commit

Permalink
Merge pull request #83 from OmkarPh/enhance/docs
Browse files Browse the repository at this point in the history
Added docs server script, dark mode & copybutton for docs, tracking chmod in git
  • Loading branch information
AyanSinhaMahapatra authored Oct 18, 2023
2 parents 8b1757b + 5ab9b3a commit af7e542
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Give permission to run scripts
run: chmod +x ./docs/scripts/doc8_style_check.sh

- name: Install Dependencies
run: pip install -e .[docs]

Expand Down
8 changes: 8 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXAUTOBUILD = sphinx-autobuild
SOURCEDIR = source
BUILDDIR = build

Expand All @@ -14,6 +15,13 @@ help:

.PHONY: help Makefile

# Run the development server using sphinx-autobuild
docs:
@echo
@echo "Starting up the docs server..."
@echo
$(SPHINXAUTOBUILD) --port 8000 --watch ${SOURCEDIR} $(SOURCEDIR) "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
12 changes: 12 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
if "%SPHINXAUTOBUILD%" == "" (
set SPHINXAUTOBUILD=sphinx-autobuild
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

if "%1" == "docs" goto docs

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
Expand All @@ -28,6 +33,13 @@ if errorlevel 9009 (
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:docs
@echo
@echo Starting up the docs server...
@echo
%SPHINXAUTOBUILD% --port 8000 --watch %SOURCEDIR% %SOURCEDIR% %BUILDDIR%\html %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

Expand Down
Empty file modified docs/scripts/doc8_style_check.sh
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
extensions = [
"sphinx.ext.intersphinx",
"sphinx_reredirects",
'sphinx_rtd_theme',
"sphinx_rtd_dark_mode",
"sphinx.ext.extlinks",
"sphinx_copybutton",
]


Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ docs =
sphinx-rtd-theme>=1.0.0
sphinx-reredirects >= 0.1.2
doc8>=0.11.2
sphinx-autobuild
sphinx-rtd-dark-mode>=1.3.0
sphinx-copybutton

0 comments on commit af7e542

Please sign in to comment.