diff --git a/config/filters/excerpt.js b/config/filters/excerpt.js
index d4b5c66..bdf39de 100644
--- a/config/filters/excerpt.js
+++ b/config/filters/excerpt.js
@@ -1,6 +1,10 @@
module.exports = function (eleventyConfig) {
eleventyConfig.addFilter('excerpt', (content, limit = 250) => {
- const excerpt = content.replace(/(<([^>]+)>)/gi, "").slice(0, limit) + " […]";
- return excerpt;
+ const withoutTags = content.replace(/(<([^>]+)>)/gi, "");
+
+ if (withoutTags.length > limit) {
+ return withoutTags.slice(0, limit) + " […]";
+ }
+ return withoutTags;
});
}
\ No newline at end of file
diff --git a/src/_includes/base.njk b/src/_includes/base.njk
index e35bdb2..4b0d9df 100644
--- a/src/_includes/base.njk
+++ b/src/_includes/base.njk
@@ -51,11 +51,8 @@
-