Skip to content

Normalize front matter #1509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 9, 2025
Merged

Normalize front matter #1509

merged 7 commits into from
Mar 9, 2025

Conversation

senekor
Copy link
Contributor

@senekor senekor commented Mar 8, 2025

I snapshot tested this locally, the output is identical.

Includes some refactoring, commits are best reviewed individually.

We might want to move the blog to Zola. In that case, it will still be
useful to have a crate that validates and even fixes our front matter.

This will be especially important if we decide to duplicate the date of
a post in the two front matter fields date and path, which may be
necessary to preserve the existing URL scheme.

While the custom static site generator is still present, it can reuse
the front matter parsing logic.

stacked on #1508

Rendered

@senekor senekor force-pushed the senekor/normalize-front-matter branch from 59daa6b to cbbb8b7 Compare March 8, 2025 16:24
senekor added 7 commits March 8, 2025 20:23
We might want to move the blog to Zola. In that case, it will still be
useful to have a crate that validates and even fixes our front matter.

This will be especially important if we decide to duplicate the date of
a post in the two front matter fields `date` and `path`, which may be
necessary to preserve the existing URL scheme.

While the custom static site generator is still present, it can reuse
the front matter parsing logic.
This was done automatically with:
```sh
FIX_FRONT_MATTER=1 cargo test --all front_matter_is_normalized
```
@senekor senekor force-pushed the senekor/normalize-front-matter branch from cbbb8b7 to 7934c13 Compare March 8, 2025 19:23
@senekor senekor force-pushed the senekor/toml-front-matter branch from 6bae729 to 6e6d05f Compare March 8, 2025 19:23
@senekor senekor requested a review from Manishearth March 8, 2025 20:11
Base automatically changed from senekor/toml-front-matter to master March 8, 2025 23:53
@Manishearth Manishearth merged commit dcc98c6 into master Mar 9, 2025
6 checks passed
@Manishearth Manishearth deleted the senekor/normalize-front-matter branch March 9, 2025 00:04
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.

None yet

2 participants