1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-16 19:45:33 -04:00

less resource-intensive methods of parsing URLs

This commit is contained in:
2022-06-01 18:40:57 -04:00
parent d1ee8b2632
commit 33c210aacf
16 changed files with 195 additions and 188 deletions

View File

@@ -5,7 +5,6 @@ import { serialize } from "next-mdx-remote/serialize";
import glob from "fast-glob";
import pMap from "p-map";
import matter from "gray-matter";
import urlJoin from "url-join";
import { minify } from "uglify-js";
import { compiler } from "markdown-to-jsx";
import removeMarkdown from "remove-markdown";
@@ -66,7 +65,7 @@ export const getNoteData = async (
// parsed markdown title:
htmlTitle,
slug,
permalink: urlJoin(baseUrl, "notes", slug, "/"),
permalink: `${baseUrl}/notes/${slug}/`,
date: formatDateISO(data.date), // validate/normalize the date string provided from front matter
},
content,