1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-28 20:35:49 -04:00

prepare for new next/link behavior

see new-next-link branch
This commit is contained in:
2022-04-28 12:32:50 -04:00
parent ad1d1bbce1
commit e1da53a1fe
9 changed files with 13 additions and 16 deletions

View File

@@ -33,7 +33,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
// push notes separately and use their metadata
const notes = await getAllNotes();
notes.map((note) =>
notes.forEach((note) =>
pages.push({
loc: urlJoin("/notes/", note.slug, "/"),
// pull lastMod from front matter date
@@ -43,7 +43,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
);
// make all relative URLs absolute
pages.map((page) => (page.loc = urlJoin(baseUrl, page.loc)));
pages.forEach((page) => (page.loc = urlJoin(baseUrl, page.loc)));
// cache on edge for 12 hours
const { res } = context;