Repository navigation
Releases
Releases · lukeed/bongo
v1.3.1
Fixes
- The view-transition preset of the client runtime goes in the
bongocascade layer, so a rule of your own overrides it without!important. Before, the runtime appended the preset to<head>after the stylesheets of the page, and source order gave it the last word: a page could turn off the cross-fade oftransitionsonly with!important, or by giving up the preset for'initial'. A rule that already reaches for!importantstill wins, because the preset carries none of its own. See Turn on transitions and Cascade layers. (fced932)
v1.3.0
Features
@bongo/tailwindbuilds Tailwind CSS v4 stylesheets from the classes that your pages render, not from a scan of your source files. A class that a template prints in one branch only is in the CSS only when a page renders that branch, and the words of your text never become utilities. The scripts next to a stylesheet and each@sourcealso give classes. A CSS module with@referenceand@applyworks with$assets.classes(). See @bongo/tailwind. (#96)$build.classescollects the class names of each page as bongo renders it. A loader ofassets/reads them withutils.classes(). An incremental build gives the same names as a fresh build. See Class names and Loader utilities. (#96)
Fixes
- A client navigation to a link that the server redirects, such as
/aboutto/about/, ends at the URL of the last response, with the hash of the link. Before, the address bar, the history entry, and the relative URLs of the page kept the URL of the link. A browser withoutprecommitHandlerloads the final URL as a full page. See Redirects. (#92) bongo:navigatefires for each navigation before the URL changes. Before, it fired after the URL changed. See Events. (#92)- A fetch that fails before the URL changes no longer leaves the new URL on the old page. (#92)
- Back and forward keep the scroll position that the client restores. Before, the browser could scroll the page to the top after the restore. See Scroll restoration. (#97)
- A change in a value of
$site,$build,$images, or$datarenders every page again, such as a$site.urlthat the config reads from an environment variable. Before, a staging build after a production build shipped the production pages, unless it ran with--fresh. See Incremental builds. (#95) - The height of a resized image rounds to the nearest pixel. Before, a 1254×837 source at 960 came out 960×640, not 960×641. Each resized image encodes once more after you upgrade. See Processing. (#93)
Docs
- The labels of the sidebar, the table of contents, and the footer are no longer headings, so the heading outline of each page is correct. (ddc5f95)
v1.2.0
Features
$build.outdirand--outdir(-o) name the output folder; the flag wins over the config. A config that fails to load empties only the--outdirfolder, or the folder of the last good build. See Output folder. (3c6a771)$assets.classes()gives a template the class names of a CSS module, as its stylesheet ships them. The module compiles once for both. See CSS modules. (#88)$build.trailingSlash: falsemakes each page an.htmlfile of its path, at a URL with no trailing slash. See Without trailing slashes. (#87)bongo devredirects a page URL with the other trailing slash to the path of its file, as a host does. See Trailing slashes. (#87)
Fixes
- The client leaves
history.pushState()andhistory.replaceState()to the page. Before, it fetched the URL as a page, so a widget that wrote its state into the URL lost it. Back and forward within one page no longer fetch it again. See Opt out. (#90) - A script import that does not resolve fails the build, and names the import, the file, and the line. Before, the script shipped the import as written, and failed in the browser. See Imports. (#88)
- A regex with a quote or a backtick, such as
/`/g, no longer breaks the next template tag. tempura is now 1.0.1. (#89) - A class of a CSS module that composes a class that composes another gets the names of all of them. (#88)
- The file name alone decides if a stylesheet is a CSS module, so
<bongo:style>takes noglobal. Withglobal, a.module.cssfile shipped its classes as written, while$assets.classes()gave hashed names. (#88) - Under Node, code that calls a Bun API fails with a hint to run bongo with Bun. A partial that calls such code is no longer told to add
{{#expect Bun}}. See Run with Bun. (357b79a) - The Markdown copy of a dotted path, such as
/releases/v1.1.0, isv1.1.0.md, notv1.1.md, and the client takes a link to such a page. (#87) - A missing asset no longer reads
asset!, rendering …. (#88)
Performance
- A build with no change no longer renders every page that links a CSS module. On 10,000 pages, such a build takes 0.24 s, not 2.37 s. (#88)
Docs
- CSS:
@import, composing a class of another CSS module, and why a script cannot import a stylesheet. See@importand Stylesheets and scripts. (#88) - Run with Bun covers your own code that calls a Bun API, not only images. (357b79a)
- The posts of the
create-bongotemplate describe bongo as it is. (42d70c9)
v1.1.0
Features
- The config knows the mode.
bongo devsetsNODE_ENVtodevelopment, andbongo buildsets it toproduction, before the config loads. A value that you set stays. See Dev or build. (#81) - Scripts know the mode. Scripts get
process.env.NODE_ENV,import.meta.env.DEV, andimport.meta.env.PROD. Inbongo dev, packages resolve with thedevelopmentcondition. See Script values. (#82) $build.definereplaces your own names in scripts. See Your own values. (#82)bongo/envtypesimport.meta.env. Add it to thetypesof yourtsconfig.json. (#82)- tsconfig
pathsaliases work in the config, data modules, and partials. (#84)
Fixes
- bongo no longer reads a
tsconfig.jsonabove the project folder, which can belong to another project. See Which tsconfig.json. (#83) - A build through a symlinked project path writes the same scripts as a build through the real path. (#85)
bongo/clientships its types. Before, its functions had no types outside this repository. (#86)- A new site from
create-bongopassestsc. The template installs@types/node, sets"types": ["bongo/env", "node"], and targets ES2024. (#82, #86)
Performance
$assets.renderis about 9× faster on a cold cache. resvg no longer loads every system font for each image, and it draws off the main thread. (#79)
Docs
- How to type custom
$sitefields. See Define custom$sitefields. (#80)