Skip to content

v0.1.6

Compare
Choose a tag to compare
@regisphilibert regisphilibert released this 27 Oct 20:40
· 4 commits to main since this release

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

Full Changelog: v0.1.5...v0.1.6