pngwn / MDsveX

A markdown preprocessor for Svelte.
https://mdsvex.pngwn.io
MIT License
2.36k stars 102 forks source link

Redesign layouts #584

Open pngwn opened 7 months ago

pngwn commented 7 months ago

The conversation around layouts has changed somewhat since the release of Sveltekit.

Questions:

Related issues:

zmre commented 4 months ago

There isn't an issue for it, but I don't think you can currently use data from, for example, a +layout.ts (so no server-side data available) and you also can't use stores like the page store, which tells you the current path of the current URL, for example, which makes it hard to put navigation elements into a "layout" for a mdsvex markdown file. I expect at least one if not both of these problems would be resolved if the kit layout system were being used and that would greatly simplify my code and keep me from having to do a bunch of data loading and displaying in the browser after first render to handle navigation stuff.

pngwn commented 4 months ago

Yes. I'm trying to figure how best to approach this issue both for kit and non-kit users.

I'm partly waiting to see what impact svelte 5 will have on kit before I make any concrete decisions.