add: 最新投稿へのリダイレクト
This commit is contained in:
parent
8984d31893
commit
33c3bd30d8
9
src/routes/(DefaultStyle)/post/+page.server.js
Normal file
9
src/routes/(DefaultStyle)/post/+page.server.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import Metas from '$lib/server/Metadatas';
|
||||||
|
|
||||||
|
export async function load(){
|
||||||
|
const postList = await Metas()
|
||||||
|
|
||||||
|
let id = postList[0].postId
|
||||||
|
|
||||||
|
return {id}
|
||||||
|
}
|
7
src/routes/(DefaultStyle)/post/+page.svelte
Normal file
7
src/routes/(DefaultStyle)/post/+page.svelte
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
const { data } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<meta http-equiv="Refresh" content="0; URL={data.id}" />
|
||||||
|
</svelte:head>
|
Loading…
Reference in New Issue
Block a user