Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Issues while Migrating to Sphinx-Bootstrap-Theme #196

Open
EfstathiadisDimitris opened this issue Apr 22, 2019 · 2 comments
Open

Comments

@EfstathiadisDimitris
Copy link

EfstathiadisDimitris commented Apr 22, 2019

I am re-writing the base problem since I managed to move a couple of steps forward with this. My main problems are still present though.

  1. Bootstrap CSS/JS with a dependancy on JQuery is not working on me, thus making the navigation, and dropdowns, Mobile View, etc, not working correctly.

My conf.py is almost similar to the sample, you give in the repo, but still I am unable to make it work. I can provide it if you want on a later date. Currently, since JQuery is a hard dependancy on bootstrap, I added it through a CDN on the layout.html, but with no luck:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

I even tried multiple version, from 1.2.x to 3.1.x but with no luck there. The error I get on this is the following:

jquery.js:2 Uncaught TypeError: $.getQueryParameters is not a function
    at Object.highlightSearchWords (doctools.js:221)
    at Object.init (doctools.js:151)
    at HTMLDocument.<anonymous> (doctools.js:314)
    at j (jquery.js:2)
    at k (jquery.js:2)

I also get the following error, regarding the sourceMaps of bootstrap, which should be included with JQuery, but since JQuery isn't being loaded they aren't either:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (bootstrap.min.css.map, line 0)
  1. My globaltoc.html, isn't being printed in the left sidebar. Here is what I am doing under _templtates/globaltoc.html.
{# basic/globaltoc.html #}

<h5><a href="{{ pathto(master_doc) }}">{{ _('Table of Contents') }}</a></h5>
{{ toctree() }}

And in my conf.py, I have this reference, so from what I am reading this should be working, but it doesn't:

# The master toctree document. You need to include that in the globaltoc.html in the _static
master_doc = 'index'

The only thing, I can get to appear on the sidebar, is the title Table of Contents.

These are my main problems, still, have more but one set of problems at a time. Some information about my system just to be precise and help you help me:

System: MacOS Mojave,
Sphinx Version: sphinx-build 1.8.5

@ryan-roemer
Copy link
Owner

Can you run the demo from this repo successfully? https://github.com/ryan-roemer/sphinx-bootstrap-theme#contributing

The constraints IIRC is that Sphinx comes with a jQuery and Bootstrap requires one. If the two are suddenly now compatible, I'm open to this theme removing our jQuery copy + adapter JS files at https://github.com/ryan-roemer/sphinx-bootstrap-theme/tree/master/sphinx_bootstrap_theme/bootstrap/static/js completely...

@ryan-roemer
Copy link
Owner

Unrelated side note:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (bootstrap.min.css.map, line 0)

Missing any *.map files is just informative and should not impact the actual workings of anything CSS or JS related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants