shuding / nextra

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

Put back "raw" as layout option in v4 #3541

Open Firgrep opened 2 hours ago

Firgrep commented 2 hours ago

Is your feature request related to a problem? Please describe. I would like the flexibility of fully controlling a page when needed. Certain pages, such as landing pages, need to have full width for fancy backgrounds, etc. Currently, "full" layout has a div with a max width high up and then an article that further adds padding.

Screenshot from 2024-10-25 18-47-07

image

Describe the solution you'd like Put back "raw" as a layout option as it was before.

Or at least put the CSS into classes that I can then select and override for the particular page.

Describe alternatives you've considered Creating pages apart from Nextra routes, but then I have to duplicate the navbar, footer etc, which doesn't seem like a good idea.

dimaMachina commented 2 hours ago

you can use page.{jsx,tsx} for it, an example from migrated nextra.site

Firgrep commented 2 hours ago

Thanks for super quick reply! I was trying to use a page.tsx, but I'm also trying out the catch-all [[...mdxPath]] route, since it's so much nicer to deal with docs using the content folder, and that caused a route collision.

I've nested the catch-all route one level down. /test-path/[...mdxPath]] which seems to have done the trick, but it seems it's not obeying the _meta.ts file properly anymore, type: "page", is not being respected 🤔 do I need to make any changes in the content folder?

dimaMachina commented 2 hours ago

I will take a look at how to use page files with catch-all [[...mdxPath]] route once I will have some free time, thanks for the feedback!