How to edit Sidebar under Sphinx Alabaster theme

I finally fixed it the following way

In the Sphinx's _template directory create a file called foo.html.

The content may look something like this:

<hr />
<p>
<h2 class='logo'>
<a href="https://foo.bar.com/">Web Version</a>
</h2>
</p>

Finally in conf.py add this:

html_sidebars = {
        '**': [
                 'localtoc.html',
                 'relations.html',
                 'searchbox.html',
                 # located at _templates/
                 'foo.html',
            ]

        }

At the end it looks like this:

enter image description here


I can propose something for the first question. I'm in no way an expert in CSS so my solution isn't probably the more elegant one, but it works ! Put in your 'source/_static/custom.css' file :

.sphinxsidebar a.reference.internal[href='#'] {
  display: none;
}

Maybe a CSS expert should give a better selector …