Bunch of changes for v2 #25

Merged
tonymottaz merged 12 commits from v2-changes into main 2026-04-15 15:15:17 +00:00
Owner

The main changes are a simplification of the file naming conventions in the routes/ folder:

  • Handlers are named with +<method>.js where <method> is any HTTP method
  • Middleware handlers are still named +middleware.js
  • Files starting with an underscore are not served by Grackle
    • _template.<ext> files are used by response.render() only to generate HTML responses
  • Static files: All other files are served as-is, and the filename (with extension) is included in route matching
    • Vento files (*.vto) and Markdown files (*.md) are postprocessed into HTML, and the file extension is excluded from route-matching

Markdown rendering is now done with markdown-it.

  • GitHub-style alerts are supported
  • Syntax highlighting is supported using highlight.js, but you need to bring your own CSS to style them.

HMR works much better now. It is no longer enabled using NODE_ENV, but must be explicitly enabled with the --dev-hmr CLI option.

The new grackle docs command serves the bundled docs in a local server.

The main changes are a simplification of the file naming conventions in the `routes/` folder: - **Handlers** are named with `+<method>.js` where `<method>` is any HTTP method - **Middleware handlers** are still named `+middleware.js` - Files starting with an underscore are not served by Grackle - `_template.<ext>` files are used by `response.render()` only to generate HTML responses - **Static files:** All other files are served as-is, and the filename (with extension) is included in route matching - Vento files (`*.vto`) and Markdown files (`*.md`) are postprocessed into HTML, and the file extension is excluded from route-matching Markdown rendering is now done with markdown-it. - [GitHub-style alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) are supported - Syntax highlighting is supported using highlight.js, but you need to bring your own CSS to style them. HMR works much better now. It is no longer enabled using `NODE_ENV`, but must be explicitly enabled with the `--dev-hmr` CLI option. The new `grackle docs` command serves the bundled docs in a local server.
tonymottaz deleted branch v2-changes 2026-04-15 15:15:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tonymottaz/grackle!25
No description provided.