mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
feat(global) several major updates:
- delete page `tag`, `archive` - add page `friends` - implement page `about` *partially*
This commit is contained in:
18 files changed
+323
-113
No files matched your search
@@ -0,0 +1,17 @@
|
||||
export async function fetchText(url: string, ttl: number = 600) {
|
||||
const res = await fetch(url, {
|
||||
next: {
|
||||
revalidate: ttl
|
||||
}
|
||||
});
|
||||
return await res.text();
|
||||
}
|
||||
|
||||
export async function fetchJson(url: string, ttl: number = 600) {
|
||||
const res = await fetch(url, {
|
||||
next: {
|
||||
revalidate: ttl
|
||||
}
|
||||
});
|
||||
return await res.json();
|
||||
}
|
||||
Reference in new issue
Block a user