Repository navigation
v2.0.0
A major release. The public API only grows: no public item was removed or changed, and the
new ones are listed under Added. The rendered output and the runtime behaviour change in
three places, on purpose: text() and raw_text() append in call order, clean() needs the
.molt-output marker, and Debug stops at 128 levels. Each is under Breaking, Security or
Fixed below, with its row in MIGRATION.md (1.x to 2.0.0).
Breaking
Element::textandElement::raw_textappend at the position of the call instead of
replacing a content slot that always rendered before the children.p().child(x).text(y)
now rendersyafterx, and callingtexttwice renders both (#110). A row in
MIGRATION.md's Output changes table.StaticSiteGenerator::cleanonly empties a directory that is missing, empty, or holds the
.molt-outputmarker. Writing a page or an asset leaves the marker, so a site Molt built
keeps working; adistmade before 2.0.0, or by anything else, is refused once with
SsgError::UnsafeCleanTarget(#115). A row inMIGRATION.md.
Security
clean()with a relative path no longer empties the./distof whatever directory the
process runs from: the output directory has to carry the marker. A symbolic link as the
output directory is refused too (#115).
Added
scripts/check-changelog.sh, step 8 ofscripts/verify.sh: fails when a public item
added since the last release tag is not named in[Unreleased]. The CI verify job now
fetches the tags for it (#134).Document::html_attrandDocument::html_attrs: attributes on<html>afterlang
(data-theme,dir,class), written the same byrender,render_compact,render_to
androot().Documentgains the public fieldhtml_attributes(#111).SeoBuildersettersrobots,viewport,canonical,alternate(repeatable,x-default
included),locale,locale_alternate,image_size,image_alt,theme_colorand
color_scheme. Each tag is written only when its setter is called, in a fixed order, so
a builder that does not call them renders what it did before (#112).StaticSiteGenerator::copy_dirandcopy_dir_where: copy a directory tree into the output
directory, atomically per file, with a name filter. Symbolic links in the source are skipped
and the output directory is never copied into itself. Returns the number of files (#113).ssg::OUTPUT_MARKER, the name of that file.SitemapUrl::alternate(hreflang, href)and the public fieldalternates: other-language
versions written as<xhtml:link rel="alternate">.xmlns:xhtmlis declared only when one
is written; a pair with a non-http(s)URL or a malformed language tag is left out (#114).Element::find,Element::find_allandNode::find,Node::find_all: search a tree for
elements by tag, in document order, with an explicit stack and without cloning; and
Element::attribute(name), the value as written into the markup. For asserting on a built
tree in a test. There is notext_content: text is stored escaped, so it would have to
return markup, andfind(..).render()already says that (#116).preload_font(href):<link rel="preload" as="font" …>that always carriescrossorigin
(per the web platform, without it the font is fetched twice; not exercised by the tests)
and takestypefrom the extension (#128).Element::csp_hash: thesha256-…hash of what a<script>or<style>holds, for a
Content-Security-Policy that lists inline content instead of allowing'unsafe-inline'.
SHA-256 and base64 are written in the crate, so there is still no dependency (#127).StaticSiteGenerator::copy_asset_hashed(from, dir): copies a file todir/name.<hash>.ext
(64-bit FNV-1a of the content) and returns the URL, so CSS and JS can be cached for a year
without serving a stale copy after a rebuild. It renames one file and rewrites noimport
orurl(...); the doc says how to work with that (#126)..github/workflows/fuzz.yml: the four fuzz targets run every night and on demand, on
nightly Rust with a pinnedcargo-fuzz, with the corpus kept between runs and a crashing
input uploaded as an artifact. It is outside the pull-request gate, so a red run never blocks
a merge.scripts/fuzz.shnow runs every target even after one fails (#91).
Fixed
DebugforNodeandElementno longer aborts the process on a deeply nested tree. It
was a derive that recursed once per level, so{:?}and the failure message of
assert_eq!on a 100,000-level tree overflowed the stack. It is now written by hand, prints
what the derive printed down to 128 levels, and writes...below that (#79).
Documentation
- The official Claude Code skill,
using-molt-framework, is documented in the README (and its
pt-BR copy),docs/agents.mdandllms.txt: its repository is
molt-framework-skill, installed with
/plugin marketplace addand/plugin install, or withnpx skills add. It is submitted to
Anthropic's plugin directory and waiting for review. - The README, its pt-BR copy, the getting-started guides,
SECURITY.md,CONTRIBUTING.md
andROADMAP.mddescribe 2.0: install lines say"2.0", the feature lists name the new
APIs, 1.x stops receiving fixes, and the roadmap is the 2.x line.MIGRATION.mdhas one
section for 1.x to 2.0.0 (output changes,clean()and the marker, what is new). docs/capabilities.md,docs/pitfalls.md,docs/agents.mdandllms.txt, which ship in
the published crate (the.claude/notes do not): is there an API for X by version and what
is out of scope on purpose, the symptom-to-fix tables, a block to paste into a project's
AGENTS.md, and an index in the llmstxt.org format.scripts/check-knowledge-base.shchecks
that they are incargo package --listand that their links resolve (#135).- The official site, https://www.molt-framework.io, is linked from
Cargo.toml(homepage,
so crates.io shows it), the READMEs, the getting-started guides and the crate documentation
(#117). docs/performance.md(anddocs/pt-BR/performance.md): a checklist for shipping a fast
site built with Molt. Each item says whether it was measured by the site's author, is
general web behaviour, or is run as a doc test here (#129).
Install
[dependencies]
molt-framework = "2.0.0"The library is imported as molt: use molt::prelude::*;
What's Changed
- Update: back-merge da 1.1.1 em develop by @micheltlutz in #109
- Fix: text() e raw_text() anexam na ordem da chamada by @micheltlutz in #118
- Add: Document::html_attr e html_attrs by @micheltlutz in #119
- Add: setters do SeoBuilder para site multilíngue by @micheltlutz in #120
- Add: StaticSiteGenerator::copy_dir e copy_dir_where by @micheltlutz in #121
- Fix: clean() só esvazia um diretório que o Molt fez by @micheltlutz in #123
- Add: SitemapUrl::alternate para hreflang no sitemap by @micheltlutz in #122
- Add: Element::find, find_all, attribute e Node::find, find_all by @micheltlutz in #124
- Docs: citar o site oficial www.molt-framework.io by @micheltlutz in #125
- Add: preload_font, o preload de fonte que já sai com crossorigin by @micheltlutz in #130
- Add: Element::csp_hash para <script> e <style> sob CSP estrita by @micheltlutz in #131
- Add: StaticSiteGenerator::copy_asset_hashed by @micheltlutz in #132
- Docs: guia de desempenho para sites feitos com o Molt by @micheltlutz in #133
- Fix: Debug de Node e Element não aborta mais em árvore muito funda by @micheltlutz in #136
- Add: workflow noturno de fuzzing by @micheltlutz in #137
- Fix: restaura as entradas perdidas do CHANGELOG e checa que não se percam by @micheltlutz in #138
- Docs: o que um projeto consumidor lê vai dentro do pacote publicado by @micheltlutz in #139
- Docs: README, ROADMAP, MIGRATION e demais documentos para a 2.0.0 by @micheltlutz in #140
- Docs: a skill oficial do Molt (molt-framework-skill) e como instalá-la by @micheltlutz in #141
- Update: versão 2.0.0 by @micheltlutz in #142
- Release 2.0.0: develop em main by @micheltlutz in #143
Full Changelog: v1.1.1...v2.0.0