[breaking] configure custom templating languages #28

Merged
tonymottaz merged 5 commits from feat/custom-templating-languages into main 2026-04-23 01:50:09 +00:00
Owner

Breaking change: this removes the postprocess configuration key and replaces it with a templatingLanguages configuration key, which IMO is more descriptive of what this is doing now. The actual differences in the configuration API are pretty small, mainly just dealing with a data object that would be passed in from response.render(data) (and may be defined for static files in the future).

Also, this adds support for JavaScript templates to export const contentType = 'something/else' to configure the content-type used by your JavaScript template. It's no longer locked to text/html.

**Breaking change:** this removes the `postprocess` configuration key and replaces it with a `templatingLanguages` configuration key, which IMO is more descriptive of what this is doing now. The actual differences in the configuration API are pretty small, mainly just dealing with a `data` object that would be passed in from `response.render(data)` (and may be defined for static files in the future). Also, this adds support for JavaScript templates to `export const contentType = 'something/else'` to configure the content-type used by your JavaScript template. It's no longer locked to `text/html`.
* postprocess config no longer supported; use templatingLanguages instead
* new config templatingLanguages to set up custom templating languages
* javascript templates now support exporting a string named `contentType` to set the content-type of the generated content
tonymottaz deleted branch feat/custom-templating-languages 2026-04-23 01:50:09 +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!28
No description provided.