Styx 0.5.0 released

Highlights:

  • New theme: generic-templates. The generic-templates theme provide a template framework and basic templates for common components.
  • Showcase and Hyde themes have been ported to use generic-templates.
  • Theme configuration interface can be typed, and site configuration is type-checked.
  • styx-themes full documentation.
  • Themes metadata.
  • Interactive debugging with nix-repl.
  • simpler and shorter site.nix
  • Themes can provide function libraries.
  • Content timestamps support time.

Breaking Changes:

  • Many, among others:
  • site.nix was greatly refactored.
  • Themes theme.nix was removed, its functionality is divided in two files, conf.nix and meta.nix. conf.nix for configuration interface and meta.nix for theme metadata.
  • Themes meta.nix file must be present and must declare a id attribute specifying the theme identifier.
  • lib.pages.setDefaultLayout was removed (default pages values can be set with the default argument of lib.generation.pagesToList).
  • all occurences of href in function names / parameters and template variables has been replaced with path, pages path attribute must start with a /.

Upgrading:

This release brings many incompatible changes that requires to refactor site.nix to upgrade.
Changes involve, among others, the init section of site.nix, site.nix returning a set instead of a generateSite call and href occurrences replaced by path (path attributes must start with a /).


Thoughts:

At the moment of writing, styx 0.5.0 is only available in the nixpkgs-unstable channel.
If you are on a different channel and want to test / install styx 0.5.0, use the following command:

Testing with nix-shell:

$ nix-shell -p styx -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixpkgs-unstable.tar.gz

Installing:

$ nix-env -A styx -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixpkgs-unstable.tar.gz

Note that the build, preview, live, serve and deploy commands require system active nixpkgs to provide the same version of styx as the one used, 0.5.0.
For these commands -I nixpkgs=... can also be used to set the version of nixpkgs to use, for example:

$ styx preview -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixpkgs-unstable.tar.gz

Learn more in the Styx 0.5.0 Documentation, release notes.

Contribute to Styx via GitHub repository.

Problems and bugs should be reported to the issue tracker.