We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using the Statiq.Web NuGet package to render handlebar templates into a static website.
Statiq.Web
While I like the idea of Statiq a lot, there is little to no documentation on how to actually use it.
My Statiq pipeline currently looks as follows.
await Bootstrapper .Factory .CreateDefault(args) .BuildPipeline("Render home", builder => builder .WithInputReadFiles("home.hbs", "Partials/*.hbs") .WithProcessModules( new RenderHandlebars() .WithModel(new MyModel()) .WithPartial("head", Config.FromContext(c => c.Inputs.First(i => i.Source.Name == "head.hbs").ContentProvider.GetTextReader().ReadToEnd()))) .WithOutputWriteFiles(".html")) .RunAsync();
This does work and all the Handlebars features (placeholders and partials) are rendered correctly.
However, it does not feel 100% clean to read the content of the partial with: .ContentProvider.GetTextReader().ReadToEnd()
.ContentProvider.GetTextReader().ReadToEnd()
Is there a way to do this more elegantly?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am using the
Statiq.Web
NuGet package to render handlebar templates into a static website.While I like the idea of Statiq a lot, there is little to no documentation on how to actually use it.
My Statiq pipeline currently looks as follows.
This does work and all the Handlebars features (placeholders and partials) are rendered correctly.
However, it does not feel 100% clean to read the content of the partial with:
.ContentProvider.GetTextReader().ReadToEnd()
Is there a way to do this more elegantly?
The text was updated successfully, but these errors were encountered: