Skip to content

boxlang-ssg 1.2.0

Latest

Choose a tag to compare

@robertz robertz released this 01 Dec 15:45
0a8131c

Redirect pages, a table of contents for Markdown, dates from git, a check command for broken internal links, an assetUrl() helper with a content hash, llms.txt and robots.txt in the starter, and an ssg command created by the installer. Sites in git may see different lastModified values; see Changed.

install-bx-module boxlang-ssg bx-yaml bx-markdown bx-jsoup

Added

  • redirectFrom front matter: a URL or list of URLs that get a redirect page pointing at the document. A redirect that collides with a document or another redirect fails the build.
  • prc.toc: the headings of a .md document as a list of { level, id, text }.
  • check command: builds, then reports internal href and src values that point at no written file, and exits 2 if there are any.
  • assetUrl( path ) template helper: relUrl( path ) plus ?v= and a content hash of the file. The starter layout uses it for its stylesheet.
  • llms.bxm and robots.bxm in the starter, writing /llms.txt and /robots.txt.
  • gitDates config key, true by default (see Changed).
  • box.json declares boxlang.executable, so install-bx-module creates an ssg script in ~/.boxlang/bin/ (or ./boxlang_modules/.bin/ with --local). With it on your PATH, ssg <command> runs boxlang module:ssg <command>.

Changed

  • When the site root is inside a git repository, prc.lastModified and the last fallback for a document's date now come from the file's last commit instead of its modified time. Files that are untracked or have uncommitted changes keep their modified time. A shallow clone prints a warning and keeps modified times. Set "gitDates": false for the 1.1 behaviour.
  • serve and build --watch convert a .md file again only when its modified time changes.

A site in git may see different lastModified values, and different dates on documents that set no date and have none in their file name. Sites that sort or build URLs from such dates should set date in the front matter.