1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-26 01:05:49 -04:00

fix sitemap.xml timeouts

This commit is contained in:
2022-07-06 03:32:55 -04:00
parent 0f38ab4f0a
commit 8d47958473
5 changed files with 32 additions and 35 deletions

View File

@@ -9,10 +9,10 @@ import { getNoteSlugs } from "../../lib/helpers/parse-notes";
import { compileNote } from "../../lib/helpers/compile-note";
import * as config from "../../lib/config";
import { articleJsonLd, favicons } from "../../lib/config/seo";
import type { GetStaticProps, GetStaticPaths } from "next";
import type { GetStaticProps, GetStaticPaths, InferGetStaticPropsType } from "next";
import type { NoteWithSource, NoteFrontMatter } from "../../types";
const Note = ({ frontMatter, source }: NoteWithSource) => {
const Note = ({ frontMatter, source }: InferGetStaticPropsType<typeof getStaticProps>) => {
return (
<>
<NextSeo

View File

@@ -3,14 +3,10 @@ import Content from "../../components/Content";
import NotesList from "../../components/NotesList";
import { getAllNotes } from "../../lib/helpers/parse-notes";
import { authorName } from "../../lib/config";
import type { GetStaticProps } from "next";
import type { GetStaticProps, InferGetStaticPropsType } from "next";
import type { NotesByYear } from "../../types";
type StaticProps = {
notesByYear: NotesByYear;
};
const Notes = ({ notesByYear }: StaticProps) => {
const Notes = ({ notesByYear }: InferGetStaticPropsType<typeof getStaticProps>) => {
return (
<>
<NextSeo
@@ -28,7 +24,9 @@ const Notes = ({ notesByYear }: StaticProps) => {
);
};
export const getStaticProps: GetStaticProps<StaticProps> = async () => {
export const getStaticProps: GetStaticProps<{
notesByYear: NotesByYear;
}> = async () => {
// parse the year of each note and group them together
const notes = await getAllNotes();
const notesByYear: NotesByYear = {};