-
Notifications
You must be signed in to change notification settings - Fork 210
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
[WIP] Migrate to Tera for templating #786
Conversation
Extra ideas: An extra field in the [package.metadata.docs.rs]
syntax_highlighting = ["cpp"] in their Cargo.toml and we load the C++ highlight script with their crate. This can be extended further to partially or fully address #302 by offering a subset of further libraries that crates can selectively include |
Let's try to keep refactors separate from added functionality. For instance #777 and all the new features you just suggested should go in a separate PR, that way we can focus on not losing functionality in the change. |
If notify doesn't work I would rather go without hot-reloadint for now. |
In response to #777, I'm rewriting the templates anyways and it's actually less work to fix the issue because it's just a conditional that's in the header for some reason |
61ca574
to
39e10e5
Compare
Changes Breakdown:
The whole PR is heavily commented, so a lot of diff comes from that. Everything outside of |
Laid the groundwork in #805 |
Finished by #887 (hopefully) |
This is an attempt to both remove handlebars and add a type-safe interface to rendering templates while simultaneously making the templates more easy to modify and read.
Template reloading is also added via the very sketchy method of a thread that reloads the templates on 10s intervals, better solutions would be appreciated. (I tried to use
notify
, but it didn't work on my system even though it's supposed to)Note: The templates are messy at times (currently), as I've pasted the navigation header into each and edited it to suit the current page, but after everything's done I'll squash them all together into something better
Note: The diff is massive right now because I moved the old
templates
folder, on the actual release the old templates will be deleted entirelyPages
/
=>home_page.html
/about
=>about.html
/releases
,/releases/failures
,/releases/recent-failures
,/releases/stars
=>releases.html
/releases/feed
=>release_feed.xml
/releases/queue
=>release_queue.html
/crate/:name
=>crate_details.html
/crate/:name/:version/builds
=>builds.html
/releases/activity
=>release_activity.html
/about/metrics
=> Maybe N/A?/releases/:author
/crate/source
Possible Extensions
highlight.js
to the most recent versionCloses #777 and #740