added new software in post

This commit is contained in:
Luca Junge 2023-04-10 19:29:25 +02:00
parent 684829c921
commit 80450062c9
9 changed files with 140 additions and 36 deletions

View file

@ -15,10 +15,12 @@ module.exports = function (eleventyConfig) {
}).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(" ", 200)) + "...";
return content.substr(0, content.lastIndexOf(" ", 180)) + "...";
});
return {
passthroughFileCopy: true,
dir: {