Skip to content
card background pattern
Level 2

Sapper For Beginners

Unlock Full Course

$39.99 $24.99

Or

$24.99/Month

Building A Markdown Blog Part 2

In this video, we will continue post creation and complete our blog functionality.

Downloads

Comments

User photo avatar
Raul
about 1 month ago

@Richard Nash You probably want to use fs.readdir - something similar to what you can see in the following link but potentially changing your approach a little bit: https://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search

Another useful link to you would be https://nodejs.org/api/fs.html

I hope this is of help to you!

Richard Nash
about 1 month ago

How could I alter the file fetching to fetch markdown files in their own folders? Rather than having a folder called posts with post-one.md, etc...I have a folder called posts with FOLDERS inside named post-one, then inside each of those folders I have a markdown file called index.md, so that every markdown file is called index.md inside a folder that is named the posts name.

Something to say?

Become a Pro