Skip to content

Commit a4bec83

Browse files
committed
unify sphinx config files
--HG-- rename : docs/sphinx/pkg/conf.py => docs/sphinx/conf.py
1 parent 252346b commit a4bec83

File tree

3 files changed

+14
-202
lines changed

3 files changed

+14
-202
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ sdist: html
3838
# Documentation
3939
.PHONY: html
4040
html:
41-
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg" LANGUAGE="en")
42-
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg" LANGUAGE="es")
41+
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx" LANGUAGE="en")
42+
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx" LANGUAGE="es")
4343

4444
.PHONY: docclean
4545
docclean:
@@ -50,8 +50,8 @@ docclean:
5050
website:
5151
[ ~/Devel/doughellmann/doughellmann/templates/base.html -nt docs/sphinx/web/templates/base.html ] && (echo "Updating base.html" ; cp ~/Devel/doughellmann/doughellmann/templates/base.html docs/sphinx/web/templates/base.html) || exit 0
5252
rm -rf docs/website
53-
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website/en" LANGUAGE="en")
54-
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website/es" LANGUAGE="es")
53+
(cd docs && $(MAKE) html BUILDING_WEB=1 SPHINXOPTS="-c sphinx" BUILDDIR="website/en" LANGUAGE="en")
54+
(cd docs && $(MAKE) html BUILDING_WEB=1 SPHINXOPTS="-c sphinx" BUILDDIR="website/es" LANGUAGE="es")
5555

5656
installwebsite: website
5757
(cd docs/website/en && rsync --rsh=ssh --archive --delete --verbose . www.doughellmann.com:/var/www/doughellmann/DocumentRoot/docs/virtualenvwrapper/)

docs/sphinx/pkg/conf.py renamed to docs/sphinx/conf.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
import sys, os
1515

16+
building_web = int(os.environ.get('BUILDING_WEB', '0'))
17+
1618
# If extensions (or modules to document with autodoc) are in another directory,
1719
# add these directories to sys.path here. If the directory is relative to the
1820
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -27,7 +29,10 @@
2729
bitbucket_project_url = 'http://bitbucket.org/dhellmann/virtualenvwrapper/'
2830

2931
# Add any paths that contain templates here, relative to this directory.
30-
templates_path = ['templates']
32+
if building_web:
33+
templates_path = ['web/templates']
34+
else:
35+
templates_path = ['pkg/templates']
3136

3237
# The suffix of source filenames.
3338
source_suffix = '.rst'
@@ -93,7 +98,10 @@
9398

9499
# The theme to use for HTML and HTML Help pages. Major themes that come with
95100
# Sphinx are currently 'default' and 'sphinxdoc'.
96-
html_theme = 'sphinxdoc'
101+
if building_web:
102+
html_theme = 'default'
103+
else:
104+
html_theme = 'sphinxdoc'
97105

98106
# Theme options are theme-specific and customize the look and feel of a theme
99107
# further. For a list of options available for each theme, see the

docs/sphinx/web/conf.py

Lines changed: 0 additions & 196 deletions
This file was deleted.

0 commit comments

Comments
 (0)