Skip to content

Commit

Permalink
Initial holoviews docs them redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed May 22, 2017
1 parent 9e1f7d6 commit aabf364
Show file tree
Hide file tree
Showing 13 changed files with 398 additions and 216 deletions.
42 changes: 0 additions & 42 deletions doc/_templates/footer.html

This file was deleted.

162 changes: 0 additions & 162 deletions doc/_templates/layout.html

This file was deleted.

3 changes: 0 additions & 3 deletions doc/_templates/page.html

This file was deleted.

65 changes: 56 additions & 9 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Declare information specific to this project.
project = u'HoloViews'
authors = u'IOAM: Jean-Luc R. Stevens, Philipp Rudiger, and James A. Bednar'
copyright = u'2015 ' + authors
copyright = u'2017 ' + authors
ioam_module = 'holoviews'
description = 'Stop plotting your data - annotate your data and let it visualize itself.'

Expand All @@ -33,9 +33,61 @@
""".format(url=ASSETS_URL, version=version)

# Override IOAM theme
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = 'holoviews_theme'
html_theme_path = ['.']
MAIN_SITE = '//holoviews.org'

html_context = {
'SITEMAP_BASE_URL': 'http://holoviews.org/', # Trailing slash is needed
'SITE_URL': '/',
'DESCRIPTION': 'HoloViews library, documentation site.',
'AUTHOR': 'HoloViews contributors',
'VERSION': version,
# Nav
'NAV': (
('About', MAIN_SITE + '/about.html'),
('Gallery', '/Gallery/index.html'),
('Docs', '//holoviews.org/'),
('Github', '//github.com/ioam/holoviews'),
),
# Links
'LINKS': (
('Getting started', 'Getting_Started/index.html'),
('User Guides', 'User_Guide/index.html'),
('Tutorials', 'Tutorials/index.html'),
('Gallery', 'Gallery/index.html'),
('Reference', 'Reference_Manual/index.html'),
('FAQ', 'FAQ.html'),
('About', 'about.html')
),
# About Links
'ABOUT': (
('About', MAIN_SITE + '/about.html')
),
# Social links
'SOCIAL': (
('Mailing list', '//gitter.im/ioam/holoviews'),
('Github', '//github.com/ioam/holoviews')
),
# Links for the docs sub navigation
'NAV_DOCS': (
('Getting started', 'Getting_Started/index'),
('User Guides', 'User_Guide/index'),
('Tutorials', 'Tutorials/index'),
('Gallery', 'Gallery/index'),
('Reference', 'Reference_Manual/index'),
('FAQ', 'FAQ'),
('About', 'about')
),
'css_server': os.environ.get('HOLOVIEWS_DOCS_CSS_SERVER', 'assets.holoviews.org'),
'js_includes': ['custom.js', 'require.js']
}

# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
html_logo = "my_logo.png"


html_logo = '_static/holoviews_logo.png'
html_favicon = '_static/favicon.ico'

Expand Down Expand Up @@ -90,17 +142,12 @@
'http://ipython.org/ipython-doc/2/': None,
'http://ioam.github.io/param/': None}

js_includes = ['require.js', 'bootstrap.js', 'custom.js', 'js/theme.js']

from builder.paramdoc import param_formatter
from nbpublisher import nbbuild


def setup(app):
app.connect('autodoc-process-docstring', param_formatter)
for js in js_includes:
app.add_javascript(js)

try:
import runipy # noqa (Warning import)
nbbuild.setup(app)
Expand Down
10 changes: 10 additions & 0 deletions doc/holoviews_theme/includes/ga.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-61554933-1', 'auto');
ga('send', 'pageview');

</script>
8 changes: 8 additions & 0 deletions doc/holoviews_theme/includes/searchbox.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="search-bar">
<form role="search" action="{{ pathto('search') }}" method="get">
<input type="search" name="q" placeholder="Search" />
<button type="submit">
<img src="https://raw.githubusercontent.com/thoughtbot/refills/master/source/images/search-icon-black.png" alt="Search Icon">
</button>
</form>
</div>
Loading

0 comments on commit aabf364

Please sign in to comment.