All checks were successful
🚀 Lint & Test & Deploy / release (push) Successful in 4m5s
- Hide releases under a Detail - Hide all commits under a Detail
29 lines
609 B
TypeScript
29 lines
609 B
TypeScript
export const prerender = true;
|
|
|
|
export async function load({ fetch }) {
|
|
async function fetchChangelog() {
|
|
try {
|
|
const res = await fetch('/CHANGELOG.md');
|
|
return await res.text();
|
|
} catch (error) {
|
|
console.log('Failed to fetch CHANGELOG.md', error);
|
|
return;
|
|
}
|
|
}
|
|
|
|
async function fetchGitInfo() {
|
|
try {
|
|
const res = await fetch('/git.json');
|
|
return await res.json();
|
|
} catch (error) {
|
|
console.log('Failed to fetch git.json', error);
|
|
return;
|
|
}
|
|
}
|
|
|
|
return {
|
|
git: await fetchGitInfo(),
|
|
changelog: await fetchChangelog()
|
|
};
|
|
}
|