Accent CMS 0.27.2 — markdown-only sites and six fixes

Accent CMS 0.27.2 is available. It is a maintenance release for the 0.27 line, and it does not contain the 0.28 development work. A licence with a 0.27 ceiling covers it.

A patch release usually contains only fixes. This release also contains two features. Read the changes below before you upgrade.

Do these steps after you upgrade

Most changes start to operate when you install the new binary. Three changes can need an action from you.

Tabs on a site from accent init. From 0.26.0, the starter theme did not load its scripts. Because of this, {% tabs %} showed only the first panel. A new site from accent init is correct. A site that you made before 0.27.2 keeps its old template. To repair it:

  1. Open themes/simple/templates/base.html.jinja.
  2. Add these lines before </body>:
{% for js in theme.assets.js %}
<script src="{{ url('/theme/assets/' ~ js) }}" nonce="{{ nonce }}"></script>
{% endfor %}

Diagrams in a section. Accent now renders diagrams in a ---section: region. If you set diagrams.on_error: fail, a diagram error in a section now stops accent build, as an error in the page body does.

Values for --base-url. The value of accent build --base-url must be an http:// or https:// URL without a query or a fragment. Its path is the base path of the build, unless --base-path or site.base_path sets a path. If the URL has no path, the build is for the root.

Fixes

accent.exe starts on all Windows computers. The Windows binaries from 0.22.0 to 0.27.1 needed VCRUNTIME140.dll. This file is part of the Visual C++ Redistributable, not of Windows. On a computer without it, accent did not start. The binary now contains the C runtime.

Components link correctly under a base path. In 0.27.0 and 0.27.1, the button, card, image and tag components of all shipped themes wrote the deployment prefix two times, for example /site/site/blog. Your own components that use url(), media(), page.url or all_pages had the same problem. Accent now adds the prefix one time.

--base-url sets all absolute URLs. Before this release, the flag changed only the sitemap and robots.txt. Canonical links, og:url, absolute_url(), JSON-LD and the feeds kept the URL from the config. Now the flag sets site.url for the build, and all these URLs use it.

A ---section: region renders like the page body. Before this release, a section had no heading anchors, no page.toc entries, no highlighted code, no admonitions and no diagrams. Now Accent renders a section with all the markdown stages of the body. In page.toc, the section headings come after the body headings.

Markdown-only sites build without --lax. The link check of a markdown-only build tried to find HTML files. Because of this, it stopped the build on its own redirects, and it did not find broken links in pages. Now the link check reads the .md file of each page. A broken link stops the build. Links in code are not checked.

New: every page of a markdown-only site is markdown

With content.markdown_view.default_format: markdown, all pages of the site are now markdown. This includes tag pages, category pages, the 404 page and the next pages of a listing, for example blog/page/2.md. Accent sends them as text/markdown; charset=utf-8 in accent serve, accent build and accent serve-static.

Each of these pages uses the .md.jinja version of its HTML template, for example tags.md.jinja or error/404.md.jinja. The default theme contains these templates. If your theme does not have them, Accent uses a built-in markdown list or message.

If you set build.header_artifacts, Accent writes an .htaccess file and the Netlify _redirects and _headers files for this output. These files tell the host to do these steps:

  • Send each page URL to its .md file, for example /docs/guide to docs/guide.md.
  • Send / to index.md.
  • Send a missing page to 404.md, with status 404.
  • Send .md files as text/markdown; charset=utf-8.
  • Send the redirects of the build with an HTTP redirect status.

If you use a different host, for example Caddy or nginx, configure it to do the same steps.

New: taxonomy terms keep their spelling

Each term in taxonomy.tags, and in each configured taxonomy, now has a label. The label is the term as an author writes it, for example Beratung aare for the name beratung aare. Use label to show a term. Use name or slug to compare terms.

On a term page, taxonomy.current_label contains the label. The page title uses it, so the title changes from Tag: beratung aare to Tag: Beratung aare. The shipped tag and category templates show the label.

page.taxonomies gives the terms of the current page as a list for each configured taxonomy. categories: praxis and categories: [praxis] both give page.taxonomies.categories. If a page can have no terms in a taxonomy, use page.taxonomies.categories | default([]).

Install or upgrade

curl -fsSL https://accentcms.dev/install.sh | sh

Binaries for all platforms, checksums and signatures are on the GitHub release page.