1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-06-30 22:26:38 -04:00

generate permalinks when parsing note

This commit is contained in:
2022-01-03 16:26:20 -05:00
parent 6d81939b8b
commit d2b71887b4
5 changed files with 16 additions and 111 deletions

View File

@ -1,5 +1,4 @@
import * as Sentry from "@sentry/node";
import * as config from "../../lib/config";
import { getAllNotes } from "../../lib/parse-notes";
import pRetry from "p-retry";
import faunadb from "faunadb";
@ -101,7 +100,7 @@ const getSiteStats = async (client) => {
const match: any = notes.find((note) => `notes/${note.slug}` === page.slug);
if (match) {
page.title = match.title;
page.url = `${config.baseUrl}/${page.slug}/`;
page.url = match.permalink;
page.date = match.date;
}