-
Notifications
You must be signed in to change notification settings - Fork 54
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
Previous/Next links not rendered correctly in recent PR doc build sites #502
Comments
It looks like this is related to the
I have 0.7.2 installed locally, and the In [2]: pydata_sphinx_theme.__version__
Out[2]: '0.7.2' <!-- Previous / next buttons -->
<div class='prev-next-area'>
{%- if prev %}
<a class='left-prev' id="prev-link" href="{{ prev.link|e }}" title="{{ _('previous') }} {{ _('page') }}">
<i class="fas fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">{{ _("previous") }}</p>
<p class="prev-next-title">{{ prev_title or prev.title }}</p>
</div>
</a>
{%- endif %}
{%- if next %}
<a class='right-next' id="next-link" href="{{ next.link|e }}" title="{{ _('next') }} {{ _('page') }}">
<div class="prev-next-info">
<p class="prev-next-subtitle">{{ _("next") }}</p>
<p class="prev-next-title">{{ next_title or next.title }}</p>
</div>
<i class="fas fa-angle-right"></i>
</a>
{%- endif %}
</div> |
Pinning Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 1054, in handle_page
output = self.templates.render(templatename, ctx)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/readthedocs_ext/readthedocs.py", line 185, in rtd_render
content = old_render(template, render_context)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/jinja2glue.py", line 192, in render
return self.environment.get_template(template).render(context)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/jinja2/environment.py", line 1291, in render
self.environment.handle_exception()
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/themes/basic/page.html", line 10, in top-level template code
{%- extends "layout.html" %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx_book_theme/layout.html", line 30, in top-level template code
{% set single_page = " single-page" %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/pangeo_sphinx_book_theme/../pydata_sphinx_theme/layout.html", line 2, in top-level template code
{%- import "static/webpack-macros.html" as _webpack with context %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/themes/basic/../basic/layout.html", line 174, in top-level template code
{%- block content %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/pangeo_sphinx_book_theme/../pydata_sphinx_theme/layout.html", line 75, in block 'content'
{% block docs_main %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx_book_theme/layout.html", line 35, in block 'docs_main'
{% block docs_body %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx_book_theme/layout.html", line 36, in block 'docs_body'
{% include "topbar.html" %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx_book_theme/topbar.html", line 53, in top-level template code
{%- include "docs-toc.html" %}
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/jinja2glue.py", line 213, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: docs-toc.html
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/cmd/build.py", line 280, in build_main
app.build(args.force_all, filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/application.py", line 352, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 296, in build_update
self.build(to_build,
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 360, in build
self.write(docnames, list(updated_docnames), method)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 534, in write
self._write_serial(sorted(docnames))
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 544, in _write_serial
self.write_doc(docname, doctree)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 611, in write_doc
self.handle_page(docname, ctx, event_arg=doctree)
File "/home/docs/checkouts/readthedocs.org/user_builds/pangeo-forge/envs/503/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 1061, in handle_page
raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") %
sphinx.errors.ThemeError: An error happened in rendering the page index.
Reason: TemplateNotFound('docs-toc.html')
Theme error:
An error happened in rendering the page index.
Reason: TemplateNotFound('docs-toc.html') |
Hi @rabernat and @norlandrhagen, are either of you seeing this issue? I just had a look at the latest docs build for #516, and I'm still seeing it on my side, e.g. https://pangeo-forge--516.org.readthedocs.build/en/516/pangeo_forge_recipes/tutorials/index.html Although my previous attempt at a fix that pins |
@derekocallaghan , yeah definitely rendering strange for me. |
Thanks, that's what I'm seeing too |
Closed by #534. Thanks @derekocallaghan for your attention to this! |
In recent PRs, the Previous/Next links are rendered correctly in the corresponding PR doc build sites, e.g. scroll to the bottom of the following:
However, the same links in PR doc builds from this week don't look right, e.g.
I don't have a fix for this yet, but looking at the HTML source, it looks like the classes are different.
Correct rendering (e.g. #487):
Incorrect rendering (e.g #500):
The text was updated successfully, but these errors were encountered: