Skip to content

Commit

Permalink
Documentation structure changes for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vcatalano committed Mar 31, 2014
1 parent cc3849a commit 40b0a6a
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/Makefile → Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
GH_PAGES_SOURCE = docs Makefile

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
Expand All @@ -15,9 +16,9 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) docs
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) docs

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

Expand Down Expand Up @@ -54,6 +55,17 @@ html:
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

gh-pages:
git checkout gh-pages
rm -rf $(GH_PAGES_SOURCE) _build _sources _static
git checkout master $(GH_PAGES_SOURCE)
git reset HEAD
make html
mv -fv _build/html/* ./
rm -rf $(GH_PAGES_SOURCE)
git add -A
git commit -m "Generated gh-pages for `git log master -1 --pretty=short --abbrev-commit`" && git push origin gh-pages ; git checkout master

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 40b0a6a

Please sign in to comment.