x_arthurx
efficient way of parsing markdown files with solidjs and solid-start
I'm recently starting to learn to write a blog from scratch with solidjs and solid-start. After watching many videos, I'm still a bit confused about several concepts here about SSR and file parsing etc:
1. I have a folder that contains many markdown files, with front-matter (title, date, tag, etc.).
2. Like most blog website, I'm planning to have a front page (P1) showing the most 10 recent posts, each is a link that link to a separate page (Pn) with that post.
Based on my understanding, I need to:
1. For P1, I need to load all the markdown files (at least their front-matter?), and show them.
2. For Pn I need to render the page.
Question:
1. For each Pn, is it loaded twice if I open the page (once on P1, and once for open Pn)? Should I use a server side database, or
import.meta.glob
is enough?
2. Is solid-start's mdx render enough for the separate page, or I need to write my own components since the markdown have front-matter?
3. recommended packages? (If need for parsing .md
file or front-matter)9 replies