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

11ty Config Cleanup #242

Merged
merged 6 commits into from
Jan 11, 2024
Merged

11ty Config Cleanup #242

merged 6 commits into from
Jan 11, 2024

Conversation

xjensen
Copy link
Contributor

@xjensen xjensen commented Jan 4, 2024

This PR cleans up our management of content metadata. Nowadays 11ty offers many options, such as the full Data Cascade, to help process content. Let's use 'em.

Copy link

github-actions bot commented Jan 4, 2024

Preview site available at config-cleanup-1.pr.digital.ca.gov.

@xjensen xjensen changed the title Use 11ty Data Cascade 11ty Config Cleanup Jan 4, 2024
@zakiya
Copy link
Contributor

zakiya commented Jan 4, 2024

Once this is done I'd like to apply it to hub.innovation.ca.gov and abortion.ca.gov.

Copy link
Collaborator

@jbum jbum left a comment

Choose a reason for hiding this comment

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

OK, this first set of fixes doesn't apply to hub, nor abortion, because they aren't wordpress based. I do love the idea of using 11tydata.js files for page-specific 11ty code.

@zakiya
Copy link
Contributor

zakiya commented Jan 4, 2024

For some reason I keep forgetting that innovation has a WordPress backend. Denial?

@xjensen
Copy link
Contributor Author

xjensen commented Jan 9, 2024

I've got two more big changes ready for consideration.

First, the PAR scores have been integrated into 11ty's Data Cascade. We no longer need the npm run readability script, the collection of Nunjucks filters used to format PAR data, etc. This code has been relocated to pages/_data/eleventyComputed.js.

Second, I've brought in 11ty's navigation plugin, which we can use to create the breadcrumbs a bit more easily.

@jbum
Copy link
Collaborator

jbum commented Jan 9, 2024 via email

@jbum
Copy link
Collaborator

jbum commented Jan 9, 2024

@xjensen I am currently getting a local build error on this branch (after running npm install; npm run dev) -- does not occur on main branch.

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing to "_site/blog/posts/helping-californians-have-a-voice-in-toxic-cleanup-projects" from "./pages/blog/posts/wordpress-posts/helping-californians-have-a-voice-in-toxic-cleanup-projects.html" (via EleventyTemplateError)
[11ty] 2. EISDIR: illegal operation on a directory, open '_site/blog/posts/helping-californians-have-a-voice-in-toxic-cleanup-projects' (via Error)
[11ty] 
[11ty] Original error stack trace: Error: EISDIR: illegal operation on a directory, open '_site/blog/posts/helping-californians-have-a-voice-in-toxic-cleanup-projects'

Also curious about the changes to the readability method. Previously if I wanted to test a readability run, I would run npm run readability followed by a build. It looks like you have the readabiity pass built into the build now, is that correct? So theoretically, if I just do npm run dev I get fresh values? (cool if so)

@xjensen
Copy link
Contributor Author

xjensen commented Jan 10, 2024

I got that error too, but never figured out why. It went away when I did a manual delete of the _site build folder. I should probably investigate.

Yes, the readability scores run fresh on every build. We could probably re-do the readability.json file as an on-demand script if that would be useful for debugging.

@jbum
Copy link
Collaborator

jbum commented Jan 10, 2024

Yeah, that fixes it. Approving... Merging...

@jbum jbum self-requested a review January 10, 2024 21:01
Copy link
Collaborator

@jbum jbum left a comment

Choose a reason for hiding this comment

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

Reimplemented readabiity scores in a more efficient way.

@jbum
Copy link
Collaborator

jbum commented Jan 10, 2024

Nvm, looks like this is still in draft mode...

@xjensen
Copy link
Contributor Author

xjensen commented Jan 10, 2024

I'll have it ready soon.

Not planning to make any more big changes. Just want to make sure the site still behaves as expected.

@xjensen xjensen marked this pull request as ready for review January 11, 2024 20:53
@xjensen
Copy link
Contributor Author

xjensen commented Jan 11, 2024

@jbum I think this is ready for review.

@jbum
Copy link
Collaborator

jbum commented Jan 11, 2024

Looks good -- go ahead and merge :)

@xjensen xjensen merged commit 4ba1572 into main Jan 11, 2024
@xjensen xjensen deleted the config-cleanup-1 branch January 11, 2024 22:02
@xjensen xjensen mentioned this pull request Jan 12, 2024
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