renamed folders to check for conflicts
This commit is contained in:
parent
5a7b53b1ec
commit
15ca468d30
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export default function Post() {
|
|||
|
||||
useEffect(() => {
|
||||
if (current) {
|
||||
getPost(current).then(setPost)
|
||||
getPost(`/posts_md/${current}`).then(setPost)
|
||||
}
|
||||
}, [current])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue