From 15ca468d3053c86a80980c3452784a869c4d41b1 Mon Sep 17 00:00:00 2001 From: Orion Reed Date: Sat, 12 Aug 2023 19:21:48 +0100 Subject: [PATCH] renamed folders to check for conflicts --- public/{posts => posts_md}/foobar.md | 0 public/{posts => posts_md}/test.md | 0 public/{posts => posts_md}/wobblywoo.md | 0 public/{stream => stream_md}/1.md | 0 public/{stream => stream_md}/2.md | 0 public/{stream => stream_md}/3.md | 0 public/{stream => stream_md}/4.md | 0 scripts/prebuild.mjs | 4 ++-- src/index.tsx | 6 +++--- src/pages/Post.tsx | 2 +- 10 files changed, 6 insertions(+), 6 deletions(-) rename public/{posts => posts_md}/foobar.md (100%) rename public/{posts => posts_md}/test.md (100%) rename public/{posts => posts_md}/wobblywoo.md (100%) rename public/{stream => stream_md}/1.md (100%) rename public/{stream => stream_md}/2.md (100%) rename public/{stream => stream_md}/3.md (100%) rename public/{stream => stream_md}/4.md (100%) diff --git a/public/posts/foobar.md b/public/posts_md/foobar.md similarity index 100% rename from public/posts/foobar.md rename to public/posts_md/foobar.md diff --git a/public/posts/test.md b/public/posts_md/test.md similarity index 100% rename from public/posts/test.md rename to public/posts_md/test.md diff --git a/public/posts/wobblywoo.md b/public/posts_md/wobblywoo.md similarity index 100% rename from public/posts/wobblywoo.md rename to public/posts_md/wobblywoo.md diff --git a/public/stream/1.md b/public/stream_md/1.md similarity index 100% rename from public/stream/1.md rename to public/stream_md/1.md diff --git a/public/stream/2.md b/public/stream_md/2.md similarity index 100% rename from public/stream/2.md rename to public/stream_md/2.md diff --git a/public/stream/3.md b/public/stream_md/3.md similarity index 100% rename from public/stream/3.md rename to public/stream_md/3.md diff --git a/public/stream/4.md b/public/stream_md/4.md similarity index 100% rename from public/stream/4.md rename to public/stream_md/4.md diff --git a/scripts/prebuild.mjs b/scripts/prebuild.mjs index c566f98..ae6495d 100755 --- a/scripts/prebuild.mjs +++ b/scripts/prebuild.mjs @@ -4,7 +4,7 @@ import fm from 'front-matter'; function loadPosts() { - const posts_dir = 'public/posts/'; + const posts_dir = 'public/posts_md/'; const posts = glob.sync(`${posts_dir}*.md`).map((file) => { const content = fs.readFileSync(file, 'utf8'); const slug = file.replace(`${posts_dir}`, '').replace('.md', ''); @@ -15,7 +15,7 @@ function loadPosts() { } function loadStream() { - const streams_dir = 'public/stream/'; + const streams_dir = 'public/stream_md/'; const posts = glob.sync(`${streams_dir}*.md`).map((file) => { const content = fs.readFileSync(file, 'utf8'); const md = fm(content) diff --git a/src/index.tsx b/src/index.tsx index a2ec7a6..941380f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -16,9 +16,9 @@ export function App() { - - - + + + diff --git a/src/pages/Post.tsx b/src/pages/Post.tsx index 12dd28d..31a0cb9 100644 --- a/src/pages/Post.tsx +++ b/src/pages/Post.tsx @@ -46,7 +46,7 @@ export default function Post() { useEffect(() => { if (current) { - getPost(current).then(setPost) + getPost(`/posts_md/${current}`).then(setPost) } }, [current])