feat: fully move to gsp
This commit is contained in:
parent
83c98908f5
commit
6d6c468be7
5 changed files with 7 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "www-aaronjy-me",
|
"name": "www-aaronjy-me",
|
||||||
"version": "2.2.0",
|
"version": "2.3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
<url><loc>https://www.aaronjy.me/library/1984</loc><priority>0.6</priority></url>
|
<url><loc>https://www.aaronjy.me/library/1984</loc><priority>0.6</priority></url>
|
||||||
<url><loc>https://www.aaronjy.me/library/alices-adventures-in-wonderland</loc><priority>0.6</priority></url>
|
<url><loc>https://www.aaronjy.me/library/alices-adventures-in-wonderland</loc><priority>0.6</priority></url>
|
||||||
<url><loc>https://www.aaronjy.me/library/the-nature-of-alexander</loc><priority>0.6</priority></url>
|
<url><loc>https://www.aaronjy.me/library/the-nature-of-alexander</loc><priority>0.6</priority></url>
|
||||||
<url><loc>https://www.aaronjy.me/library/test</loc><priority>0.6</priority></url>
|
|
||||||
<url><loc>https://www.aaronjy.me/library/eleven-kinds-of-loneliness</loc><priority>0.6</priority></url>
|
<url><loc>https://www.aaronjy.me/library/eleven-kinds-of-loneliness</loc><priority>0.6</priority></url>
|
||||||
<url><loc>https://www.aaronjy.me/library/star-maker</loc><priority>0.6</priority></url>
|
<url><loc>https://www.aaronjy.me/library/star-maker</loc><priority>0.6</priority></url>
|
||||||
<url><loc>https://www.aaronjy.me/library/stray-reflections</loc><priority>0.6</priority></url>
|
<url><loc>https://www.aaronjy.me/library/stray-reflections</loc><priority>0.6</priority></url>
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { NextSeo } from "next-seo";
|
||||||
|
|
||||||
export const Title = "Library";
|
export const Title = "Library";
|
||||||
|
|
||||||
export async function getServerSideProps() {
|
export async function getStaticProps() {
|
||||||
const res = await fetchBookReviews();
|
const res = await fetchBookReviews();
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
@ -23,6 +23,7 @@ export async function getServerSideProps() {
|
||||||
props: {
|
props: {
|
||||||
reviews: stringifyAndParse(reviews),
|
reviews: stringifyAndParse(reviews),
|
||||||
},
|
},
|
||||||
|
revalidate: 60,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { NextSeo } from "next-seo";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export async function getServerSideProps() {
|
export async function getStaticProps() {
|
||||||
const res = await fetchPosts(["title", "date_published", "tags", "slug"], {
|
const res = await fetchPosts(["title", "date_published", "tags", "slug"], {
|
||||||
status: "published",
|
status: "published",
|
||||||
});
|
});
|
||||||
|
@ -26,6 +26,7 @@ export async function getServerSideProps() {
|
||||||
tags,
|
tags,
|
||||||
posts,
|
posts,
|
||||||
},
|
},
|
||||||
|
revalidate: 60,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import StaticContentList from "@/components/StaticContentList/StaticContentList"
|
||||||
import { fetchPosts } from "@/services/content-service";
|
import { fetchPosts } from "@/services/content-service";
|
||||||
import { FailedFetchPostsError } from "@/errors";
|
import { FailedFetchPostsError } from "@/errors";
|
||||||
|
|
||||||
export const getServerSideProps = async () => {
|
export const getStaticProps = async () => {
|
||||||
const res = await fetchPosts(["title", "date_published", "slug"], {
|
const res = await fetchPosts(["title", "date_published", "slug"], {
|
||||||
status: "published",
|
status: "published",
|
||||||
});
|
});
|
||||||
|
@ -25,6 +25,7 @@ export const getServerSideProps = async () => {
|
||||||
props: {
|
props: {
|
||||||
posts,
|
posts,
|
||||||
},
|
},
|
||||||
|
revalidate: 60,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue