diff --git a/.eleventy.js b/.eleventy.js
index 7770b1e..43687d0 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -195,22 +195,15 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addFilter("taggify", function (str) {
return (
str &&
- str.replace(
- tagRegex,
- function (match, precede, tag) {
- return `${precede}${tag}`;
- }
- )
+ str.replace(tagRegex, function (match, precede, tag) {
+ return `${precede}${tag}`;
+ })
);
});
eleventyConfig.addFilter("searchableTags", function (str) {
let tags;
- let match =
- str &&
- str.match(
- tagRegex,
- );
+ let match = str && str.match(tagRegex);
if (match) {
tags = match
.map((m) => {
@@ -225,6 +218,15 @@ module.exports = function (eleventyConfig) {
}
});
+ eleventyConfig.addFilter("hideDataview", function (str) {
+ return (
+ str &&
+ str.replace(/\(\S+\:\:(.*)\)/g, function (_, value) {
+ return value.trim();
+ })
+ );
+ });
+
eleventyConfig.addTransform("callout-block", function (str) {
const parsed = parse(str);
@@ -290,11 +292,11 @@ module.exports = function (eleventyConfig) {
return JSON.stringify(variable) || '""';
});
- eleventyConfig.addFilter('validJson', function (variable) {
- if(Array.isArray((variable))){
- return variable.map(x=>x.replaceAll("\\", "\\\\")).join(",");
- }else if(typeof(variable) === 'string'){
- return variable.replaceAll("\\", "\\\\");
+ eleventyConfig.addFilter("validJson", function (variable) {
+ if (Array.isArray(variable)) {
+ return variable.map((x) => x.replaceAll("\\", "\\\\")).join(",");
+ } else if (typeof variable === "string") {
+ return variable.replaceAll("\\", "\\\\");
}
return variable;
});
diff --git a/src/site/_includes/layouts/note.njk b/src/site/_includes/layouts/note.njk
index 56f4e2e..ecac13d 100644
--- a/src/site/_includes/layouts/note.njk
+++ b/src/site/_includes/layouts/note.njk
@@ -22,24 +22,24 @@ permalink: "notes/{{ page.fileSlug | slugify }}/"
- {% if settings.dgShowInlineTitle === true %}
- {% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %}
- {% endif %}
-
+
- {{ content | link | taggify | highlight | safe}}
+ {{ content | hideDataview | link | taggify | highlight | safe}}
{% if settings.dgShowBacklinks === true or settings.dgShowLocalGraph === true or settings.dgShowToc === true%}
diff --git a/src/site/index.njk b/src/site/index.njk
index 2644114..f753a53 100644
--- a/src/site/index.njk
+++ b/src/site/index.njk
@@ -35,7 +35,7 @@
{%- for garden in collections.gardenEntry -%}
- {{garden.templateContent | link | taggify | highlight | safe }}
+ {{garden.templateContent | hideDataview | link | taggify | highlight | safe }}
{%- endfor -%}