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 = {
title: "Eleventy Base Blog v8",
title: "nycki.net",
url: "https://nycki.net/beta/",
language: "en",
description: "I am writing about my experiences as a naval navel-gazer.",
description: "nycki.net",
author: {
name: "Your Name Here",
email: "youremailaddress@example.com",

View file

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

View file

@ -3,6 +3,7 @@ title: Hey Cohost
date: 2024-09-12
tags:
- hey cohost
---
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);
});
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:
eleventyConfig.amendLibrary("md", mdLib => {
mdLib.use(markdownItAnchor, {