Closed snellingio closed 1 year ago
A couple of thoughts:
renderUsing
is kind of a hack... because I don't really want to override the default Blade rendering, only custom extensions. So it might be more thoughtful to store a map of extension
-> handler
InlineMetadataInterceptor
which really should be pulling from the front matter, instead of using PHP. I've done that in my package, but I've literally just swapped the singleton in the container..md
by default out of the box is a no-brainer... but if you give a mouse a cookie... IMO this moves the package closer to VitePress or Astro territory, and inevitably someone will want to stick their images next to the markdown files. In light of the above, I'm going to move this to draft status. And I'm leaning away from you merging this without more thought. I'm also open to someone taking a completely different shot at how to implement it.
I just want this feature 🙏
Thank you for proposing this. We putting this on hold for now!
This is a first pass at making #70 possible.
It turns out, the
FolioManager
class has a$renderUsing
closure. This PR makes it possible for users to tell Folio to actually look at other file extensions other than.blade.php
.(See renderUsing here: https://github.com/laravel/folio/blob/master/src/FolioManager.php#L25)
It's still unclear whether including a heavier "markdown" extension out of the box is worth it r/e the cost of complexity and maintenance. However, because Folio allows users to pass in a custom Render function, if we allow passing in of extensions, this will give end users the ability to extend this functionality themselves.