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() {
|
function loadPosts() {
|
||||||
const posts_dir = 'public/posts/';
|
const posts_dir = 'public/posts_md/';
|
||||||
const posts = glob.sync(`${posts_dir}*.md`).map((file) => {
|
const posts = glob.sync(`${posts_dir}*.md`).map((file) => {
|
||||||
const content = fs.readFileSync(file, 'utf8');
|
const content = fs.readFileSync(file, 'utf8');
|
||||||
const slug = file.replace(`${posts_dir}`, '').replace('.md', '');
|
const slug = file.replace(`${posts_dir}`, '').replace('.md', '');
|
||||||
|
|
@ -15,7 +15,7 @@ function loadPosts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadStream() {
|
function loadStream() {
|
||||||
const streams_dir = 'public/stream/';
|
const streams_dir = 'public/stream_md/';
|
||||||
const posts = glob.sync(`${streams_dir}*.md`).map((file) => {
|
const posts = glob.sync(`${streams_dir}*.md`).map((file) => {
|
||||||
const content = fs.readFileSync(file, 'utf8');
|
const content = fs.readFileSync(file, 'utf8');
|
||||||
const md = fm(content)
|
const md = fm(content)
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ export function App() {
|
||||||
<Box mb="xl">
|
<Box mb="xl">
|
||||||
<Router>
|
<Router>
|
||||||
<Home path="/" />
|
<Home path="/" />
|
||||||
<Posts path="/posts(/?)" />
|
<Posts path="/posts" />
|
||||||
<Post path="/posts/:title(/?)" />
|
<Post path="/posts/:title" />
|
||||||
<Stream path="/stream(/?)" />
|
<Stream path="/stream" />
|
||||||
<NotFound default />
|
<NotFound default />
|
||||||
</Router>
|
</Router>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ export default function Post() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (current) {
|
if (current) {
|
||||||
getPost(current).then(setPost)
|
getPost(`/posts_md/${current}`).then(setPost)
|
||||||
}
|
}
|
||||||
}, [current])
|
}, [current])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue