What’s the best way to fetch Markdown from an S3 bucket and render it in a Next.js App Router
Unanswered
Fred posted this in #help-forum
FredOP
Hi everyone! 👋
I’m building a documentation site using Next.js (App Router).
My goal is similar to how the Rust Book works:
• Markdown content is stored remotely in an AWS S3 bucket.
• I want to fetch the markdown remotely, parse it, and render it nicely on a page.
• I also want a sidebar with a list of chapters or sections, allowing users to navigate.
What I’m wondering:
• How should I best build a sidebar?
• Should I manually build a JSON file for sidebar links and fetch it from S3?
• Should I parse headings (H1, H2, etc.) dynamically into a Table of Contents?
• Are there inbuilt solutions (like nextra) for automatic sidebar generation in App Router?
Example of what I want:
• Sidebar like Rust Book (always visible)
• Content fetched and rendered dynamically
https://doc.rust-lang.org/book/
Thanks in advance! 🙏
I’m building a documentation site using Next.js (App Router).
My goal is similar to how the Rust Book works:
• Markdown content is stored remotely in an AWS S3 bucket.
• I want to fetch the markdown remotely, parse it, and render it nicely on a page.
• I also want a sidebar with a list of chapters or sections, allowing users to navigate.
What I’m wondering:
• How should I best build a sidebar?
• Should I manually build a JSON file for sidebar links and fetch it from S3?
• Should I parse headings (H1, H2, etc.) dynamically into a Table of Contents?
• Are there inbuilt solutions (like nextra) for automatic sidebar generation in App Router?
Example of what I want:
• Sidebar like Rust Book (always visible)
• Content fetched and rendered dynamically
https://doc.rust-lang.org/book/
Thanks in advance! 🙏