boxlang-ssg 1.0.0
Released .
First release as an installable BoxLang module.
install-bx-module boxlang-ssg bx-yaml bx-markdown bx-jsoup
boxlang module:ssg init my-site
- Output paths changed to folder-style URLs:
posts/x.htmlis nowposts/x/index.html(URL/posts/x/), so sites work on any static host.router.bxswas removed. - boxlang-ssg is now a BoxLang module, installed once and run from any site folder with
boxlang module:ssg <command>. New commands:init,serve,list,clean; new flags:--source,--verbose,--drafts,--port. Exit codes: 0 success, 1 usage error, 2 build failure. setup.bxandrequirements.txtwere removed.bx-yaml,bx-markdownandbx-jsoupare declared as dependencies inbox.jsonwith caret ranges.install-bx-moduledoes not install declared dependencies, so the install command names them;box install boxlang-ssg(CommandBox) does install them.buildandservecheck for the three modules at startup and print the install command if one is missing.
Fixed
- Builds failed on BoxLang 1.19 because templates were included by absolute path; site templates are now included through an application mapping.
- Exceptions are no longer swallowed: a page that fails to render is not written, every failure is reported as
file: message, and the build exits 2. Theerror(),print.greyline(),dump()andabortcalls are gone. - Pagination wrote page 1 of
permalink: /jokes/page/{{page}}/index.htmlto/jokes/page/index.html/index.html; every page now substitutes its number, andpaginationInfo.hrefvalues point at files that exist. - Paginated pages respect
excludeFromCollectionsin type collections as well asall, and type keys are lower-cased consistently. - Discovery matches
.mdand.bxmby extension rather than by substring, and always skips_includes/,_data/, the output folder, dot-folders at any depth,boxlang_modules/andnode_modules/. Only the rootREADME.mdis skipped by default. - Front matter without a closing marker, or
.mdfront matter that is not valid YAML, fails the build naming the file; an emptytags:no longer throws. - Posts sort newest first by
date, thenpublishDate, then file modified time, without throwing when dates are missing. Future-dated posts are treated as drafts unless--drafts. - Tag permalinks use the slugified tag, and the starter links to the URL the tag page is written to.
- The starter layout uses the page's
titleanddescription, falling back to the site values. ssg-config.jsonis merged over defaults and validated;outputDirmust be inside the site root and not the site root itself.bx-markdownis no longer pinned to an exact version.pagination.dataresolves againstcollectionsonly, and a path that does not exist fails the build instead of being created silently.- An explicit
permalinkon atype: postdocument was ignored when choosing the output file; an explicitpermalinknow wins for every type. collections.tagsandcollections.byTagare built in one place from every document with tags that is not excluded from collections.- An empty front matter value such as
title:left the key null on BoxLang without bx-compat-cfml; it now falls back to the default. - The starter's post date and stylesheet cache-buster used CFML date masks (
mmm,yyyy-mm-dd), which fail or print minutes on BoxLang without bx-compat-cfml; they now useMMMandyyyy-MM-dd.
Changed
collections.tagsis now sorted case-insensitively.- Generated pagination pages now take part in type and tag collections and honour
excludeFromCollections. - A paginated template with no explicit permalink bases its pages on its own resolved permalink;
size: 1without a placeholder writespage/<n>/instead of overwriting one file. minifyandtidyHtmlapply to HTML output only (previouslyminifyalso touched non-HTML output such as XML feeds).- Front matter must start on the first line of the file.
- In
.bxmfiles a leading comment that is not a YAML mapping is treated as an ordinary comment with a warning. - Two documents that resolve to the same output file, a missing
passthruentry, invalid config, and front matter/pagination/render errors now fail the build with exit code 2 instead of being skipped silently. - Bootstrap JS, jQuery and Popper removed from the starter layout.
prc.inFileandprc.outFileare now paths relative to the site root and the output folder (they were absolute paths), andprc.dateis always a date object.- A
passthruentry that is empty,., an absolute path or contains..now fails the build; entries must be paths inside the site root. serveuses a web server built into the module and no longer needsboxlang-miniserver. It listens on127.0.0.1only, so the site is reachable from your own machine alone, and it answers a missing page with the site's404.html.