-
Notifications
You must be signed in to change notification settings - Fork 299
Migrate to Zola #1563
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
Migrate to Zola #1563
Conversation
At this point in time, everything is in place at first glance. Both blogs render all their pages, they loook the same, the blog posts themselves look the same, the feeds are there... However, the output in terms of HTMl files etc. is nowhere near identical to before, so it's super hard to determine if there aren't any regressions. I'll note down some notable things that I know changed:
|
Also, it should be noted that we currently have to use a fork of Zola. The maintainer doesn't seem very responsive at the moment, but hopefully the features we need can be upstreamed in a reasonable time frame. |
Here is a doctored version of the diff between the output before and after. I removed the generated redirects, those are just noise. And I renamed files in one version so the diff relibly detect them as a single modified file (as opposed to one file being deleted and a slightly different one being created from scratch). |
9e93870
to
91a8d48
Compare
Spent quite a while combing through the output diff, I can't find anything that's wrong anymore. IMO the riskiest parts of this PR are:
@Manishearth sorry, it's a big one... 😅 |
The front matter is defined in such a way that it can parse both the previous and the new format that's required for Zola. An automatic migration can be triggered with: FIX_FRONT_MATTER=1 cargo test -p front_matter which will be done in a separate commit.
This patch was generated by running: FIX_FRONT_MATTER=1 cargo test -p front_matter
The custom site generator used comrak for markdown to html translation while Zola uses pulldown-cmark. One of them uses a <section> while the other uses <footer class="footnotes"> to render the footnotes. So a few CSS tweaks were needed to apply the correct styles to the footnotes.
The custom anchor link template is needed to remove the default content. It is also a convenient way to make the classes in our existing CSS match the new anchor links.
These tweaks make the output more similar to the one of the custom SSG, allowing easier diffing between the two setups.
Landable as is, the issue with code blocks can be figured out later. Thanks for doing this!! |
This blog post was merged while the Zola migration PR was being reviewed, so its front matter is migrated here in a separate commit.
Great! Only added another commit migrating the front matter of a post that was merged recently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fire at will
closes #1522
A preview is deployed with GitHub Actions on my fork.
A comparison of the output before & aftered (slightly doctored to make it somewhat useful): https://github.com/rust-lang/blog.rust-lang.org/compare/bd43cef553fa63a5fb7fbd311c3e9329f715f1c0..72b0efba957ed22d543406fcce8ad251008c6afc
Rendered