Cheick Kante
07/28/2025, 9:38 AMval markdownContent = ctx.markdown!!.frontMatter["content"]
or even better, if, I can have this:
@Layout
@Composable
fun MarkdownLayout(content: (String) -> Unit)
beside this:
@Layout
@Composable
fun MarkdownLayout(content: @Composable () -> Unit)
David Herman
07/28/2025, 4:40 PMI don't think there's anything built in but you can access them during build time and e.g. generate a class for each md file containing the raw content https://kobweb.varabyte.com/docs/concepts/foundation/markdown#iterating-over-all-markdown-files https://kobweb.varabyte.com/docs/guides/generating-code
Yeah we intentionally don't expose the text because that would increase the size of the final site. I haven't tried but you might also be able to put the markdown files under the public directory (and change the markdown path root)? That way you could fetch the file dynamically from your server and avoid baking all that text into your output js