Statiq.Web
Statiq.Web copied to clipboard
New Stylesheets, Scripts, and HeadJavascripts, BodyJavascripts metadata
Add new metadata to the Blog and Docs recipes called Stylesheets
, Scripts
, and InlineScripts
. These will "inject" the specified URLs or inline scripts into the HTML after Razor processing. The new values should be additive (#777).
-
Stylesheets
will inject a<link rel="stylesheet" href="...">
just before the closing</head>
-
Scripts
will inject a<script src="..."></script>
just before the closing</head>
-
HeadJavascripts
will inject a<script type="text/javascript">...</script>
just before the closing</head>
-
BodyJavascripts
will inject a<script type="text/javascript">...</script>
just before the closing</body>
Hey @daveaglick, any progress on this? I was just about to ask about how best to inject some additional styles and script into my site when I found this issue.
Incidentally, it would be great if this metadata could be provided at a blog post level (perhaps along side the Title, Lead, etc) so styles/code could be included for just specific posts (I'm writing a particularly complex one ATM).
Thanks!
@ibebbs This likely won't make it into Wyam - most new development effort is going into Statiq and Wyam is essentially in maintenance mode. That's not as dire as it sounds though - Statiq is a "reboot" of Wyam, think of it as Wyam v3.
The good news is that Statiq is designed with a lot of lessons learned over the last several years so enhancements like this will be easier to implement. As the Wyam blog and docs recipes get ported I'll also go through backlog issues like these and try to knock out a bunch of them as I go. The not so good news is that while development is proceeding quickly and well, we're still a few months away from the blog and docs recipes getting ported.
Hi Dave, thanks for getting back to me.
Statiq looks interesting. I'd be keen to understand what it offers over or issues it resolves within Wyam which has been my go-to static site generator for quite some time now.
Is there a Gitter or Slack channel for it?
I'm still using the main Wyam Gitter for both: https://gitter.im/Wyamio/Wyam. I'm strongly considering setting up a Spectrum room for Statiq going forward though - Gitter has been flaky and the experience isn't great IMO.
Some big differences/advantages off the top of my head:
- Configured and executed as a "normal" console app - no more scripted config file
- New fluent builder-style API for configuring the generator
- Fully async/await throughout (big performance gains)
- Pipelines are fully parallel with flexible dependency declaration and smart ordering of execution
- Much more attention to the experience of module developers and other ways to extend which is now a first-class, expected use case
- Planned improvements to the themeing capabilities which should make it easier to create themes that add extra capabilities without needing extra configuration