This page (and hopefully sub-pages) is a WIP. Some parts of the site are a bit tricky, so let's try to share what we've found here!


When updating the website's navigation, you have two different code areas to update: one for desktop and one for mobile.

  • navbar.html - contains the code for the nav bar
  • sidebar.js - manages the Sphinx sidebars (the left sidebar in the current incarnation), and these behave differently depending on the current page

For example, if you want to add a new API, you need to make changes in the following spots in navbar.html.

Change 1: Around Lines 18-28...

<span id="dropdown-menu-position-anchor">
<a href="#" class="main-nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">API <span class="caret"></span></a>
<ul id="package-dropdown-menu" class="dropdown-menu navbar-menu">
<li><a class="main-nav-link" href="{{url_root}}api/python/index.html">Python</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/c++/index.html">C++</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/scala/index.html">Scala</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/julia/index.html">Julia</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/perl/index.html">Perl</a></li>
<li><a class="main-nav-link" href="{{url_root}}api/r/index.html">R</a></li>

Change 2 (for mobile): Around Line 74...

 {% for lang in ['Python', 'Scala', 'R', 'Julia', 'C++', 'Perl'] %}

Change 3: At the top of sidebar.js

  • No labels