Skip to content

Conversation

woubuc
Copy link

@woubuc woubuc commented Aug 14, 2025

This PR replaces the hard-coded embedded HTML with a Handlebars template system.

See the module docs in src/template.rs for more information on how templates are organised.

I also refactored a lot of the code into modules from the original single-file codebase, to find my way around the code while working on it.

This is a first effort to implement a solution I needed, as well as an answer to #30. My primary question is: do you want to merge this into the upstream codebase, or will this remain just a fork for my own use case?

  • The basic handlebars template implementation is done. It can render the classic template to achieve a similar output as before.
  • I've updated the config format to reflect these changes, and implemented an automatic conversion from the v1 config. I have also updated the CLI args accordingly.
  • The handlebars templates now provide additional crate metadata, along with a rendered readme if one exists in the packaged crate.
  • I added an additional template for out-of-the-box variety and to showcase what can be done with some of the new metadata.
  • Someone else might want to sanity check the implementation; there are no doubt still things that can be improved.
  • Do we want to expose additional metadata from the crates to the templates?
  • Several conformance test currently fail for reasons I'm not quite clear on.
  • The old gui files as well as the integration tests are still in the repository. There are currently no integration tests for the new templates and we'd have to consider how we would approach this.

Wouter added 2 commits August 14, 2025 20:50
also refactored the single-file codebase into more manageable modules.
@woubuc woubuc changed the title Feature/handlebars Handlebars templating support Aug 14, 2025
@woubuc woubuc mentioned this pull request Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant