mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-04 03:01:23 -06:00
Fix: protect search-data.json
file from front matter default for layout (#1468)
Fixes #1466. Prior art: #1447. Otherwise self-explanatory. To test: 1. First, clone [template repository](https://github.com/just-the-docs/just-the-docs-template/tree/main). Observe that search works. 2. Next, add a default layout to all files ```yml defaults: - scope: path: "" values: layout: "default" ``` 3. Observe that search no longer works. 4. Apply this patch 5. Observe that search works again!
This commit is contained in:
parent
1b79df8ebb
commit
2dd535c2da
@ -18,11 +18,14 @@ This website is built from the `HEAD` of the `main` branch of the theme reposito
|
|||||||
Code changes to `main` that are *not* in the latest release:
|
Code changes to `main` that are *not* in the latest release:
|
||||||
|
|
||||||
- Added: `nav_enabled` site, layout, and page-level variable to selectively show or hide the side/mobile menu by [@kevinlin1] in [#1441]. The minimal layout was reimplemented using this feature, and now has support for the site-wide search bar and auxiliary links.
|
- Added: `nav_enabled` site, layout, and page-level variable to selectively show or hide the side/mobile menu by [@kevinlin1] in [#1441]. The minimal layout was reimplemented using this feature, and now has support for the site-wide search bar and auxiliary links.
|
||||||
|
- Fixed: protect `search-data.json` file from front matter default for layout by [@mattxwang] in [#1468]
|
||||||
|
|
||||||
Docs changes made since the latest release:
|
Docs changes made since the latest release:
|
||||||
|
|
||||||
- Docs: Explained the `nav_enabled` variables as an alternative to using the minimal layout [@kevinlin1] in [#1441].
|
- Docs: Explained the `nav_enabled` variables as an alternative to using the minimal layout [@kevinlin1] in [#1441].
|
||||||
|
|
||||||
|
[#1468]: https://github.com/just-the-docs/just-the-docs/pull/1468
|
||||||
|
|
||||||
## Release v0.8.2
|
## Release v0.8.2
|
||||||
|
|
||||||
Hi everyone! This patch release fixes a bug where a default layout with unrestricted `scope` (`path: ""`) breaks JavaScript functionality. Users who do not use a default layout with unrestricted `scope` should not be affected. This should be a straightforward upgrade for all users. Thank you to [@pdmosses] for triaging and fixing the bug!
|
Hi everyone! This patch release fixes a bug where a default layout with unrestricted `scope` (`path: ""`) breaks JavaScript functionality. Users who do not use a default layout with unrestricted `scope` should not be affected. This should be a straightforward upgrade for all users. Thank you to [@pdmosses] for triaging and fixing the bug!
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
layout: null
|
||||||
permalink: /assets/js/search-data.json
|
permalink: /assets/js/search-data.json
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,7 @@ namespace :search do
|
|||||||
|
|
||||||
File.open('assets/js/zzzz-search-data.json', 'w') do |f|
|
File.open('assets/js/zzzz-search-data.json', 'w') do |f|
|
||||||
f.puts '---
|
f.puts '---
|
||||||
|
layout: null
|
||||||
permalink: /assets/js/search-data.json
|
permalink: /assets/js/search-data.json
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user