nibula 2.0.2 → 2.2.0
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 +68 -8
- package/CHANGELOG.md +108 -0
- package/bin/create.js +2 -25
- package/docs/Components.md +88 -47
- package/docs/Creating pages.md +4 -2
- package/docs/Deploy.md +185 -127
- package/docs/Head and SEO.md +99 -57
- package/docs/Project structure.md +3 -2
- package/docs/Styling with SCSS.md +3 -0
- package/package.json +3 -1
- package/src/frontend/layouts/base.njk +1 -1
- package/src/frontend/routes/404.njk +8 -3
- package/src/frontend/routes/index.njk +8 -3
- package/src/frontend/scss/_global.scss +3 -0
- package/src/frontend/scss/modules/_markdown.scss +1598 -0
- package/tools/assistant.js +21 -2
- package/tools/cli/prompt.js +99 -13
- package/tools/config/messages.json +1 -0
- package/tools/config/settings.json +10 -4
- package/tools/lib/files.js +5 -0
- package/tools/lib/layouts.js +15 -0
- package/tools/lib/pageActions.js +13 -5
- package/tools/lib/paths.js +1 -0
- package/tools/res/templates/template.njk +8 -3
|
@@ -17,7 +17,7 @@ your-project/
|
|
|
17
17
|
└── frontend/
|
|
18
18
|
├── assets/ # Images, fonts, brand files
|
|
19
19
|
│ └── brand/ # Favicons, logo etc
|
|
20
|
-
├── components/ # Reusable .njk fragments
|
|
20
|
+
├── components/ # Reusable .njk fragments and .md content
|
|
21
21
|
│ └── global/ # Header and footer, included in every page
|
|
22
22
|
├── data/ # site.json and pages.json
|
|
23
23
|
├── hosting/ # .htaccess and web.config
|
|
@@ -35,6 +35,7 @@ your-project/
|
|
|
35
35
|
| Add a page | `nib cli` → creates the files in `routes/`, `scss/pages/`, `js/pages/` |
|
|
36
36
|
| Write the content of a page | `routes/` |
|
|
37
37
|
| Build a reusable block of markup | `components/` |
|
|
38
|
+
| Write long prose in Markdown | `components/` — see docs/Components.md |
|
|
38
39
|
| Change the header or footer | `components/global/` |
|
|
39
40
|
| Style one page | `scss/pages/` |
|
|
40
41
|
| Style every page | `scss/_global.scss` |
|
|
@@ -57,7 +58,7 @@ your-project/
|
|
|
57
58
|
|
|
58
59
|
Subfolders are allowed wherever content is yours to organize:
|
|
59
60
|
|
|
60
|
-
- `components/` — nest as deep as you like; includes take the path relative to `components
|
|
61
|
+
- `components/` — nest as deep as you like; includes take the path relative to `components/`, and so does the `markdownPath` filter
|
|
61
62
|
- `scss/modules/` and `js/modules/` — same idea, remember to update the relative import paths
|
|
62
63
|
- `layouts/` — extra layouts alongside `base.njk`; routes pick one by filename
|
|
63
64
|
- `backend/api/public/` and `protected/` — subfolders become part of the URL
|
|
@@ -78,6 +78,9 @@ body {
|
|
|
78
78
|
| `_footer.scss` | Footer styles |
|
|
79
79
|
| `_mobile.scss` | Media query rules |
|
|
80
80
|
| `_animations.scss` | Keyframe animations (`fade-in`, `spin`) |
|
|
81
|
+
| `_markdown.scss` | Styling for Markdown rendered with `renderFile`. See **Components** DOC file |
|
|
82
|
+
|
|
83
|
+
> If you don't use Markdown files as components, comment its import from `_global.scss`.
|
|
81
84
|
|
|
82
85
|
## CSS Framework
|
|
83
86
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nibula",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
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",
|
|
@@ -63,6 +63,8 @@
|
|
|
63
63
|
"esbuild": "^0.27.3",
|
|
64
64
|
"foundation-sites": "^6.9.0",
|
|
65
65
|
"glob": "^13.0.6",
|
|
66
|
+
"markdown-it-anchor": "^9.2.1",
|
|
67
|
+
"markdown-it-attrs": "^5.0.1",
|
|
66
68
|
"sass": "^1.77.0",
|
|
67
69
|
"uikit": "^3.25.13"
|
|
68
70
|
}
|
|
@@ -4,7 +4,12 @@ permalink: "404.html"
|
|
|
4
4
|
layout: base.njk
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
{# To keep order, create a new component in components/ and include it here #}
|
|
8
|
+
{% include "not-found.njk" ignore missing %}
|
|
9
9
|
|
|
10
|
-
{
|
|
10
|
+
{# Markdown files live in components/ too. Pass the data the file needs #}
|
|
11
|
+
{#
|
|
12
|
+
<article class="markdown-body">
|
|
13
|
+
{% renderFile "your-file.md" | markdownPath, { site: site } %}
|
|
14
|
+
</article>
|
|
15
|
+
#}
|
|
@@ -4,7 +4,12 @@ permalink: "/"
|
|
|
4
4
|
layout: base.njk
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
{# To keep order, create a new component in components/ and include it here #}
|
|
8
|
+
{% include "welcome.njk" ignore missing %}
|
|
9
9
|
|
|
10
|
-
{
|
|
10
|
+
{# Markdown files live in components/ too. Pass the data the file needs #}
|
|
11
|
+
{#
|
|
12
|
+
<article class="markdown-body">
|
|
13
|
+
{% renderFile "your-file.md" | markdownPath, { site: site } %}
|
|
14
|
+
</article>
|
|
15
|
+
#}
|