Skip to content

Add relative path to current page to (icon) links in header? #1203

Answered by jpfeuffer
jpfeuffer asked this question in Q&A
Discussion options

You must be logged in to vote

I figured it out:

_templates/navbar-run-binder.html

<div class="navbar-end-item">
  <ul id="navbar-icon-links" class="navbar-nav" aria-label="Icon Links">
  <li class="nav-item">
    <a href="https://mybinder.org/v2/gh/{{ github_user }}/{{ github_repo }}/{{ github_version }}+ipynb?urlpath=lab/tree/{{ doc_path }}{{ pagename }}.ipynb" title="" class="nav-link" rel="noopener" target="_blank" data-toggle="tooltip" data-original-title="Launch on Binder"><span><i class="fa fa-rocket"></i></span>
      <label class="sr-only">Launch on Binder</label></a>
  </li>
</ul>
</div>

conf.py

html_theme_options = {
    "navbar_end": ["navbar-run-binder", "navbar-icon-links"],
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jpfeuffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant