diff --git a/log/index.html b/log/index.html index 6981a70..2e7d592 100644 --- a/log/index.html +++ b/log/index.html @@ -88,7 +88,7 @@
zig fetch --save "git+https://github.com/kristoff-it/zine#v0.1.0"
-Zine has finally reached a first tagged release!
A lot has happened in these 4 months, so read this changelog to learn how to upgrade your Zine website.
The first thing that changed is the recommended way of updating your build.zig.zon
.
The second is that Zine now tracks the latest stable version of Zig, which is 0.13.0 at the moment of writing.
Now onto new features and breaking changes:
The recommended GitHub Actions Workflow files for building Zine websites on Github have changed. The new version uses the mlugg/setup-zig@v1 action that will automatically manage caching for you. It is highly recommended to update your scripts.
While you're at it, change --summary all
to --summary new
, which will only list the pages that were rebuilt.
SuperHTML (Zine's templating language) dropped Tree Sitter as its HTML parser in favor of a handcrafted implementation that more closely follows the HTML5 spec. This brings us significantly improved error messages and other advantages.
It's highly recommended you install and configure SuperHTML as your language server for both HTML and SuperHTML Templates in order to get in-editor diagnostics and kickass autoformatting. The repo also offers a Tree Sitter grammar for SuperHTML that incudes a few visual improvements for tags and attributes that have semantic meaning.
SuperHTML also has a VSCode extension.
SuperHTML follows the HTML5 spec much more closely and, while writing an HTML parser from scratch for it, I learned that self-closing tags (tags with a final /
) are not a thing in HTML5, so now <extend>
and <super>
have been defined as void elements in SuperHTML and want no final slash nor closing tag.
Note that SuperHTML will consider an error using self-closing tags in HTML (outside of a <svg>
scope).
The correct file extension for templates is .shtml
. You must rename all your templates to the new file extension otherwise you will get an error from SuperHTML when it sees non-HTML compliant syntax, since <extend>
and <super>
are recognized as void elements only in SuperHTML template files.
Scripty has impoved as well: inside of nested loops, it is now possible to access outer $loop
variables by doing $loop.up()
. Each call to up()
goes up one level.
This is thanks to the fact that interrupts were implemented in Scripty, opening the door to features that rely on the ability to pass from the outside values into scripty (up()
relies on that since loops are a SuperHTML concept that Scripty is completely unaware of).
For syntax highlighting, Zine uses a distribution of Tree Sitter that bundles a lot of grammars and highlighting queries from Flow Editor. The dependency has now been updated to a new version that adds support for more languages.
That's mostly it. If you encounter bugs while updating, please don't hesitate to open a new issue on GitHub with a link to a reproduction.
.url = "git+https://github.com/kristoff-it/zine#e33a1d79b09e8532db60347a7ec4bd3413888977",
+Zine has finally reached a first tagged release!
A lot has happened in these 4 months, so read this changelog to learn how to upgrade your Zine website.
The first thing that changed is the recommended way of updating your build.zig.zon
.
The second is that Zine now tracks the latest stable version of Zig, which is 0.13.0 at the moment of writing.
Now onto new features and breaking changes:
The recommended GitHub Actions Workflow files for building Zine websites on Github have changed. The new version uses the mlugg/setup-zig@v1 action that will automatically manage caching for you. It is highly recommended to update your scripts.
While you're at it, change --summary all
to --summary new
, which will only list the pages that were rebuilt.
SuperHTML (Zine's templating language) dropped Tree Sitter as its HTML parser in favor of a handcrafted implementation that more closely follows the HTML5 spec. This brings us significantly improved error messages and other advantages.
It's highly recommended you install and configure SuperHTML as your language server for both HTML and SuperHTML Templates in order to get in-editor diagnostics and kickass autoformatting. The repo also offers a Tree Sitter grammar for SuperHTML that incudes a few visual improvements for tags and attributes that have semantic meaning.
SuperHTML also has a VSCode extension.
SuperHTML follows the HTML5 spec much more closely and, while writing an HTML parser from scratch for it, I learned that self-closing tags (tags with a final /
) are not a thing in HTML5, so now <extend>
and <super>
have been defined as void elements in SuperHTML and want no final slash nor closing tag.
Note that SuperHTML will consider an error using self-closing tags in HTML (outside of a <svg>
scope).
The correct file extension for templates is .shtml
. You must rename all your templates to the new file extension otherwise you will get an error from SuperHTML when it sees non-HTML compliant syntax, since <extend>
and <super>
are recognized as void elements only in SuperHTML template files.
Scripty has impoved as well: inside of nested loops, it is now possible to access outer $loop
variables by doing $loop.up()
. Each call to up()
goes up one level.
This is thanks to the fact that interrupts were implemented in Scripty, opening the door to features that rely on the ability to pass from the outside values into scripty (up()
relies on that since loops are a SuperHTML concept that Scripty is completely unaware of).
For syntax highlighting, Zine uses a distribution of Tree Sitter that bundles a lot of grammars and highlighting queries from Flow Control. The dependency has now been updated to a new version that adds support for more languages.
That's mostly it. If you encounter bugs while updating, please don't hesitate to open a new issue on GitHub with a link to a reproduction.
2024-03-26
.url = "git+https://github.com/kristoff-it/zine#e33a1d79b09e8532db60347a7ec4bd3413888977",
.hash = "12209f9be74fcc805c0f086e4a81ccca041354448f5b3592e04b6a6d1b4a95da5a26",
Added support for multilingual websites. See the corresponding docs page for more info. Because of this change now the AddWebsiteOptions
struct is slightly different, here's how to fix it:
Take the contents of site
and move them top level, rename base_url
to host_url
.
Related-but-distinct from the above, you can now specify an output prefix for your static site. The feature was added primarily for i18n purposes but can also be used in simple websites to add an arbitrary prefix.
The markdown renderer now renders tables!
Fixed a crash in the dev server that would trigger when refreshing the page multiple times in quick succession (the crash was related to websockets). There's still one remaining known bug related to this same problem though.
The dev server now works on Windows (thanks Parzival-3141)
New Scripty builtins:
Strings
addPath()
similar to suffix
but knows when to add a /
or not.
fmt()
replaces occurrences of {}
in your strings with the provided string arguments.
Maps, refined the get
family of functions
get(key, fallback)
allows to get a key from a map and provide a fallback value
get!(key)
errors out if the key doesn't exist
get?(key)
returns null if the value is missing, to be used in conjunction with if
attributes.
2024-03-21
.url = "git+https://github.com/kristoff-it/zine#ecc72eb042af07f5b4690a35a7ca1dd9c6fd5b61",