Hayden Hargreaves 022bd1bcf7 FEAT: Lots of work on the blogs!
Syntax highlighting looks really good so far! Rendering of the markdowns
works when a valid URL is provided, need to work on routing some more.
2025-02-23 23:47:24 -07:00

26 lines
676 B
Svelte

<script lang="ts">
import type { PageProps } from './$types';
// import hljs from 'highlight.js';
let { data }: PageProps = $props();
// Run highlight.js after the component is rendered (onMount or after each update)
// import { onMount } from 'svelte';
//
// onMount(() => {
// // console.log("onMount called");
// highlightAllCodeBlocks();
// });
//
// function highlightAllCodeBlocks() {
// // console.log("highlightAllCodeBlocks called");
// const codeBlocks = document.querySelectorAll('pre code');
// codeBlocks.forEach((block) => {
// hljs.highlightElement(block);
// });
// }
</script>
<div class="prose">
{@html data.post.content}
</div>