Skip to content
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

Refactor into using minijinja templates instead of axohtml #526

Merged
merged 6 commits into from
Jul 14, 2023

Conversation

shadows-withal
Copy link
Contributor

@shadows-withal shadows-withal commented Jul 11, 2023

Refactors the code to use minijinja instead of axohtml.

@shadows-withal shadows-withal marked this pull request as ready for review July 13, 2023 09:58
@shadows-withal shadows-withal changed the title wip: template refactor Refactor into using minijinja templates instead of axohtml Jul 13, 2023
Copy link
Member

@Gankra Gankra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits about unwraps, but looks good. Only reviewed the rust, didn't review the templates (seems impractical to try to do).

src/site/artifacts/mod.rs Show resolved Hide resolved
src/site/artifacts/mod.rs Outdated Show resolved Hide resolved
src/site/funding/mod.rs Outdated Show resolved Hide resolved
src/site/funding/mod.rs Outdated Show resolved Hide resolved
src/site/layout/header.rs Outdated Show resolved Hide resolved
src/site/oranda_theme.rs Show resolved Hide resolved
src/site/templates.rs Show resolved Hide resolved
src/site/templates.rs Outdated Show resolved Hide resolved
src/site/templates.rs Show resolved Hide resolved
src/site/templates.rs Show resolved Hide resolved
@Gankra
Copy link
Member

Gankra commented Jul 13, 2023

Pushed up some resolutions of most of my comments. I ended up doing a quick pass over all the unwraps in non-test code and either replaced them or upgraded them to an expect with some description of why they shouldn't happen in prod, ostensibly.

I added a couple TODOs for genuine questions I don't want to unilaterally make a call on, that should be resolved before merging.

src/site/artifacts/mod.rs Outdated Show resolved Hide resolved
Comment on lines +19 to +23
/// A map from TargetTriples to Installers that support that platform
///
/// In theory this should be BTreeMap or IndexMap but something in the pipeline from here to
/// jinja seems to be forcing a sorting so it's deterministic..? Can't find docs for this.
type Platforms = HashMap<TargetTriple, Vec<InstallerIdx>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SEMI-TODO

src/site/funding/mod.rs Outdated Show resolved Hide resolved
src/site/templates.rs Outdated Show resolved Hide resolved
tests/build/mod.rs Outdated Show resolved Hide resolved
@ashleygwilliams ashleygwilliams merged commit 877c450 into main Jul 14, 2023
7 checks passed
@ashleygwilliams ashleygwilliams deleted the templating branch July 14, 2023 16:13
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

3 participants