Skip to content

Conversation

@senekor
Copy link
Contributor

@senekor senekor commented Mar 5, 2025

This is very similar to #688, with some exceptions:

  • I used snapshot testing over the entire site/ directory to ensure the output is identical.
    The snapshot testing setup is on the branch snapshot_tests.
    If this PR is approved, I will rebase the commits on the master branch to drop the testing setup.
  • I made a separate commit for renaming the template files.
    Viewing the diff of the individual commits should make it easier to review.
  • Tera and Handlebars don't handle HTML escaping exactly the same way, so I added the custom filter escape_hbs to ensure identical output.
    This could probably be removed later without issues.
  • Using macros for headers, nav and footer is not necessary, an include statement would've been more concise.
    But the indent filter only works with macros and it allows identical output and a good diff at the same time.

@Manishearth
Copy link
Member

  • I used snapshot testing over the entire site/ directory to ensure the output is identical.

thank you so much! this is super valuable.

It might be worth having a long term snapshot testing setup checked in to the tree. We won't check in snapshots, but it will allow people to perform these tests conveniently

@senekor
Copy link
Contributor Author

senekor commented Mar 7, 2025

It might be worth having a long term snapshot testing setup checked in to the tree. We won't check in snapshots, but it will allow people to perform these tests conveniently

Alright, I will try to make a PR with a tweaked setup so it can be merged for convenience without getting in the way.

@senekor senekor force-pushed the senekor/hbs-to-tera branch from 57eeb14 to 55bb5a6 Compare March 8, 2025 00:26
@senekor senekor changed the base branch from senekor/tera-testing-base to master March 8, 2025 00:26
@senekor senekor force-pushed the senekor/hbs-to-tera branch from 55bb5a6 to 289218f Compare March 8, 2025 00:28
@senekor senekor merged commit f66c0cd into master Mar 8, 2025
3 checks passed
@senekor senekor deleted the senekor/hbs-to-tera branch March 8, 2025 00:37
@JoHaHu
Copy link

JoHaHu commented Mar 8, 2025

This seems to have broken the rss feed.

@senekor
Copy link
Contributor Author

senekor commented Mar 8, 2025

oof, thanks for the report. I had that excluded from the the snapshot tests because it was non-deterministic with its updated timestamp 🙁 gonna fix this right away

Edit: should be fixed by #1505

@senekor senekor mentioned this pull request Mar 8, 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.

4 participants