mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
feat: add ChardonsBleus page with embedded Bluesky timeline
Dedicated template to avoid storing <script> tags in Indiekit's database, which breaks the admin /posts UI due to unescaped rendering. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
28
chardonsbleus.njk
Normal file
28
chardonsbleus.njk
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
layout: layouts/base.njk
|
||||||
|
title: ChardonsBleus
|
||||||
|
permalink: /chardonsbleus/
|
||||||
|
eleventyExcludeFromCollections: true
|
||||||
|
---
|
||||||
|
<article>
|
||||||
|
<h1 class="text-2xl sm:text-3xl font-bold text-surface-900 dark:text-surface-100 mb-6">ChardonsBleus</h1>
|
||||||
|
<div class="w-full">
|
||||||
|
<link rel="stylesheet" href="https://embedbsky.com/embedbsky.com-master-min.css" />
|
||||||
|
<div id="embedbsky-com-timeline-embed"></div>
|
||||||
|
<script>
|
||||||
|
let containerWidth = 0, containerHeight = 800;
|
||||||
|
const getHtml = async (url) => {
|
||||||
|
const resp = await fetch(url);
|
||||||
|
return 200 !== resp.status ? '<p><strong>No feed data could be located</strong></p>' : resp.text();
|
||||||
|
};
|
||||||
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
const timestamp = (new Date).toISOString();
|
||||||
|
const el = document.getElementById('embedbsky-com-timeline-embed');
|
||||||
|
el.style.width = "100%";
|
||||||
|
el.style.height = containerHeight + "px";
|
||||||
|
const html = await getHtml("https://embedbsky.com/feeds/b623eb5af0b6fb7966040b19bf734f8e11eee859965836a60fe5536a1f01990a.html?v=" + timestamp);
|
||||||
|
el.innerHTML = html;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
Reference in New Issue
Block a user