nibula 2.4.0 → 2.4.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/.eleventy.js CHANGED
@@ -47,6 +47,23 @@ module.exports = function (eleventyConfig) {
47
47
  });
48
48
 
49
49
  eleventyConfig.amendLibrary("md", (markdownLibrary) => {
50
+ markdownLibrary.renderer.rules.link_open = function (
51
+ tokens,
52
+ idx,
53
+ options,
54
+ env,
55
+ self,
56
+ ) {
57
+ const href = tokens[idx].attrGet("href");
58
+
59
+ if (href && (href.startsWith("http://") || href.startsWith("https://"))) {
60
+ tokens[idx].attrSet("target", "_blank");
61
+ tokens[idx].attrSet("rel", "noopener noreferrer");
62
+ }
63
+
64
+ return self.renderToken(tokens, idx, options);
65
+ };
66
+
50
67
  markdownLibrary
51
68
  .use(markdownItAnchor, {
52
69
  level: ANCHOR_LEVELS,
@@ -70,6 +87,16 @@ module.exports = function (eleventyConfig) {
70
87
  // Passthrough copy
71
88
  // ---------------------------------------------------------------------------
72
89
 
90
+ eleventyConfig.addPassthroughCopy({
91
+ // Prism syntax highlighting theme
92
+ "node_modules/prismjs/themes/prism-tomorrow.css": "css/prism.css",
93
+
94
+ // Bootstrap
95
+ "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js":
96
+ "js/bootstrap.bundle.min.js",
97
+ "node_modules/bootstrap-icons/font/fonts": "css/fonts",
98
+ });
99
+
73
100
  // Project assets
74
101
  eleventyConfig.addPassthroughCopy("src/frontend/assets");
75
102
  eleventyConfig.addPassthroughCopy("src/frontend/robots.txt");
@@ -80,12 +107,7 @@ module.exports = function (eleventyConfig) {
80
107
  "src/frontend/hosting/web.config": "web.config",
81
108
  });
82
109
 
83
- // Prism syntax highlighting theme
84
- eleventyConfig.addPassthroughCopy({
85
- "node_modules/prismjs/themes/prism-tomorrow.css": "css/prism.css",
86
- });
87
-
88
- // CSS frameworks — uncomment the one you are using
110
+ // node_modules dependencies
89
111
  eleventyConfig.addPassthroughCopy({
90
112
  // Bootstrap
91
113
  "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js":
@@ -107,7 +129,7 @@ module.exports = function (eleventyConfig) {
107
129
  // ---------------------------------------------------------------------------
108
130
 
109
131
  eleventyConfig.addFilter(
110
- "markdownPath",
132
+ "componentsPath",
111
133
  (name) => `${MARKDOWN_BASE_PATH}${name}`,
112
134
  );
113
135
 
@@ -145,7 +167,7 @@ module.exports = function (eleventyConfig) {
145
167
  // ---------------------------------------------------------------------------
146
168
 
147
169
  return {
148
- markdownTemplateEngine: TEMPLATE_ENGINE,
170
+ markdownTemplateEngine: "njk",
149
171
  htmlTemplateEngine: TEMPLATE_ENGINE,
150
172
 
151
173
  dir: {
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ 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
+
9
+ ## [2.4.2] 2026-08-24
10
+
11
+ ### Fixed
12
+ - Fixed markdown file components not acepting some of njk keywords
13
+
14
+ ## [2.4.1] 2026-08-24
15
+
16
+ ### Changed
17
+ - Changed template.njk snippets for renderFile
18
+ - markdown files used as components will now require {class="class"} or {id="id"} instead of {#id} or {.class}
19
+
20
+ ### Fixed
21
+ - Fixed json data files passed in renderfile to markdown files not rendering
22
+
8
23
  ## [2.4.0] - 2026-08-23
9
24
 
10
25
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nibula",
3
- "version": "2.4.0",
3
+ "version": "2.4.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
  <div class="markdown-body">
13
- {% renderFile "your-file.md" | markdownPath, { site: site }, "md" %}
13
+ {% renderFile "your-file.md" | componentsPath, { alias: fileName }, "njk,md" %}
14
14
  </div>
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
  <div class="markdown-body">
13
- {% renderFile "your-file.md" | markdownPath, { site: site }, "md" %}
13
+ {% renderFile "your-file.md" | componentsPath, { alias: fileName }, "njk,md" %}
14
14
  </div>
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
  <div class="markdown-body">
13
- {% renderFile "your-file.md" | markdownPath, { site: site }, "md" %}
13
+ {% renderFile "your-file.md" | componentsPath, { alias: fileName }, "njk,md" %}
14
14
  </div>
15
15
  #}