You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently only MultipleId Generators are to be able to specify their output path while other generators have no idea where Fornax will actually put their output because the mapper is defined outside their scope.
Describe the solution you'd like
Add a new GeneratorOutput : GeneratorSpecified (or replace Custom with it) that allows use of generators with signature SiteContents -> string -> string -> string * string . Similar logic to MultipleFiles but with just one file.
Describe alternatives you've considered
Using MultipleFiles but with only one element.
Additional context
This issue came about when I wanted to add a bit of localization and discovered that I couldn't just add a file like say posts/post.md with a front matter containing lang : en and then have the generator output a file en/posts/post.html.
Sure I could just define a Custom mapper to do that but that's just duplicating loader logic into the config.
The text was updated successfully, but these errors were encountered:
I'm not sure I see the reason to place this logic in the generator rather than in a custom handler in the config?
I'm also not sure what you mean when you say you'd be copying loader logic?
Is your feature request related to a problem? Please describe.
Currently only
MultipleId
Generators are to be able to specify their output path while other generators have no idea where Fornax will actually put their output because the mapper is defined outside their scope.Describe the solution you'd like
Add a new
GeneratorOutput
:GeneratorSpecified
(or replaceCustom
with it) that allows use of generators with signatureSiteContents -> string -> string -> string * string
. Similar logic toMultipleFiles
but with just one file.Describe alternatives you've considered
Using
MultipleFiles
but with only one element.Additional context
This issue came about when I wanted to add a bit of localization and discovered that I couldn't just add a file like say
posts/post.md
with a front matter containinglang : en
and then have the generator output a fileen/posts/post.html
.Sure I could just define a
Custom
mapper to do that but that's just duplicating loader logic into the config.The text was updated successfully, but these errors were encountered: