Template
Compare commits
2
Commits
3b22f8dab9
...
8201b368ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8201b368ed | ||
|
|
03e85bcb35 |
No files matched your search
@@ -1,3 +1,2 @@
|
|||||||
_live
|
|
||||||
_site
|
_site
|
||||||
node_modules
|
node_modules
|
||||||
@@ -69,6 +69,17 @@ export default async function (eleventyConfig) {
|
|||||||
/* All filters from _config/filters.js */
|
/* All filters from _config/filters.js */
|
||||||
eleventyConfig.addPlugin(pluginFilters);
|
eleventyConfig.addPlugin(pluginFilters);
|
||||||
|
|
||||||
|
/* Draft handling */
|
||||||
|
eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
|
||||||
|
if (data.draft) {
|
||||||
|
data.title = `${data.title} (draft)`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/* Shortcodes */
|
/* Shortcodes */
|
||||||
eleventyConfig.addShortcode("currentBuildDate", () => {
|
eleventyConfig.addShortcode("currentBuildDate", () => {
|
||||||
return new Date().toISOString();
|
return new Date().toISOString();
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rm -rf _site && npx @11ty/eleventy --quiet",
|
"build": "rm -rf _site && npx @11ty/eleventy --quiet",
|
||||||
"dev": "rm -rf _live && npx @11ty/eleventy --serve --quiet --output _live"
|
"dev": "rm -rf _site && npx @11ty/eleventy --serve --quiet --output _site"
|
||||||
},
|
},
|
||||||
"author": "Lee Cattarin",
|
"author": "Lee Cattarin",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
|
|||||||
Reference in new issue
Block a user