This commit is contained in:
Mrrp 2025-01-01 21:44:22 -08:00
parent 8038088422
commit 87eaba51f4
6 changed files with 47 additions and 42 deletions

View file

@ -1,5 +1,5 @@
{ {
"last_generated": "2025-01-02 05:33:27", "last_generated": "2025-01-01 21:44:08",
"posts": [ "posts": [
{ {
"metadata": { "metadata": {
@ -17,23 +17,9 @@
"next": "old3ds_touchscreen.md" "next": "old3ds_touchscreen.md"
}, },
"id": "/old3ds_romfs.md", "id": "/old3ds_romfs.md",
"url": "/old3ds_romfs.md", "url": "/blog/old3ds_romfs.md",
"hash": "0b28a366868e9fa564b6a33d9b1aa1d8269f7971497f25488f05f54929e88410" "hash": "0b28a366868e9fa564b6a33d9b1aa1d8269f7971497f25488f05f54929e88410"
}, },
{
"metadata": {
"title": "Styling Test",
"description": "A test post to see how the site styling looks",
"date": "2025-01-01",
"tags": [
"meta",
"web"
]
},
"id": "/styling_test.md",
"url": "/styling_test.md",
"hash": "8e6c14fdef5fd67ea17dcc8b58d59f2040d8250c15c2d18d3e1fdc1b1b60dc54"
},
{ {
"metadata": { "metadata": {
"title": "Awesome", "title": "Awesome",
@ -45,26 +31,23 @@
] ]
}, },
"id": "/awesome.md", "id": "/awesome.md",
"url": "/awesome.md", "url": "/blog/awesome.md",
"hash": "5d7fb989c4504082cc88cd284347dbb54b221834d2c281210be7c507cd07ae23" "hash": "5d7fb989c4504082cc88cd284347dbb54b221834d2c281210be7c507cd07ae23"
}, },
{ {
"metadata": { "metadata": {
"title": "3DS Programming - Hello World", "title": "Badges!",
"description": "A guide to creating a simple Hello, World program for the 3DS. (Old)", "description": "A collection of 88x31 badges for various things",
"date": "2025-01-01", "date": "2024-12-21",
"tags": [ "tags": [
"3ds", "badges",
"programming", "retro",
"c", "web"
"devkitpro", ]
"old"
],
"next": "old3ds_romfs.md"
}, },
"id": "/old3ds_helloworld.md", "id": "/badges.md",
"url": "/old3ds_helloworld.md", "url": "/blog/badges.md",
"hash": "86e0bd1deae0d00b17ab0960634ea7292d6387063f70600cec4001564fde9514" "hash": "338ccfecc6523dff93708330a8b43af715f1e80d55e1cc3bea2d1a7306fc4f00"
}, },
{ {
"metadata": { "metadata": {
@ -81,23 +64,40 @@
"previous": "old3ds_romfs.md" "previous": "old3ds_romfs.md"
}, },
"id": "/old3ds_touchscreen.md", "id": "/old3ds_touchscreen.md",
"url": "/old3ds_touchscreen.md", "url": "/blog/old3ds_touchscreen.md",
"hash": "59e0b9d701646fd5f747713832c47ce451e0ebe0975d4a148a820ca795741c2b" "hash": "59e0b9d701646fd5f747713832c47ce451e0ebe0975d4a148a820ca795741c2b"
}, },
{ {
"metadata": { "metadata": {
"title": "Badges!", "title": "Styling Test",
"description": "A collection of 88x31 badges for various things", "description": "A test post to see how the site styling looks",
"date": "2024-12-21", "date": "2025-01-01",
"tags": [ "tags": [
"badges", "meta",
"retro",
"web" "web"
] ]
}, },
"id": "/badges.md", "id": "/styling_test.md",
"url": "/badges.md", "url": "/blog/styling_test.md",
"hash": "338ccfecc6523dff93708330a8b43af715f1e80d55e1cc3bea2d1a7306fc4f00" "hash": "8e6c14fdef5fd67ea17dcc8b58d59f2040d8250c15c2d18d3e1fdc1b1b60dc54"
},
{
"metadata": {
"title": "3DS Programming - Hello World",
"description": "A guide to creating a simple Hello, World program for the 3DS. (Old)",
"date": "2025-01-01",
"tags": [
"3ds",
"programming",
"c",
"devkitpro",
"old"
],
"next": "old3ds_romfs.md"
},
"id": "/old3ds_helloworld.md",
"url": "/blog/old3ds_helloworld.md",
"hash": "86e0bd1deae0d00b17ab0960634ea7292d6387063f70600cec4001564fde9514"
} }
] ]
} }

View file

@ -103,7 +103,10 @@
}, },
{ {
"2025-01-02 05:33:28": [] "2025-01-02 05:33:28": []
},
{
"2025-01-01 21:42:58": []
} }
], ],
"last_generated": "2025-01-02 05:33:28" "last_generated": "2025-01-01 21:42:58"
} }

View file

@ -39,7 +39,7 @@ async function fetchData() {
loading.value = true loading.value = true
try { try {
data.value = await (await fetch("/blog" + url.value)).text() data.value = await (await fetch(url.value)).text()
console.log(url.value) console.log(url.value)
const processed = fm(data.value) const processed = fm(data.value)
background.value = processed.attributes.background background.value = processed.attributes.background

View file

@ -28,7 +28,8 @@ def generate_page_list(pages_info):
page_dict = { page_dict = {
"metadata": page["metadata"], "metadata": page["metadata"],
'id': page["local_path"], 'id': page["local_path"],
'url': page["local_path"], # Remove the public/ prefix from the path
'url': page["absolute_path"].replace("public", ""),
"hash": page["hash"], "hash": page["hash"],
} }

View file

@ -79,6 +79,7 @@ def get_pages_info(search_directory, root_directory):
# Add the metadata, sha256 hash, character count, word count, and path to the dictionary # Add the metadata, sha256 hash, character count, word count, and path to the dictionary
page_info[full_path] = { page_info[full_path] = {
"local_path": local_path, "local_path": local_path,
"absolute_path": full_path,
"metadata": metadata, "metadata": metadata,
"hash": sha256_hash, "hash": sha256_hash,
"char_count": char_count, "char_count": char_count,