Skip to content

Repository files navigation

The Fuse Programming Language Website

This is the repository for the official Fuse website: https://fuselang.org

How to Build

The website is built with Hugo and uses tree-sitter for Fuse syntax highlighting.

Install dependencies:

npm install

Generate syntax highlighting and start the dev server:

npm run dev

To build for production:

npm run build

Verifying examples

Every {{< fuse >}} block in content/ is a real program that is expected to compile. scripts/verify-examples.js extracts each one, builds it with the installed fuse toolchain in a temporary directory, and compares its output against the expectations recorded in the script.

This needs the toolchain on your PATH and its environment exported:

source ~/.local/share/fuse/env
npm run verify

A block that declares main is built and run; one that only declares types or traits gets a stub main appended and is type-checked. Blocks whose exact output matters are listed in the EXPECTATIONS table at the top of the script, keyed by <file>#<block ordinal>. Add an entry there when you add a snippet that prints something.

npm run verify:fast        # type-check only, skips the slow build+run stage
npm run verify:highlights  # no toolchain needed; checks data/highlights.json is current

Miscellaneous

Styling is custom SCSS. Fuse code blocks use a {{< fuse >}} shortcode with tree-sitter-based highlighting generated at build time.

data/highlights.json is a committed build artifact keyed by the MD5 of each snippet, so it must be regenerated (npm run highlight) and committed whenever a snippet changes. Otherwise that block silently renders as unhighlighted plain text. A snippet must start on the line immediately after {{< fuse >}} and end immediately before {{< /fuse >}}; a stray blank line changes the hash Hugo looks up but not the one the generator writes.

About

The Fuse Programming Language Website

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages