-
Notifications
You must be signed in to change notification settings - Fork 311
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
Replace weighted_sort #3973
Comments
We're doing prioritization. We want to understand the impact of this issue. |
Okay so. This might be hard to explain in a single comment, but I'll give it a try. EDIT: As far as impact — this will be important when we want to change the featured projects. Until then, not that important. In the Jekyll site, there was a thing called When we removed the weighted sorting algorithm, it didn't actually change which projects came out on top. The same projects are displayed. For now. But, as we add and remove projects over time, we will want to change which six projects we feature. The work here should be, roughly, the following:
-{% for case_study in featured.case_studies %}
- {% assign project = collections.services | where: "data.agency", case_study.agency | first %}
- {% include "card-project.html" project: project %}
+{% for project in collections.services | where: "data.pin" %} // or something like that
+ {% include "card-project.html", project: project %} |
Currently, projects have a
weight
attribute. This may have been used across the site at some point, but presently it's used in a single place:/our-work
.The effect of weighting projects and having a weighted sort is that it effectively pins certain projects.
The implementation is overly complex for the effect. But we do need the effect to remain consistent — the migration should result in no visible content changes.
I suspect the right way to do this is to:
pin: {rank, 1 being highest}
weight:
attributes from the code/our-work
to render all this correctlyAcceptance criteria
The text was updated successfully, but these errors were encountered: