initial feed implementation
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { writable } from 'svelte/store';
|
||||
import { dev } from '$app/environment';
|
||||
const posts = import.meta.globEager('./*.svx');
|
||||
|
||||
@@ -16,6 +15,19 @@ for (const path in posts) {
|
||||
postData.push(posts[path].metadata);
|
||||
}
|
||||
|
||||
|
||||
let ids = new Set();
|
||||
for (const postMeta of postData) {
|
||||
if (postMeta.uuid === undefined) {
|
||||
throw(`Missing UUID for post: ${postMeta.title}`);
|
||||
}
|
||||
if (ids.has(postMeta.uuid)) {
|
||||
throw(`Duplicate UUID in post: ${postMeta.title}`);
|
||||
}
|
||||
ids.add(postMeta.uuid);
|
||||
}
|
||||
|
||||
|
||||
postData.sort((a, b) => {
|
||||
// sorting in reverse, so we flip the intuitive order
|
||||
if (a.date > b.date) return -1;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: Exposing Docker Containers to your LAN
|
||||
description: If, for some strange reason, you should want to do such a thing.
|
||||
date: 2022-03-21
|
||||
uuid: 81715fb3-990e-487e-9662-fed7b7d02943
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: The Hitchiker's Guide to Mesh VPNs
|
||||
description: The golden age of VPNery is upon us.
|
||||
date: 2022-03-17
|
||||
uuid: fc6930ef-979c-4851-bc5a-c0e1b1698061
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
||||
@@ -4,6 +4,7 @@ description: Can we replace passwords with something more user-friendly?
|
||||
date: 2021-04-30
|
||||
draft: true
|
||||
dropcap: false
|
||||
uuid: 696020b3-1513-42a8-b346-634d40f0e9d9
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: 'Languages: High and Low'
|
||||
description: How high is up?
|
||||
date: 2022-08-19
|
||||
uuid: 89ae4194-7785-4fac-a841-8bcf5a5a3a2e
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: Sidenotes
|
||||
description: An entirely-too-detailed dive into how I implemented sidenotes for this blog.
|
||||
date: 2023-08-14
|
||||
uuid: c514c46e-92f3-4078-a76b-e1dafd5f7e07
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: Let's Design A Simpler SocketIO
|
||||
date: 2021-10-16
|
||||
description: SocketIO is packed with features. But do we really need all of them all the time?
|
||||
uuid: 95cde7e7-9293-4fab-a0b4-fc6ab7da08c8
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: Sufficiently Advanced Technology Is Often Distinguishable From Magic
|
||||
description: I see what Arthur C. Clarke was getting at, but I don't think I agree.
|
||||
date: 2022-05-14
|
||||
uuid: 84636766-eb78-4060-a98d-593d8d5b55c9
|
||||
draft: true
|
||||
---
|
||||
<script>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: Thoughts on Vue vs Svelte
|
||||
description: They're more similar than they are different, but they say the most bitter enemies are those who have the fewest differences.
|
||||
date: 2023-06-29
|
||||
uuid: 8280f0e0-6bf5-43a2-9eac-b8c2508cca29
|
||||
---
|
||||
<script>
|
||||
import Sidenote from '$lib/Sidenote.svelte';
|
||||
|
||||
Reference in New Issue
Block a user