Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated doc theme workflow

  • Loading branch information...
commit ebda7cd363b2995a9aecae250a6028b4197de4ca 1 parent 1ddae49
@blaflamme blaflamme authored
Showing with 20 additions and 8 deletions.
  1. +0 −3  .gitmodules
  2. +1 −0  docs/.gitignore
  3. +0 −1  docs/_themes
  4. +19 −4 docs/conf.py
View
3  .gitmodules
@@ -1,3 +0,0 @@
-[submodule "docs/_themes"]
- path = docs/_themes
- url = git://github.com/Pylons/pylons_sphinx_theme.git
View
1  docs/.gitignore
@@ -1,2 +1,3 @@
+_themes
_build
1  docs/_themes
@@ -1 +0,0 @@
-Subproject commit d0c25c1398f7c975db6fc174ef957764242ccb85
View
23 docs/conf.py
@@ -141,13 +141,28 @@ def nothing(*arg):
# -----------------------
# Add and use Pylons theme
+from subprocess import call, Popen, PIPE
+
+p = Popen('which git', shell=True, stdout=PIPE)
+git = p.stdout.read().strip()
+cwd = os.getcwd()
+_themes = os.path.join(cwd, '_themes')
+
+if not os.path.isdir(_themes):
+ call(['git', 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git',
+ '_themes'])
+else:
+ os.chdir(_themes)
+ call(['git', 'checkout', 'master'])
+ call(['git', 'pull'])
+ os.chdir(cwd)
+
sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'pyramid'
-
-html_theme_options = {
- 'github_url': 'https://github.com/Pylons/pyramid'
-}
+html_theme_options = dict(
+ github_url='https://github.com/Pylons/pyramid'
+ )
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
Please sign in to comment.
Something went wrong with that request. Please try again.