v0.1.6
This release introduces Go Template syntax in Huge config files as well as an output_path
setting for scripts and styles publishing.
huge/Config: Go Template in config
With this feature, it is now possible to add Go Template syntax to configuration files.
# _huge/config/seo.yaml
enable_follow: true
default_image: {{ site.Home.Params.featured_image }}
or
# _huge/config/seo.yaml
disable_jsonld: true
default_image: {{ partial "func/GetDefaultImage" "GetDefaultImage" }}
Limitation
- It can only work with basic types (string, boolean, integer).
- It cannot bear a dynamic context. If a context is really needed, the user should use a partial and pass anything available globally (like
site
, not.Page
).
default_image: {{ partial "func/GetDefaultImage" (site.GetPage "/blog") }}
huge/Styles and huge/Scripts: output_path
setting
It is now possible when declaring a style or a script to specify an output_path
. This means a nested source file like /assets/js/my-framework/index.jsx
can be published at /main.js
. Previously the output path was the same as the source path.
WARNING: extension of the output path should match expected processed file's and not source's (.jsx
> .js
, .scss
> .css
# _huge/config/styles.yaml
styles:
- name: main
path: global/sass/_.scss
output_path: /main.css
What's Changed
- Allow Go Template in config file by @regisphilibert in #75
- Add
output_path
setting to script and style. by @regisphilibert in #76
Full Changelog: v0.1.5...v0.1.6