sile-typesetter / sile-typesetter.github.io

Github Pages source code for https://sile-typesetter.org
Creative Commons Zero v1.0 Universal
3 stars 4 forks source link

Migrate site from Jekyll to Zola #32

Closed jameschensmith closed 2 years ago

jameschensmith commented 2 years ago

Summary

Converts site to Zola while maintaining design, data, URL's, & more.

Changes

References

Closes #20

jameschensmith commented 2 years ago

@alerque, site migration is essentially done. Something that would help would be making sure all the link aliases, post authors, internal links are functioning properly. Also, the makefiles and CI will need to be updated now. Hoping you can tag yourself in for that work 😁 Upon looking at it, it shouldn't be too hard of work. If the TOML data is giving us a hard time with the current makefile usage, we could use JSON in it's place (and use jq instead of yq, for example).

jameschensmith commented 2 years ago

@alerque, for the current pipeline failure, I believe the issue is with the Makefile's static pattern rules:

Makefile:68: target '<TARGET>' doesn't match the target pattern
...
Makefile:71: target '<TARGET>' doesn't match the target pattern

I'm quite inexperienced when it comes to Makefiles, but here's what I noticed. For lines 68 & 71, because there is a target pattern before the prereq pattern, content/ should probably be removed on these lines. I'm not sure about the other lines which just contain the prereq patterns with content/ added, but I hope this helps!

Edit: Also, I believe zola build wipes the public directory, so we may want to run it before generating the examples or generate the examples in the content directory & adding them to .gitignore (latter would probably be more flexible with, say, zola serve).

jameschensmith commented 2 years ago

Amended the commits after realizing mine were using the wrong email 🙈

alerque commented 2 years ago

Yes, sorry that pattern issue was mine. I was hacking on this while totally distracted with something else and only pushed because I was on a computer I wasn't going to be back on for a while. I'll keep fixing up the build. I'm aware of zola wiping the output directory on build to. I have a solution I worked up for CaSILE (which uses zola to publish static sites for book projects) but will need to adapt it for this Makefile.

alerque commented 2 years ago

Given the 67ms build time for the zola end of things I decided it wasn't worth implementing my hacks to output over the top of existing files. Instead I turned the build dependency order around so that instead of building the public site first then injecting the PDF/PNG example outputs it first builds those and puts them in the static/ folder where zola then copies them to the public site.

alerque commented 2 years ago

Using @ to reference the internal links should help zola lint broken internal links.

Ooo nice thanks for this. I must have known in the past because I see it in some old projects but had forgotten.

alerque commented 2 years ago

Now that we have truly important things like Snake Justification (b17b8ad) fished out of obsolete feature branches I think this is at feature parity with the Jekyll build and we can switch pretty much any time.

I assume at least some feed readers are going to trip up on the new feed, but with the post dates and stuff looking good I don't know that there is much more we can do about that.