shuding / nextra

Simple, powerful and flexible site generation framework with everything you love from Next.js.
https://nextra.site
MIT License
11.25k stars 1.23k forks source link

Docs for “Remote Content” #1509

Open bmuenzenmeyer opened 1 year ago

bmuenzenmeyer commented 1 year ago

I've gotten remote content static-site-generation working two different ways now:

Both seem perhaps a bit "custom" - but considering https://nextra.site/docs/guide/advanced/remote currently has no content, would it be useful to add something? I wouldn't mind taking a stab at it, but feel as if all this might factor into plans started in #20 - so I thought I'd start a conversation.

image

The only quirk I see right now is now TOC support for the loaded content. I don't yet know how to solve that on the engineering level, but thought I'd mention it too.

dimaMachina commented 1 year ago

Versioning is still under development and under testing, will be stable in nextra v3.

If you wanna know more there is no way then try it by yourself. an example can be found here https://github.com/shuding/nextra/tree/main/examples/swr-site/pages/remote

Prottoy2938 commented 1 year ago

Could you share the code for the remote content static-site-generation you made?

AntoineKM commented 1 year ago

hey @bmuenzenmeyer, i'll add the fetch way which is more classic then if someone want to add the octokit way feel free to improve what i'll do