renamed folders to check for conflicts

This commit is contained in:
Orion Reed 2023-08-12 19:21:48 +01:00
parent 5a7b53b1ec
commit 15ca468d30
10 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -16,9 +16,9 @@ export function App() {
<Box mb="xl">
<Router>
<Home path="/" />
<Posts path="/posts(/?)" />
<Post path="/posts/:title(/?)" />
<Stream path="/stream(/?)" />
<Posts path="/posts" />
<Post path="/posts/:title" />
<Stream path="/stream" />
<NotFound default />
</Router>
</Box>

View File

@ -46,7 +46,7 @@ export default function Post() {
useEffect(() => {
if (current) {
getPost(current).then(setPost)
getPost(`/posts_md/${current}`).then(setPost)
}
}, [current])