nibula 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,29 @@ All notable changes to Nibula are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.2.2] - 2026-08-19
9
+
10
+ ### Fixed
11
+ - The commented `renderFile` example in the page template now passes `"md"` as
12
+ the format argument. Without it Eleventy also ran the file through Nunjucks, so
13
+ a `.md` containing template syntax — a code sample with `{{ }}` or `{% %}` in
14
+ it — broke the build instead of rendering as text.
15
+
16
+ ## [2.2.1] - 2026-08-18
17
+
18
+ ### Fixed
19
+ - Renaming a page left the old `title` in the route's front matter. Only
20
+ `permalink` was rewritten, so a page renamed from `about` to `company` kept
21
+ `title: "about"` while its stylesheet, script and `pages.json` record had all
22
+ moved to `company`. The title is what the layout uses to load a page's CSS and
23
+ JS and to look up its SEO record, so the renamed page silently lost its styles,
24
+ its scripts and everything set under its `pages.json` entry.
25
+
26
+ ### Notes
27
+ - Pages renamed with an earlier version keep the stale title. Open the route in
28
+ `src/frontend/routes/` and set `title` to the camelCase form of the new page
29
+ name — `company-profile` becomes `companyProfile`.
30
+
8
31
  ## [2.2.0] - 2026-08-18
9
32
 
10
33
  ### Added
@@ -13,8 +13,6 @@ src/frontend/components/
13
13
  ├── global/
14
14
  │ ├── header.njk
15
15
  │ └── footer.njk
16
- ├── modals/
17
- │ └── privacyModal.njk
18
16
  ├── not-found.njk
19
17
  ├── welcome.njk
20
18
  ```
@@ -88,7 +86,7 @@ Open the page's file in `src/frontend/routes/` and add this line to its body:
88
86
 
89
87
  ```html
90
88
  <article class="markdown-body">
91
- {% renderFile "article.md" | markdownPath, { site: site } %}
89
+ {% renderFile "article.md" | markdownPath, { site: site }, "md" %}
92
90
  </article>
93
91
  ```
94
92
 
@@ -100,6 +98,7 @@ Four parts to it:
100
98
  | `renderFile` | turns the Markdown into HTML and puts it in the page |
101
99
  | `markdownPath` | fills in the `src/frontend/components/` part of the path for you |
102
100
  | `{ site: site }` | hands the file your site settings — see below |
101
+ | `"md"` | specifies that the rendering should be done as Markdown, ignoring the njk engine associated by default with the file extension |
103
102
 
104
103
  Subfolders work the same way as with components:
105
104
  `"legal/privacy.md" | markdownPath`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nibula",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "A beginner-friendly static site generator built on Eleventy that stays close to vanilla HTML, CSS and JS — with a page-management CLI, an optional PHP backend, and SEO files generated for you.",
5
5
  "keywords": [
6
6
  "11ty",
@@ -10,6 +10,6 @@ layout: base.njk
10
10
  {# Markdown files live in components/ too. Pass the data the file needs #}
11
11
  {#
12
12
  <article class="markdown-body">
13
- {% renderFile "your-file.md" | markdownPath, { site: site } %}
13
+ {% renderFile "your-file.md" | markdownPath, { site: site }, "md" %}
14
14
  </article>
15
15
  #}
@@ -10,6 +10,6 @@ layout: base.njk
10
10
  {# Markdown files live in components/ too. Pass the data the file needs #}
11
11
  {#
12
12
  <article class="markdown-body">
13
- {% renderFile "your-file.md" | markdownPath, { site: site } %}
13
+ {% renderFile "your-file.md" | markdownPath, { site: site }, "md" %}
14
14
  </article>
15
15
  #}
@@ -15,7 +15,7 @@ const FRONT_MATTER_PATTERNS = Object.freeze({
15
15
  });
16
16
 
17
17
  const ROUTE_FRONT_MATTER_KEYS = ['title', 'permalink'];
18
- const RENAME_FRONT_MATTER_KEYS = ['permalink'];
18
+ const RENAME_FRONT_MATTER_KEYS = ['title', 'permalink'];
19
19
  const LAYOUT_KEY = 'layout';
20
20
 
21
21
  function templatePath(name) {
@@ -10,6 +10,6 @@ layout: base.njk
10
10
  {# Markdown files live in components/ too. Pass the data the file needs #}
11
11
  {#
12
12
  <article class="markdown-body">
13
- {% renderFile "your-file.md" | markdownPath, { site: site } %}
13
+ {% renderFile "your-file.md" | markdownPath, { site: site }, "md" %}
14
14
  </article>
15
15
  #}