_includes: scripts: Disable caching

This is causing issues when building translations, as it would cache
the first language and use that across the board.
This commit is contained in:
lifehackerhansol 2024-01-13 10:11:26 -08:00
parent b16fafab4f
commit f4d0b8c942
No known key found for this signature in database
GPG key ID: 80FB184AFC0B3B0E
3 changed files with 12 additions and 10 deletions

View file

@ -226,7 +226,6 @@ plugins:
- jekyll-sitemap - jekyll-sitemap
- jekyll-gist - jekyll-gist
- jekyll-feed - jekyll-feed
- jekyll-include-cache
# mimic GitHub Pages with --safe # mimic GitHub Pages with --safe
whitelist: whitelist:
@ -234,7 +233,6 @@ whitelist:
- jekyll-sitemap - jekyll-sitemap
- jekyll-gist - jekyll-gist
- jekyll-feed - jekyll-feed
- jekyll-include-cache
# Archives # Archives

View file

@ -6,17 +6,19 @@
<script src="{{ '/assets/js/main.min.js' | relative_url }}"></script> <script src="{{ '/assets/js/main.min.js' | relative_url }}"></script>
{% endif %} {% endif %}
<!-- hacks-guide change start: Disable caching -->
{% if site.search == true or page.layout == "search" %} {% if site.search == true or page.layout == "search" %}
{%- assign search_provider = site.search_provider | default: "lunr" -%} {%- assign search_provider = site.search_provider | default: "lunr" -%}
{%- case search_provider -%} {%- case search_provider -%}
{%- when "lunr" -%} {%- when "lunr" -%}
{% include_cached search/lunr-search-scripts.html %} {% include search/lunr-search-scripts.html %}
{%- when "google" -%} {%- when "google" -%}
{% include_cached search/google-search-scripts.html %} {% include search/google-search-scripts.html %}
{%- when "algolia" -%} {%- when "algolia" -%}
{% include_cached search/algolia-search-scripts.html %} {% include search/algolia-search-scripts.html %}
{%- endcase -%} {%- endcase -%}
{% endif %} {% endif %}
<!-- hacks-guide change end -->
{% include analytics.html %} {% include analytics.html %}
{% include /comments-providers/scripts.html %} {% include /comments-providers/scripts.html %}

View file

@ -14,10 +14,11 @@
{% include head/custom.html %} {% include head/custom.html %}
</head> </head>
<!-- hacks-guide change start: Disable caching -->
<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}"> <body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">
{% include_cached skip-links.html %} {% include skip-links.html %}
{% include_cached browser-upgrade.html %} {% include browser-upgrade.html %}
{% include_cached masthead.html %} {% include masthead.html %}
<div class="initial-content"> <div class="initial-content">
{{ content }} {{ content }}
@ -25,16 +26,17 @@
{% if site.search == true %} {% if site.search == true %}
<div class="search-content"> <div class="search-content">
{% include_cached search/search_form.html %} {% include search/search_form.html %}
</div> </div>
{% endif %} {% endif %}
<div id="footer" class="page__footer"> <div id="footer" class="page__footer">
<footer> <footer>
{% include footer/custom.html %} {% include footer/custom.html %}
{% include_cached footer.html %} {% include footer.html %}
</footer> </footer>
</div> </div>
<!-- hacks-guide change end -->
{% include scripts.html %} {% include scripts.html %}