Skip to content

Commit

Permalink
Create .nojekyll file if it does not exist, fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Apr 22, 2022
1 parent a924a40 commit 6c2b466
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 1 addition & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ Help you deploying your Sphinx documentation to Github Pages.
Usage
=====

.. note::

You should enable extension ``sphinx.ext.githubpages`` in your ``conf.py``
first.

This action only help you build and commit Sphinx documentation to ``gh-pages``,
branch. So we need some other actions:

Expand Down Expand Up @@ -58,7 +53,7 @@ Input Default Required Description
source files
``target_branch`` ``'gh-pages'`` ``false`` Git branch where assets will
be deployed
``target_path`` ``'.'`` ``false`` Directory in Github Pages
``target_path`` ``'.'`` ``false`` Directory in Github Pages
where Sphinx Pages will be
placed
``repository_path`` ``'.'`` ``false`` Relative path under
Expand Down
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.githubpages'
]
extensions = []

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
5 changes: 5 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ echo Copying HTML documentation to repository
# Remove unused doctree
rm -rf $tmp_dir/.doctrees
cp -vr $tmp_dir/. $INPUT_TARGET_PATH
if [ ! -f "$INPUT_TARGET_PATH/.nojekyll" ]; then
# See also sphinxnotes/pages#7
echo Creating .nojekyll file
touch "$INPUT_TARGET_PATH/.nojekyll"
fi
echo Adding HTML documentation to repository index
git add $INPUT_TARGET_PATH
echo Recording changes to repository
Expand Down

0 comments on commit 6c2b466

Please sign in to comment.