diff --git a/src/lib/server/Metadatas.js b/src/lib/server/Metadatas.js index cadec72..eb4055f 100644 --- a/src/lib/server/Metadatas.js +++ b/src/lib/server/Metadatas.js @@ -10,7 +10,6 @@ async function Metadatas() { const cache_dir = '/tmp/day.moris.blog/'; const cache_file = `${cache_dir}metadata.json`; - async function build() { const posts = await Posts(); @@ -20,9 +19,11 @@ async function Metadatas() { return {postId, metadata} })) - const sorted = metadataList.sort((a,b)=>{ + const sorted = metadataList + .sort((a,b)=>{ return b.metadata.date.getTime() - a.metadata.date.getTime() }) + .filter((m)=> dev||m.metadata.published) return sorted } diff --git a/src/routes/(DefaultStyle)/[slug]/+page.svelte b/src/routes/(DefaultStyle)/[slug]/+page.svelte index b2a34d0..9a0bc09 100644 --- a/src/routes/(DefaultStyle)/[slug]/+page.svelte +++ b/src/routes/(DefaultStyle)/[slug]/+page.svelte @@ -7,13 +7,11 @@