Can you have page resources only be included in /public when explicitly used (like /assets)?

Files in /assets will only be included in /public if they’re explicitly used, so for example my untraspiled .sass files won’t show up, but the transpiled and minified .css file will. This is useful behaviour.

Can I do the same for my page resources? All of my page resource images go through a converting/resizing/cropping pipeline, but the original images still get put into /public as well. I can imagine why this may be useful to someone, but not to me! It’s not the end of the world, but it feels like unnecessary bloat. Thanks!

Untested but check out the build options regarding resources. Together with the cascade setting you ahould be able to achieve that

That was exactly it! For anyone wondering in the future, I just put this:

[cascade]
    [cascade.build]
        publishResources = false

in the front matter of /content/_index.md.

Thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.