From d993381d31e9f607a73bde2ef8ad019add77413a Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:44:58 +0100 Subject: [PATCH] Revert "web: glossary fix (#4298)" This reverts commit d3274b28ba4d4af2b19c80164811853887fa6cce. --- website/.eleventy.js | 4 +-- website/src/_includes/layouts/article.html | 3 +- website/src/_includes/layouts/doc.html | 3 +- website/src/_includes/layouts/privacy.html | 3 +- website/src/css/blog.css | 4 --- website/src/css/style.css | 34 ++++++++-------------- website/src/js/script.js | 9 ------ 7 files changed, 17 insertions(+), 43 deletions(-) diff --git a/website/.eleventy.js b/website/.eleventy.js index a3b94643e8..a0a35f3366 100644 --- a/website/.eleventy.js +++ b/website/.eleventy.js @@ -404,7 +404,6 @@ module.exports = function (ty) { // this condition works if the link is a valid website file const fileContent = fs.readFileSync(linkFile, 'utf8') parsed.path = (matter(fileContent).data?.permalink || parsed.path).replace(/\.md$/, ".html").toLowerCase() - return parsed.path } else if (!fs.existsSync(linkFile)) { linkFile = linkFile.replace('/website/src', '') if (fs.existsSync(linkFile)) { @@ -414,12 +413,13 @@ module.exports = function (ty) { index = linkFile.indexOf(keyword) linkFile = linkFile.substring(index + keyword.length) parsed.path = `${githubUrl}${linkFile}` - return parsed.path } else { // if the link is not a valid website file or project file throw new Error(`Broken link: ${parsed.path} in ${hostFile}`) } } + + return uri.serialize(parsed) } }).use(markdownItAnchor, { slugify: (str) => diff --git a/website/src/_includes/layouts/article.html b/website/src/_includes/layouts/article.html index 4550aa96d7..783b6ece7c 100644 --- a/website/src/_includes/layouts/article.html +++ b/website/src/_includes/layouts/article.html @@ -38,11 +38,10 @@ - {{ content | applyGlossary | safe }} + {{ content | safe }} {% include "footer.html" %} -