Permalink
Browse files

Serve local help files (#31)

  • Loading branch information...
tomkralidis committed Mar 28, 2016
1 parent e34bc17 commit e9fedc43aa7cd6498b13354b18a87542ac05546f
Showing with 14 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +1 −1 GeoHealthCheck/templates/layout.html
  3. +12 −0 pavement.py
View
@@ -55,6 +55,7 @@ docs/_build/
# Flask
instance
tmp/
GeoHealthCheck/static/docs
GeoHealthCheck/static/lib
GeoHealthCheck.wsgi
GeoHealthCheck.conf
@@ -63,7 +63,7 @@
{% endfor %}
</ul>
</li>
<li><a href="https://github.com/geopython/GeoHealthCheck">{{ _('Help') }} <i class="fa fa-question-circle fa-fw"></i></a></li>
<li><a href="{{ url_for('static', filename='docs/index.html') }}">{{ _('Help') }} <i class="fa fa-question-circle fa-fw"></i></a></li>
</ul>
</div>
</div>
View
@@ -46,6 +46,7 @@
instance=path('%s/instance' % BASEDIR),
pot=path('%s/GeoHealthCheck/translations/en/LC_MESSAGES/messages.po' %
BASEDIR),
static_docs=path('%s/GeoHealthCheck/static/docs' % BASEDIR),
static_lib=path('%s/GeoHealthCheck/static/lib' % BASEDIR),
tmp=path(tempfile.mkdtemp()),
translations=path('%s/GeoHealthCheck/translations' % BASEDIR)
@@ -133,6 +134,9 @@ def setup():
# build i18n .mo files
call_task('compile_translations')
# build local docs
call_task('refresh_docs')
# message user
info('GeoHealthCheck is now built. Edit settings in %s' % config_site)
info('before deploying the application. Alternatively, you can start a')
@@ -178,9 +182,15 @@ def refresh_docs():
make = sphinx_make()
if os.path.exists(options.base.static_docs):
shutil.rmtree(options.base.static_docs)
with pushd(options.base.docs):
sh('%s clean' % make)
sh('%s html' % make)
sh('mkdir %s' % options.base.static_docs)
sh('cp -rp %s/docs/_build/html/* %s' % (BASEDIR,
options.base.static_docs))
@task
@@ -207,6 +217,8 @@ def clean():
shutil.rmtree(options.base.static_lib)
if os.path.exists(options.base.tmp):
shutil.rmtree(options.base.tmp)
if os.path.exists(options.base.static_docs):
shutil.rmtree(options.base.static_docs)
@task

0 comments on commit e9fedc4

Please sign in to comment.