remove comments but differently

This commit is contained in:
Nycki 2024-09-13 09:12:09 -07:00
parent eb6071db38
commit cd4b91f5f1
5 changed files with 27 additions and 15 deletions

View file

@ -1,8 +1,8 @@
module.exports = { module.exports = {
title: "Eleventy Base Blog v8", title: "nycki.net",
url: "https://nycki.net/beta/", url: "https://nycki.net/beta/",
language: "en", language: "en",
description: "I am writing about my experiences as a naval navel-gazer.", description: "nycki.net",
author: { author: {
name: "Your Name Here", name: "Your Name Here",
email: "youremailaddress@example.com", email: "youremailaddress@example.com",

View file

@ -28,15 +28,12 @@ layout: layouts/base.njk
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{# {# <div id="cusdis_thread"
<div class="commentbox"></div> data-host="https://cusdis.com"
<script src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script> data-app-id="1dd6bcd8-97df-4cc1-a8ab-6324f9c732d0"
<script> data-page-id="{{ page.url | getPostId }}"
var el = document.querySelectorAll('.commentbox')[0]; data-page-url="{{ metadata.url | noTrailingSlash }}{{ page.url }}"
var style = window.getComputedStyle(document.body); data-page-title="{{ title | slugify }}"
console.log(style); data-theme="auto"
commentBox('5745017201098752-proj', { ></div>
textColor: style.color, <script async defer src="https://cusdis.com/js/cusdis.es.js"></script> #}
})
</script>
#}

View file

@ -3,6 +3,7 @@ title: Hey Cohost
date: 2024-09-12 date: 2024-09-12
tags: tags:
- hey cohost - hey cohost
--- ---
Holy shit I'm doing this. I'm... "blogging." Holy shit I'm doing this. I'm... "blogging."

View file

@ -79,6 +79,20 @@ module.exports = function(eleventyConfig) {
return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1); return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
}); });
eleventyConfig.addFilter("getPostId", function getPostId(url) {
const fragments = url.split('/').filter(f => f.trim());
return fragments[fragments.length - 1];
});
eleventyConfig.addFilter("noTrailingSlash", function noTrailingSlash(url) {
const length = url.length;
if (url[length - 1] === '/') {
return url.slice(0, length - 1);
} else {
return url;
}
});
// Customize Markdown library settings: // Customize Markdown library settings:
eleventyConfig.amendLibrary("md", mdLib => { eleventyConfig.amendLibrary("md", mdLib => {
mdLib.use(markdownItAnchor, { mdLib.use(markdownItAnchor, {