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

Change how we make allFiles.json #241

Merged
merged 1 commit into from
Dec 29, 2023
Merged

Change how we make allFiles.json #241

merged 1 commit into from
Dec 29, 2023

Conversation

xjensen
Copy link
Contributor

@xjensen xjensen commented Dec 29, 2023

Total change to the way we generate the _site_dist/allFiles.json file. This file is used for both readability scoring and tests.

It turns out 11ty gives us this file, verbatim, for free. All we need to do is write out the results from the eleventy.after event (docs).

By using 11ty's method, we avoid iterating over each page and writing out the results ourselves. Our manual iterations led to some bugs that sometimes prevented all our pages from making their way into allFiles.json. In turn, this is why some pages were missing their readability scores.

With this change, we can also simplify the tests a bit, also included here.

@xjensen xjensen requested a review from zakiya December 29, 2023 22:15
Copy link

Preview site available at fix-readability.pr.digital.ca.gov.

Copy link
Contributor

@zakiya zakiya left a comment

Choose a reason for hiding this comment

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

lookin good

@xjensen xjensen merged commit 81746eb into main Dec 29, 2023
1 check passed
@xjensen xjensen deleted the fix-readability branch December 29, 2023 22:30
@jbum
Copy link
Collaborator

jbum commented Jan 2, 2024

This is awesome @xjensen -- I'll transfer these ideas to the innovation hub, which was based on the former system, today.

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.

3 participants