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-themesfull 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.nixwas greatly refactored. - Themes
theme.nixwas removed, its functionality is divided in two files,conf.nixandmeta.nix.conf.nixfor configuration interface andmeta.nixfor theme metadata. - Themes
meta.nixfile must be present and must declare aidattribute specifying the theme identifier. -
lib.pages.setDefaultLayoutwas removed (default pages values can be set with thedefaultargument oflib.generation.pagesToList). - all occurences of
hrefin function names / parameters and template variables has been replaced withpath, pagespathattribute 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.