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"
```
This commit is contained in:
Peter Mosses
2024-04-01 19:59:07 +02:00
committed by GitHub
parent 7de5f7abe5
commit 328893dd30
2 changed files with 4 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
---
layout: null
---
(function (jtd, undefined) {