From 328893dd3045d4b4ebc9f5ae1a78f3610b919f96 Mon Sep 17 00:00:00 2001 From: Peter Mosses <18308236+pdmosses@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:59:07 +0200 Subject: [PATCH] Fix: Protect theme JS file from front matter default for layout (#1447) Fix #1445 Front matter defaults with unrestricted `scope` (`path: ""`) can affect theme code files. [Jekyll](https://jekyllrb.com/docs/front-matter/#predefined-global-variables) supports using `null` to "produce a file without using a layout file". This PR adds `layout: null` to `just-the-docs.js`, to avoid this file being affected by the following front matter defaults: ```yaml defaults: - scope: path: "" values: layout: "default" ``` --- CHANGELOG.md | 4 +++- assets/js/just-the-docs.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c25853b..2bd609b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,12 +17,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: -- N/A +- Fixed: Protect theme JS file from front matter default for layout by [@pdmosses] in [#1447] Docs changes made since the latest release: - N/A +[#1447]: https://github.com/just-the-docs/just-the-docs/pull/1447 + ## Release v0.8.1 Hi folks! This patch release fixes a bug introduced in `0.8.0` that affects users who build their sites in strict mode. It is a straightforward upgrade that should require no manual migration changes. Thank you to [@Zarthus] for quickly catching and fixing this bug! diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js index 2c79f76..74164ef 100644 --- a/assets/js/just-the-docs.js +++ b/assets/js/just-the-docs.js @@ -1,4 +1,5 @@ --- +layout: null --- (function (jtd, undefined) {