donations and stuff
This commit is contained in:
parent
4bb90d0314
commit
48cbb3471e
57 changed files with 610 additions and 1260 deletions
36
.eleventy.js
36
.eleventy.js
|
|
@ -1,28 +1,34 @@
|
|||
const { DateTime } = require("luxon")
|
||||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight")
|
||||
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
|
||||
eleventyConfig.addPlugin(syntaxHighlight)
|
||||
|
||||
//eleventyConfig.addPassthroughCopy("css")
|
||||
eleventyConfig.addPassthroughCopy("src/**/*.png")
|
||||
eleventyConfig.addPassthroughCopy("src/**/*.jpg")
|
||||
eleventyConfig.addPassthroughCopy("src/css/modelviewer.css")
|
||||
|
||||
eleventyConfig.addPassthroughCopy("src/**/*.glb")
|
||||
eleventyConfig.addPassthroughCopy("src/css/*.css")
|
||||
eleventyConfig.addPassthroughCopy("src/libs/**/*.js")
|
||||
eleventyConfig.addPassthroughCopy({ "src/_assets/": "assets" })
|
||||
|
||||
eleventyConfig.addFilter("readableDate", (dateObj) => {
|
||||
eleventyConfig.addFilter("formatDate", (dateObj) => {
|
||||
return DateTime.fromJSDate(dateObj, {
|
||||
zone: "Europe/Berlin"
|
||||
}).setLocale("de").toLocaleString(DateTime.DATE_FULL)
|
||||
zone: "Europe/Berlin",
|
||||
})
|
||||
.setLocale("de")
|
||||
.toLocaleString(DateTime.DATE_FULL)
|
||||
})
|
||||
|
||||
// Filter for showing excerpts of posts on the "/posts/" site, limited to 180 characters (about 4 lines on mobile)
|
||||
eleventyConfig.addFilter("excerpt", (post) => {
|
||||
const content = post.replace(/(<([^>]+)>)/gi, "");
|
||||
return content.substr(0, content.lastIndexOf(" ", 180)) + "...";
|
||||
});
|
||||
eleventyConfig.addFilter("createExcerpt", (post) => {
|
||||
// This removes "<" and ">" from the output
|
||||
const content = post.replace(/(<([^>]+)>)/gi, "")
|
||||
return content.substr(0, content.lastIndexOf(" ", 180)) + "..."
|
||||
})
|
||||
|
||||
eleventyConfig.addFilter("stringify", (object) => {
|
||||
return JSON.stringify(object, null, 2)
|
||||
})
|
||||
|
||||
return {
|
||||
passthroughFileCopy: true,
|
||||
|
|
@ -30,7 +36,7 @@ module.exports = function (eleventyConfig) {
|
|||
input: "src",
|
||||
includes: "_includes",
|
||||
data: "_data",
|
||||
output: "_site"
|
||||
}
|
||||
output: "build",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue