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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user