Giter Club home page Giter Club logo

Comments (2)

Eric-Arellano avatar Eric-Arellano commented on June 27, 2024

This is only broken on Qiskit version 0.43 https://qiskit.org/documentation/stable/0.43/index.html. It works everywhere else, including https://qiskit.org/documentation/stable/0.44/index.html. To reproduce, you go to the stable version and then try clicking any other release in the Previous Releases left tab.

There are three builds to compare:

--

Between 0.43 and 0.44, the major difference is that 0.43 sets the option docs_url_prefix to documentation/stable/<version> whereas 0.44 always keeps it to documentation/:

https://github.com/Qiskit/qiskit-metapackage/blob/2b423d04dfb799650c1459b0e0d8a70dc1d095f3/tools/deploy_documentation_tag.sh#L36-L36

https://github.com/Qiskit/qiskit/blob/39b0cb82ab2f3bce5aee663ec1f1e0817aca71db/docs/conf.py#L34-L36

Jake was correct when he moved the docs config to always use documentation/. That is a bug to set it to include /stable, and it explains why the URL has /stable twice:

return f"/{docs_url_prefix}/stable/{version}/index.html"

--

So, then the only remaining question is why did this work in 0.42 and prior versions? In 0.42 and earlier, the option was called content_prefix:

https://github.com/Qiskit/qiskit-metapackage/blob/96f760475cb6ed9969c574dd6d79eec49165e930/tools/deploy_documentation_tag.sh#L36-L36

At that point, our previous versions logic ignored content_prefix and the code solely worked for Qiskit Terra:

{% for version in version_list | sort(reverse=True) %}
<dd><a class="version" href="/documentation/stable/{{ version }}/index.html">{{ version }}</a></dd>
{% endfor %}

We used content_prefix for translations only:

def _get_url(config, base, pagename):
return _add_content_prefix(config, '%s/%s.html' % (base, pagename))
def _add_content_prefix(config, url):
prefix = ''
if config.content_prefix:
prefix = '/%s' % config.content_prefix
return '%s%s' % (prefix, url)

def _get_translation_url(config, code, pagename):
base = '/locale/%s' % code if code and code != default_language else ''
return _get_url(config, base, pagename)

Note that we don't deploy translations to versions, though! So the config was always bogus. If you click the language drop down on https://qiskit.org/documentation/stable/0.42/locale/bn_BN/index.html, it 404s, even though we had those translations provided in 0.42.

#321 replaced content_prefix with docs_url_prefix to fix Ecosystem projects using Previous Releases, which previously did not work. The implementation was sound in #321, but it was not correct to keep setting content_prefix=documentation/stable/<version> and to rename that to docs_url_prefix.

from qiskit_sphinx_theme.

Eric-Arellano avatar Eric-Arellano commented on June 27, 2024

This is now fixed via a manual redeploy of the 0.43 docs with keeping docs_url_prefix only set to documentation/. https://qiskit.org/documentation/stable/0.43/tutorials.html

from qiskit_sphinx_theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.