Skip to content

v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Oct 18:21
· 1 commit to main since this release
4dd52a3

molde verify, molde's output checks on any generator's build, and a GitHub Action that
runs check or verify on pull requests. Since 0.1.0:

Added

  • Templates get page.title, page.description and page.index: the page's rendered
    title and description patterns (the strings std_head prints) and its index value,
    so a template can add twitter:title or a tag only on indexable pages without
    repeating the route's patterns. Nothing to do.

  • The check report's pages_by_locale entries and i18n.sparse_locale warnings carry
    the route's template and, on foreach routes, foreach (the collection) next to
    route, so routes that share a path pattern can be told apart. Nothing to do.

  • molde verify DIR: molde's output checks on any generator's build (Hugo, Astro, a
    Next.js static export, Eleventy, Zola, or molde's own out/current). It prints check's
    report shape plus command, pages, warnings and skipped, and exits 1 on an error.

    • Rules for foreign output: every file is classified (not-found pages, redirects and
      aliases, noindex pages), and one URL model handles base paths, clean URLs and
      <base href>.
    • New check ids: links.outside_base, links.clean_urls, canonical.off_host,
      canonical.target_missing, canonical.target_noindex, canonical.shared, redirect.target_missing,
      sitemap.non_canonical_listed, sitemap.not_found, verify.base_url_mismatch,
      verify.no_pages, verify.project_root and the warning verify.all_noindex.
    • Release gate: each generator's official starter, committed in
      tests/verify/fixtures.
    • See Verify any site. molde check is unchanged.
  • A GitHub Action (uses: ManuelFontRodriguez/molde@<version>) runs check or verify:

    • it downloads the release it is pinned to (or version:), with its SHA-256 checked;
    • it writes the report to the job summary and keeps one comment on the pull request up
      to date, per workflow, job and site, escaping everything the report quotes;
    • it fails the job when the check fails (its verdict, or molde's exit code);
    • every input is in action.yml.

    CI runs the action on the fixtures in every pull request.

Changed

  • links.internal compares file names exactly, case included, on every file system. On
    macOS (which ignores case by default) a link to /Logo.webp used to pass when the file is
    logo.webp, and broke on the host (S3, Linux). A site with such a link now fails on every
    machine: fix the spelling the report names. The build's files are listed once, instead of
    asking the disk for each target.

Fixed

  • titles.duplicate counts indexable pages only. A page carrying a robots noindex meta
    (a not-found page written three times, as Next.js does, or a pager marked index: false) is not a search result and may share a title. A site that failed only on such
    pages passes. Nothing to do.
  • A robots noindex inside a comment, a script, a style or a <template> is not the
    page's: sitemap.noindex_listed fired on a listed page whose noindex was commented
    out, and titles.duplicate would have skipped it. Crawlers index such a page.
  • canonical.mismatch, og.mismatch and canonical.not_in_sitemap compare URLs as a
    browser does: the scheme and host in any case, and an empty path the same as /
    (https://Example.com and https://example.com:443 are https://example.com/). A hand-written canonical that named
    the right page in another spelling used to fail; it passes. The path is still compared
    exactly. std_head always wrote the normal form, so molde's own pages are unaffected.
  • html.lang accepts a more specific tag of the page's locale: <html lang="en-US"> on
    an en page used to fail, though it is valid and names the same language. A region
    of another language (es-US on an en page) still fails, and hreflang stays exact.
    Nothing to do.
  • molde serve answers a miss with the nearest 404.html up its path, so a prefixed
    locale's /de/404.html shows under /de/; it used to show the root /404.html
    everywhere. Nothing to do.
  • molde serve --watch answers from the start: it used to accept connections and answer
    nothing until the startup check finished (minutes on a large site). The last good
    build is served while that check runs, and with no build yet a "first build in
    progress" page reloads itself until one publishes. Nothing to do.
  • titles.multiple counted an icon's <title> as a second page title when an SVG
    sprite nests an <svg> inside a <symbol> (Sphinx's Furo theme does, on every page):
    SVG and MathML are now skipped to their matching end tag. Nothing to do.
  • A reader that stops early (molde check --site site | head) no longer makes molde
    panic with "failed printing to stdout: Broken pipe"; the exit code is the command's
    own. Nothing to do.
  • links.internal read href= and src= in page text too, so a docs page showing HTML
    in a code block (&lt;link href=&quot;/favicon.ico&quot;&gt;) failed on a link that
    isn't one. Attributes are now read inside tags only, plus quoted URLs inside
    <script> as before; a real link inside <code> still counts. href= text inside
    another attribute's value, and framework bindings (:href, x-bind:href), are not
    links either (gohugo.io's 788 and Starlight's 246 false errors). Nothing to do.