@anyblades/buildawesome-kit 1.3.0-alpha.2 → 1.3.0-alpha.4
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/package.json +19 -20
- package/{plugin/scripts → scripts}/package.json +3 -1
- package/.gitmodules +0 -3
- package/.prettierrc.json +0 -3
- package/LICENSE.md +0 -21
- package/README.md +0 -218
- package/buildawesome.config.js +0 -141
- package/plugin/node_modules/.package-lock.json +0 -22
- package/plugin/package-lock.json +0 -42
- package/plugin/package.json +0 -48
- /package/{plugin/features → features}/autoLinkFavicons.js +0 -0
- /package/{plugin/features → features}/autoLinkFavicons.test.js +0 -0
- /package/{plugin/features → features}/mdAutoNl2br.js +0 -0
- /package/{plugin/features → features}/mdAutoNl2br.test.js +0 -0
- /package/{plugin/features → features}/mdAutoRawTags.js +0 -0
- /package/{plugin/features → features}/mdAutoRawTags.test.js +0 -0
- /package/{plugin/features → features}/mdAutoUncommentAttrs.js +0 -0
- /package/{plugin/features → features}/mdAutoUncommentAttrs.test.js +0 -0
- /package/{plugin/features → features}/siteData.js +0 -0
- /package/{plugin/features → features}/siteData.test.js +0 -0
- /package/{plugin/features → features}/virtualPages.js +0 -0
- /package/{plugin/filters → filters}/attr_concat.js +0 -0
- /package/{plugin/filters → filters}/attr_concat.test.js +0 -0
- /package/{plugin/filters → filters}/attr_includes.js +0 -0
- /package/{plugin/filters → filters}/attr_includes.test.js +0 -0
- /package/{plugin/filters → filters}/attr_set.js +0 -0
- /package/{plugin/filters → filters}/attr_set.test.js +0 -0
- /package/{plugin/filters → filters}/date.js +0 -0
- /package/{plugin/filters → filters}/date.test.js +0 -0
- /package/{plugin/filters → filters}/fetch.js +0 -0
- /package/{plugin/filters → filters}/if.js +0 -0
- /package/{plugin/filters → filters}/if.test.js +0 -0
- /package/{plugin/filters → filters}/merge.js +0 -0
- /package/{plugin/filters → filters}/merge.test.js +0 -0
- /package/{plugin/filters → filters}/remove_tag.js +0 -0
- /package/{plugin/filters → filters}/remove_tag.test.js +0 -0
- /package/{plugin/filters → filters}/section.js +0 -0
- /package/{plugin/filters → filters}/section.test.js +0 -0
- /package/{plugin/filters → filters}/split.js +0 -0
- /package/{plugin/filters → filters}/split.test.js +0 -0
- /package/{plugin/filters → filters}/strip_tag.js +0 -0
- /package/{plugin/filters → filters}/strip_tag.test.js +0 -0
- /package/{plugin/filters → filters}/unindent.js +0 -0
- /package/{plugin/filters → filters}/unindent.test.js +0 -0
- /package/{plugin/plugin.js → plugin.js} +0 -0
- /package/{plugin/plugin.test.js → plugin.test.js} +0 -0
- /package/{plugin/scripts → scripts}/README.md +0 -0
package/package.json
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anyblades/buildawesome-kit",
|
|
3
|
-
"version": "1.3.0-alpha.
|
|
3
|
+
"version": "1.3.0-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"@anyblades/blades": "^2.4.6",
|
|
10
|
-
"@anyblades/buildawesome-kit-plugin": "^1.3.0-alpha.2",
|
|
11
|
-
"@uncenter/eleventy-plugin-toc": "^2.1.1",
|
|
12
|
-
"markdown-it": "^14.1.0",
|
|
13
|
-
"markdown-it-anchor": "^9.2.0",
|
|
14
|
-
"markdown-it-attrs": "^4.3.1",
|
|
15
|
-
"yaml": "^2.9.0"
|
|
5
|
+
"main": "./plugin.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./plugin.js",
|
|
8
|
+
"./features/*": "./features/*"
|
|
16
9
|
},
|
|
17
10
|
"peerDependencies": {
|
|
18
11
|
"@11ty/eleventy": "^3.0.0 || ^4.0.0-0",
|
|
19
|
-
"@awesome.me/buildawesome": "^
|
|
12
|
+
"@awesome.me/buildawesome": "^4.0.0-0"
|
|
20
13
|
},
|
|
21
14
|
"peerDependenciesMeta": {
|
|
22
15
|
"@11ty/eleventy": {
|
|
@@ -27,23 +20,29 @@
|
|
|
27
20
|
}
|
|
28
21
|
},
|
|
29
22
|
"=== DEV ONLY": "===",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "node --test ./**/*.test.js",
|
|
25
|
+
"prepublishOnly": "npm run test"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@11ty/lodash-custom": "^4.17.21"
|
|
29
|
+
},
|
|
33
30
|
"=== METADATA": "===",
|
|
34
31
|
"author": "Anton Staroverov",
|
|
35
|
-
"description": "
|
|
36
|
-
"homepage": "https://build.blades.ninja/",
|
|
32
|
+
"description": "Essential 11ty filters, pre/post-processors, and other toggleable features as a simple, configurable plugin",
|
|
33
|
+
"homepage": "https://build.blades.ninja/plugin/",
|
|
37
34
|
"keywords": [
|
|
38
35
|
"11ty",
|
|
39
36
|
"buildawesome",
|
|
40
37
|
"eleventy",
|
|
41
|
-
"
|
|
38
|
+
"filters",
|
|
39
|
+
"plugin"
|
|
42
40
|
],
|
|
43
41
|
"license": "MIT",
|
|
44
42
|
"repository": {
|
|
45
43
|
"type": "git",
|
|
46
|
-
"url": "git+https://github.com/anyblades/buildawesome-kit.git"
|
|
44
|
+
"url": "git+https://github.com/anyblades/buildawesome-kit.git",
|
|
45
|
+
"directory": "plugin/"
|
|
47
46
|
},
|
|
48
47
|
"===": "==="
|
|
49
48
|
}
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"build": "npm run tw; npm run ba",
|
|
12
12
|
"=== INNER": "commands written so that extra arguments can be passed",
|
|
13
13
|
"ba": "cd ../ && NODE_OPTIONS=--preserve-symlinks buildawesome ${BA_OPTIONS:-$ELTY_OPTIONS}",
|
|
14
|
-
"tw": "[ -z \"$TW_OPTIONS\" ] && exit 0; cd ../ && tailwindcss ${TW_OPTIONS}"
|
|
14
|
+
"tw": "[ -z \"$TW_OPTIONS\" ] && exit 0; cd ../ && tailwindcss ${TW_OPTIONS}",
|
|
15
|
+
"=== DEV": "===",
|
|
16
|
+
"dev:kit": "cd ../ && npm link @anyblades/buildawesome-kit-config && cd node_modules/@anyblades/ && ln -sf buildawesome-kit-config/node_modules/@anyblades/* ./ && cd buildawesome-kit-config/ && npm link @anyblades/blades"
|
|
15
17
|
}
|
|
16
18
|
}
|
package/.gitmodules
DELETED
package/.prettierrc.json
DELETED
package/LICENSE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Anton Staroverov
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
# Eleventy *Bl*ades <img src="https://img.shields.io/npm/v/@anyblades/eleventy-blades?label=plugin&color=white"> <img src="https://img.shields.io/npm/v/@anyblades/eleventy-blades-base?label=base&color=white">
|
|
2
|
-
|
|
3
|
-
<!--section:summary-->
|
|
4
|
-
|
|
5
|
-
<h1><mark>Ultimate blade kit</mark> <small>for</small> 11ty / Build Awesome</h1>
|
|
6
|
-
|
|
7
|
-
<big>Essential 11ty [filters](//11ty.blades.ninja/filters/), transforms, and other toggleable [features](//11ty.blades.ninja/features/) as a simple, configurable plugin. Reusable [npm scripts](//11ty.blades.ninja/scripts/) included.</big>
|
|
8
|
-
|
|
9
|
-
<nav>
|
|
10
|
-
<a href="//11ty.blades.ninja/plugin/" role="button">Get started ›</a>
|
|
11
|
-
<span hidden>•</span>
|
|
12
|
-
<a href="//11ty.blades.ninja/base/" role="button" class="outline">
|
|
13
|
-
Base <span hidden>package</span> <i class="fa-brands fa-eleventy"></i> ›
|
|
14
|
-
</a>
|
|
15
|
-
<span hidden>•</span>
|
|
16
|
-
<a href="//11ty.blades.ninja/starters/" role="button" class="outline">Micro-starters 🌱</a>
|
|
17
|
-
</nav>
|
|
18
|
-
|
|
19
|
-
<!--section:gh-only-->
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Quick start
|
|
24
|
-
|
|
25
|
-
<!--section:install-->
|
|
26
|
-
|
|
27
|
-
There are 3 ways to get started:
|
|
28
|
-
|
|
29
|
-
### <mark>A.</mark> Plugin install
|
|
30
|
-
|
|
31
|
-
Plugin gives you all the features and filters in one go without interfering with the rest of your 11ty config:
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
npm install @anyblades/eleventy-blades
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Then `addPlugin` to your 11ty config:
|
|
38
|
-
|
|
39
|
-
```js
|
|
40
|
-
import eleventyBladesPlugin from "@anyblades/eleventy-blades";
|
|
41
|
-
|
|
42
|
-
export default function ($config) {
|
|
43
|
-
$config.addPlugin(eleventyBladesPlugin);
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
You can toggle features/filters like this:
|
|
48
|
-
|
|
49
|
-
```js
|
|
50
|
-
$config.addPlugin(eleventyBladesPlugin, {
|
|
51
|
-
mdAutoRawTags: false,
|
|
52
|
-
filters: { attr_set: false },
|
|
53
|
-
});
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Live examples:
|
|
57
|
-
|
|
58
|
-
- https://github.com/anyblades/eleventy-blades/tree/main/examples/plugin-usage
|
|
59
|
-
- https://github.com/anyblades/eleventy-blades/tree/main/packages/eleventy-blades-base
|
|
60
|
-
|
|
61
|
-
<!--section:install,install-starters-->
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
### <mark>B.</mark> Starter projects
|
|
66
|
-
|
|
67
|
-
Eleventy *Bl*ades plugin and base package are included out-of-the-box with:
|
|
68
|
-
|
|
69
|
-
`BA v4` [6-in-1 Starter](https://github.com/anyblades/buildawesome-starters)
|
|
70
|
-
: Modern, lightweight Eleventy v4 multi-site starter showcasing Eleventy Blades Kit and Tailwind CLI for: [1] Tailwind CSS + Typography [2] Blades CSS [3] Bootstrap CSS [4] Pico CSS [5] Simple CSS [6] Liquid Templates.
|
|
71
|
-
|
|
72
|
-
`11ty v4` [*S*ubtle](https://github.com/anyblades/subtle)
|
|
73
|
-
: The most subtle Eleventy v4 micro-starter for content-first sites. Powered by Eleventy Blades Kit
|
|
74
|
-
|
|
75
|
-
Built-in bare-minimum examples
|
|
76
|
-
: https://github.com/anyblades/eleventy-blades/tree/main/examples
|
|
77
|
-
|
|
78
|
-
<!--section:install-->
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
### <mark>C.</mark> Base package
|
|
83
|
-
|
|
84
|
-
<!--section:install,install-base-->
|
|
85
|
-
|
|
86
|
-
Base package bundles Eleventy *Bl*ades with other popular 11ty plugins, providing a ready-to-go reusable, zero-maintenance config:
|
|
87
|
-
|
|
88
|
-
```sh
|
|
89
|
-
npm install @anyblades/eleventy-blades-base
|
|
90
|
-
|
|
91
|
-
# Link base templates:
|
|
92
|
-
cd _includes/
|
|
93
|
-
ln -s ../node_modules/@anyblades/blades/_includes/blades
|
|
94
|
-
|
|
95
|
-
# Run Eleventy:
|
|
96
|
-
eleventy --config=node_modules/@anyblades/eleventy-blades-base/buildawesome.config.js
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Live examples:
|
|
100
|
-
|
|
101
|
-
- https://github.com/anyblades/buildawesome-starters
|
|
102
|
-
- https://github.com/anyblades/subtle/tree/main/.11ty
|
|
103
|
-
|
|
104
|
-
<div><hr></div>
|
|
105
|
-
|
|
106
|
-
If you don't want to type `--config=...` every time, symlink it once:
|
|
107
|
-
|
|
108
|
-
```sh
|
|
109
|
-
ln -s node_modules/@anyblades/eleventy-blades-base/buildawesome.config.js
|
|
110
|
-
eleventy
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Or save it in your `package.json` scripts:
|
|
114
|
-
|
|
115
|
-
```json
|
|
116
|
-
"scripts": {
|
|
117
|
-
"build": "eleventy --config=node_modules/@anyblades/eleventy-blades-base/buildawesome.config.js"
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
<div><hr></div>
|
|
122
|
-
|
|
123
|
-
Alternatively, import it as a base config in your 11ty config:
|
|
124
|
-
|
|
125
|
-
```js
|
|
126
|
-
import baseConfig from "@anyblades/eleventy-blades-base";
|
|
127
|
-
|
|
128
|
-
export default async function ($config) {
|
|
129
|
-
await baseConfig($config);
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
You can toggle features/filters like this:
|
|
134
|
-
|
|
135
|
-
```js
|
|
136
|
-
await baseConfig($config, {
|
|
137
|
-
plugins: {
|
|
138
|
-
"@anyblades/eleventy-blades": {
|
|
139
|
-
mdAutoRawTags: false,
|
|
140
|
-
filters: { attr_set: false },
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
});
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Live examples:
|
|
147
|
-
|
|
148
|
-
- https://github.com/johnheenan/minform/blob/main/buildawesome.config.js
|
|
149
|
-
- https://github.com/hostfurl/minformhf/blob/main/buildawesome.config.js
|
|
150
|
-
|
|
151
|
-
<!--section:gh-only-->
|
|
152
|
-
|
|
153
|
-
## Documentation
|
|
154
|
-
|
|
155
|
-
<ul class="columns">
|
|
156
|
-
|
|
157
|
-
<li>
|
|
158
|
-
<strong><a href="/plugin/">Get started</a></strong>
|
|
159
|
-
<ul><li><a href="https://11ty.blades.ninja/plugin/">Plugin</a></li>
|
|
160
|
-
<li><a href="https://11ty.blades.ninja/base/">Base package</a></li>
|
|
161
|
-
<li><a href="https://11ty.blades.ninja/scripts/">Useful scripts</a></li>
|
|
162
|
-
<li><a href="https://11ty.blades.ninja/starters/">Starter projects</a></li></ul>
|
|
163
|
-
</li>
|
|
164
|
-
|
|
165
|
-
<li>
|
|
166
|
-
<strong><a href="/features/">Features</a></strong>
|
|
167
|
-
<ul><li><a href="https://11ty.blades.ninja/features/">Overview</a></li>
|
|
168
|
-
<li><a href="https://11ty.blades.ninja/features/site-globals/">Site globals</a></li>
|
|
169
|
-
<li><a href="https://11ty.blades.ninja/features/link-favicons/">Automatic link favicons</a></li>
|
|
170
|
-
<li><a href="https://11ty.blades.ninja/features/markdown-auto-raw/">Markdown auto-raw tags</a></li>
|
|
171
|
-
<li><a href="https://11ty.blades.ninja/features/markdown-hidden-attrs/">Markdown hidden attrs</a></li>
|
|
172
|
-
<li><a href="https://11ty.blades.ninja/features/markdown-newlines/">Markdown newlines</a></li></ul>
|
|
173
|
-
</li>
|
|
174
|
-
|
|
175
|
-
<li>
|
|
176
|
-
<strong><a href="/templates/">Templates</a></strong>
|
|
177
|
-
<ul><li><a href="https://blades.ninja/html/starter/">HTML base ↗</a></li>
|
|
178
|
-
<li><a href="https://blades.ninja/html/links/">Links ↗</a></li>
|
|
179
|
-
<li><a href="https://blades.ninja/html/sitemap/">Sitemap ↗</a></li>
|
|
180
|
-
<li><a href="https://11ty.blades.ninja/templates/">More</a></li></ul>
|
|
181
|
-
</li>
|
|
182
|
-
|
|
183
|
-
<li>
|
|
184
|
-
<strong><a href="/filters/">Filters</a></strong>
|
|
185
|
-
<ul><li><a href="https://11ty.blades.ninja/filters/attr_concat/">attr_concat</a></li>
|
|
186
|
-
<li><a href="https://11ty.blades.ninja/filters/attr_includes/">attr_includes</a></li>
|
|
187
|
-
<li><a href="https://11ty.blades.ninja/filters/attr_set/">attr_set</a></li>
|
|
188
|
-
<li><a href="https://11ty.blades.ninja/filters/date/">date</a></li>
|
|
189
|
-
<li><a href="https://11ty.blades.ninja/filters/fetch/">fetch</a></li>
|
|
190
|
-
<li><a href="https://11ty.blades.ninja/filters/if/">if</a></li>
|
|
191
|
-
<li><a href="https://11ty.blades.ninja/filters/markdownify/">markdownify</a></li>
|
|
192
|
-
<li><a href="https://11ty.blades.ninja/filters/merge/">merge</a></li>
|
|
193
|
-
<li><a href="https://11ty.blades.ninja/filters/remove_tag/">remove_tag</a></li>
|
|
194
|
-
<li><a href="https://11ty.blades.ninja/filters/section/">section</a></li>
|
|
195
|
-
<li><a href="https://11ty.blades.ninja/filters/strip_tag/">strip_tag</a></li>
|
|
196
|
-
<li><a href="https://11ty.blades.ninja/filters/unindent/">unindent</a></li></ul>
|
|
197
|
-
</li>
|
|
198
|
-
|
|
199
|
-
<li>
|
|
200
|
-
<strong><a href="/awesome/">Awesome</a></strong>
|
|
201
|
-
|
|
202
|
-
</li>
|
|
203
|
-
|
|
204
|
-
</ul>
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
<!--section:featured-->
|
|
209
|
-
|
|
210
|
-
## <sup style>Featured by</sup><!--A-Z sites, then @users-->
|
|
211
|
-
|
|
212
|
-
- [11ty.dev](https://www.11ty.dev/docs/starter/#:~:text=blades) [↗](https://www.11ty.dev/docs/plugins/community/#:~:text=blades)
|
|
213
|
-
- [11tybundle.dev](https://11tybundle.dev/blog/11ty-bundle-88/#:~:text=blades)
|
|
214
|
-
- [sveltiacms.app](https://sveltiacms.app/en/docs/frameworks/eleventy#:~:text=anyblades)
|
|
215
|
-
- [@hamatti](https://hamatti.org/posts/markdown-content-split-to-sections-in-eleventy-and-nunjucks/#:~:text=section%20filter)
|
|
216
|
-
- [@johnheenan](https://github.com/johnheenan/minform#css-and-performance)
|
|
217
|
-
|
|
218
|
-
<!--{.markerless .columns}-->
|
package/buildawesome.config.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
//<!--section:code-->```js
|
|
2
|
-
|
|
3
|
-
/* Plugins (core > official > contrib) */
|
|
4
|
-
import { RenderPlugin } from "@awesome.me/buildawesome";
|
|
5
|
-
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
|
|
6
|
-
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
|
|
7
|
-
import kitPlugin from "@anyblades/buildawesome-kit-plugin";
|
|
8
|
-
import pluginTOC from "@uncenter/eleventy-plugin-toc";
|
|
9
|
-
import { siteData } from "@anyblades/buildawesome-kit-plugin/features/siteData.js";
|
|
10
|
-
/* Libraries (A-Z) */
|
|
11
|
-
import markdownIt from "markdown-it";
|
|
12
|
-
import markdownItAnchor from "markdown-it-anchor";
|
|
13
|
-
import markdownItAttrs from "markdown-it-attrs";
|
|
14
|
-
import slugify from "@sindresorhus/slugify";
|
|
15
|
-
import YAML from "yaml";
|
|
16
|
-
/* System (A-Z) */
|
|
17
|
-
import fs from "node:fs";
|
|
18
|
-
import path from "node:path";
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Eleventy Configuration
|
|
22
|
-
* @param {Object} $config - The Eleventy configuration object
|
|
23
|
-
* @returns {Object} The Eleventy configuration object
|
|
24
|
-
*/
|
|
25
|
-
export default async function ($config, pluginOptions = {}) {
|
|
26
|
-
/* Dirs */
|
|
27
|
-
const inputDir = $config.directories.input;
|
|
28
|
-
const outputDir = $config.directories.output;
|
|
29
|
-
const cwdIsDotEleventy = path.basename(process.cwd()) === ".11ty";
|
|
30
|
-
if (cwdIsDotEleventy) {
|
|
31
|
-
// Per https://www.11ty.dev/docs/config/#directory-for-includes
|
|
32
|
-
// Order matters, put this at the top of your configuration file.
|
|
33
|
-
// This is relative to your input directory!
|
|
34
|
-
$config.setIncludesDirectory("./.11ty/_includes/");
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Plugins */
|
|
38
|
-
$config.addBundle("css", { bundleHtmlContentFromSelector: "style" }); // per https://www.11ty.dev/docs/plugins/bundle/#bundling-html-node-content
|
|
39
|
-
$config.addTransform("inject-css-bundle", function (content) {
|
|
40
|
-
const isHtml = typeof this.page.outputPath === "string" && this.page.outputPath.endsWith(".html");
|
|
41
|
-
const css = isHtml && $config.getFilter("getBundle").call(this, "css");
|
|
42
|
-
return css ? content.replace("</head>", `<style>${css}</style></head>`) : content;
|
|
43
|
-
});
|
|
44
|
-
$config.addPlugin(RenderPlugin);
|
|
45
|
-
$config.addPlugin(eleventyNavigationPlugin);
|
|
46
|
-
$config.addPlugin(
|
|
47
|
-
kitPlugin,
|
|
48
|
-
pluginOptions.plugins?.["@anyblades/buildawesome-kit-plugin"] ?? { mdAutoRawTags: true },
|
|
49
|
-
);
|
|
50
|
-
$config.addPlugin(pluginTOC, {
|
|
51
|
-
ignoredElements: [".header-anchor", "sub"],
|
|
52
|
-
ul: true,
|
|
53
|
-
wrapper: (toc) => `${toc}`,
|
|
54
|
-
});
|
|
55
|
-
// Feed plugin
|
|
56
|
-
$config.addCollection("feed", (collectionApi) =>
|
|
57
|
-
collectionApi.getAll().filter((item) => item.data.date || item.data.revised),
|
|
58
|
-
);
|
|
59
|
-
$config.addPlugin(feedPlugin, {
|
|
60
|
-
// per https://www.11ty.dev/docs/plugins/rss/#virtual-template
|
|
61
|
-
type: "atom", // or "rss", "json"
|
|
62
|
-
outputPath: "/feed.xml",
|
|
63
|
-
collection: {
|
|
64
|
-
name: "feed",
|
|
65
|
-
limit: 100, // 0 means no limit
|
|
66
|
-
},
|
|
67
|
-
templateData: {
|
|
68
|
-
eleventyComputed: {
|
|
69
|
-
metadata: (data) => {
|
|
70
|
-
return {
|
|
71
|
-
base: "https://example.com/", // sample/fallback value required by Feed plugin
|
|
72
|
-
...siteData(data),
|
|
73
|
-
};
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
/* Libraries */
|
|
80
|
-
let md = markdownIt({
|
|
81
|
-
html: true,
|
|
82
|
-
linkify: true,
|
|
83
|
-
})
|
|
84
|
-
.use(markdownItAnchor, {
|
|
85
|
-
slugify: slugify, // @TODO: TRICKS
|
|
86
|
-
permalink: markdownItAnchor.permalink.ariaHidden(),
|
|
87
|
-
})
|
|
88
|
-
.use(markdownItAttrs);
|
|
89
|
-
await import("markdown-it-deflist")
|
|
90
|
-
.then(({ default: markdownItDeflist }) => {
|
|
91
|
-
md.use(markdownItDeflist);
|
|
92
|
-
})
|
|
93
|
-
.catch(() => {
|
|
94
|
-
/* optional – skip if not installed */
|
|
95
|
-
});
|
|
96
|
-
$config.setLibrary("md", md);
|
|
97
|
-
//```<!--section:code,markdownify-->```js
|
|
98
|
-
$config.addFilter("markdownify", (content) => md.render(String(content ?? "")));
|
|
99
|
-
//```<!--section:code-->```js
|
|
100
|
-
|
|
101
|
-
/* Data */
|
|
102
|
-
$config.addDataExtension("yml,yaml", (contents) => YAML.parse(contents));
|
|
103
|
-
$config.addGlobalData("layout", "default");
|
|
104
|
-
// Sitemap
|
|
105
|
-
$config.addTemplate("sitemap.xml.njk", "", {
|
|
106
|
-
permalink: "/sitemap.xml",
|
|
107
|
-
layout: "blades/sitemap.xml.njk",
|
|
108
|
-
eleventyExcludeFromCollections: true,
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
/* Build */
|
|
112
|
-
$config.addPassthroughCopy(
|
|
113
|
-
{
|
|
114
|
-
// From current working directory
|
|
115
|
-
_public: "./",
|
|
116
|
-
media: "./media/",
|
|
117
|
-
// Additionally from input dirs like `../` or `./site-1`
|
|
118
|
-
[`${inputDir}/_public/`]: "./",
|
|
119
|
-
[`${inputDir}/media/`]: "./media/",
|
|
120
|
-
},
|
|
121
|
-
{ expand: true }, // This follows/resolves symbolic links
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
/* Internal */
|
|
125
|
-
// Jekyll templates compatibility
|
|
126
|
-
$config.addFilter("relative_url", (content) => content); // dummy
|
|
127
|
-
$config.setLiquidOptions({
|
|
128
|
-
dynamicPartials: false, // allows unquoted Jekyll-style includes
|
|
129
|
-
root: [
|
|
130
|
-
$config.directories.includes,
|
|
131
|
-
fs.realpathSync(path.resolve("./node_modules/@anyblades/blades/_includes")), // for symlinks to work after https://github.com/harttle/liquidjs/pull/870
|
|
132
|
-
],
|
|
133
|
-
});
|
|
134
|
-
// Dev tools
|
|
135
|
-
$config.setChokidarConfig({ followSymlinks: true }); // follow symlinks in Chokidar used by 11ty to watch files
|
|
136
|
-
if (cwdIsDotEleventy) {
|
|
137
|
-
$config.watchIgnores.add(`../.11ty/${outputDir}`); // !!! avoid circular watching
|
|
138
|
-
$config.watchIgnores.add("../.11ty/node_modules/"); // avoid performance issues
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
//```
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@anyblades/eleventy-blades",
|
|
3
|
-
"version": "1.3.0",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"node_modules/@11ty/lodash-custom": {
|
|
8
|
-
"version": "4.17.21",
|
|
9
|
-
"resolved": "https://registry.npmjs.org/@11ty/lodash-custom/-/lodash-custom-4.17.21.tgz",
|
|
10
|
-
"integrity": "sha512-Mqt6im1xpb1Ykn3nbcCovWXK3ggywRJa+IXIdoz4wIIK+cvozADH63lexcuPpGS/gJ6/m2JxyyXDyupkMr5DHw==",
|
|
11
|
-
"dev": true,
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"engines": {
|
|
14
|
-
"node": ">=14"
|
|
15
|
-
},
|
|
16
|
-
"funding": {
|
|
17
|
-
"type": "opencollective",
|
|
18
|
-
"url": "https://opencollective.com/11ty"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
package/plugin/package-lock.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@anyblades/eleventy-blades",
|
|
3
|
-
"version": "1.3.0",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "@anyblades/eleventy-blades",
|
|
9
|
-
"version": "1.3.0",
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@11ty/lodash-custom": "^4.17.21"
|
|
13
|
-
},
|
|
14
|
-
"peerDependencies": {
|
|
15
|
-
"@11ty/eleventy": "^3.0.0 || ^4.0.0-0",
|
|
16
|
-
"@awesome.me/buildawesome": "^3.0.0 || ^4.0.0-0"
|
|
17
|
-
},
|
|
18
|
-
"peerDependenciesMeta": {
|
|
19
|
-
"@11ty/eleventy": {
|
|
20
|
-
"optional": true
|
|
21
|
-
},
|
|
22
|
-
"@awesome.me/buildawesome": {
|
|
23
|
-
"optional": true
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"node_modules/@11ty/lodash-custom": {
|
|
28
|
-
"version": "4.17.21",
|
|
29
|
-
"resolved": "https://registry.npmjs.org/@11ty/lodash-custom/-/lodash-custom-4.17.21.tgz",
|
|
30
|
-
"integrity": "sha512-Mqt6im1xpb1Ykn3nbcCovWXK3ggywRJa+IXIdoz4wIIK+cvozADH63lexcuPpGS/gJ6/m2JxyyXDyupkMr5DHw==",
|
|
31
|
-
"dev": true,
|
|
32
|
-
"license": "MIT",
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": ">=14"
|
|
35
|
-
},
|
|
36
|
-
"funding": {
|
|
37
|
-
"type": "opencollective",
|
|
38
|
-
"url": "https://opencollective.com/11ty"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
package/plugin/package.json
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@anyblades/buildawesome-kit-plugin",
|
|
3
|
-
"version": "1.3.0-alpha.2",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "./plugin.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./plugin.js",
|
|
8
|
-
"./features/*": "./features/*"
|
|
9
|
-
},
|
|
10
|
-
"peerDependencies": {
|
|
11
|
-
"@11ty/eleventy": "^3.0.0 || ^4.0.0-0",
|
|
12
|
-
"@awesome.me/buildawesome": "^3.0.0 || ^4.0.0-0"
|
|
13
|
-
},
|
|
14
|
-
"peerDependenciesMeta": {
|
|
15
|
-
"@11ty/eleventy": {
|
|
16
|
-
"optional": true
|
|
17
|
-
},
|
|
18
|
-
"@awesome.me/buildawesome": {
|
|
19
|
-
"optional": true
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"=== DEV ONLY": "===",
|
|
23
|
-
"scripts": {
|
|
24
|
-
"test": "node --test ./**/*.test.js",
|
|
25
|
-
"prepublishOnly": "npm run test"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@11ty/lodash-custom": "^4.17.21"
|
|
29
|
-
},
|
|
30
|
-
"=== METADATA": "===",
|
|
31
|
-
"author": "Anton Staroverov",
|
|
32
|
-
"description": "Essential 11ty filters, pre/post-processors, and other toggleable features as a simple, configurable plugin",
|
|
33
|
-
"homepage": "https://build.blades.ninja/plugin/",
|
|
34
|
-
"keywords": [
|
|
35
|
-
"11ty",
|
|
36
|
-
"buildawesome",
|
|
37
|
-
"eleventy",
|
|
38
|
-
"filters",
|
|
39
|
-
"plugin"
|
|
40
|
-
],
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"repository": {
|
|
43
|
-
"type": "git",
|
|
44
|
-
"url": "git+https://github.com/anyblades/buildawesome-kit.git",
|
|
45
|
-
"directory": "plugin/"
|
|
46
|
-
},
|
|
47
|
-
"===": "==="
|
|
48
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|