Fix accidental disabling of forward-declared stylesheets (#1373)

PR for the issue flagged in https://github.com/just-the-docs/just-the-docs/discussions/1359#discussioncomment-7267686 (and related to #1358, #1350, etc.). This PR essentially just disables the `head-nav` stylesheet by ID instead of relying on the index; this makes the code more robust against stylesheets that are arbitrarily entered into the document (such as by JavaScript, which is the case of #1359).
This commit is contained in:
Matt Wang
2023-10-25 11:52:44 -07:00
committed by GitHub
parent 56e0f1c800
commit 80bd7bfc9f
3 changed files with 18 additions and 12 deletions

View File

@@ -5,7 +5,7 @@
Results in: HTML for the head element.
Includes:
css/activation.scss.liquid, head_custom.html.
Overwrites:
Overwrites:
ga_tracking_ids, ga_property, file, favicon.
Should not be cached, because included files depend on page.
{%- endcomment -%}
@@ -15,9 +15,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-head-nav.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-head-nav.css' | relative_url }}" id="jtd-head-nav-stylesheet">
<style id="jtd-nav-activation">
{% include css/activation.scss.liquid %}
</style>