Which JavaScript framework should I use to render Markdown files from a Git repository?

0
7
Asked By CuriousCat42 On

Hey everyone, I'm having a tough time finding a JavaScript framework that can help me render Markdown files on the client side. Ideally, I want to have an index.html that connects to a Git repository, and then the JavaScript will handle rendering everything. I suppose I'd use Markdown for the content, and maybe JSON for layout? Is this a viable approach or do I sound a bit off? Thanks for any advice!

4 Answers

Answered By TechWhiz123 On

You've got several good options depending on your stack. If you're looking for something lightweight, VanillaJS combined with Marked.js is a solid choice. If you’re open to a more advanced setup, you could use Astro's fetch() function along with a Markdown parser like Marked or markdown-it to render the HTML in the browser. Just think about what you're aiming for: quick and simple? Go for VanillaJS + Marked. Want something more scalable? Consider Astro or Next.js.

Answered By DevGuru88 On

Just a heads up about those Markdown files from a Git repository—they need to be hosted somewhere accessible to your app. If you're using a public Git repo on GitHub, that should work fine!

Answered By WebCraftsman On

Astro or Eleventy (11ty) is worth looking into for your needs.

Answered By MarkdownMaster99 On

I personally prefer 11ty for this type of task. While it might not hit your use case exactly, it’s flexible enough to help you achieve what you want, especially if you’re okay with pre-rendering the files when you push to a Git repository.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.