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

Replace Wintersmith with another static site generator #18198

Closed
timvandermeij opened this issue May 31, 2024 · 0 comments · Fixed by #18248
Closed

Replace Wintersmith with another static site generator #18198

timvandermeij opened this issue May 31, 2024 · 0 comments · Fixed by #18248
Assignees

Comments

@timvandermeij
Copy link
Contributor

timvandermeij commented May 31, 2024

Most if not all (unfixable) vulnerabilities reported by npm audit originate from Wintersmith. This dependency hasn't been updated in 6 years and seems unmaintained, so it'd be good to replace it with a maintained alternative. Nowadays there likely are better Node.js static site generators that require fewer dependencies, so we should explore which options exist and how easy it is to transform our Wintersmith setup (hopefully this should be fairly simple because we only have a handful of pages).

It looks like Metalsmith (see https://www.npmjs.com/package/metalsmith and https://metalsmith.io) might be most similar to Wintersmith and seems maintained, but if other/better alternatives exists those can obviously also be considered.

@timvandermeij timvandermeij self-assigned this Jun 14, 2024
timvandermeij added a commit to timvandermeij/pdf.js that referenced this issue Jun 14, 2024
Wintersmith is no longer maintained given that the most recent version
is from six years ago, and all vulnerabilities that NPM reports
originate from Wintersmith's dependencies. Metalsmith, and its plugins,
on the other hand have recently had releases and don't have known
vulnerabilities. In fact, the number of reported vulnerabilities by NPM
even goes down to zero with this patch applied.

This commit therefore replaces Wintersmith with Metalsmith by providing
a transparent drop-in replacement, in a way that requires the least
amount of changes to the code and the generated output.

Note that this patch does update our versions of jQuery, Bootstrap and
the Highlight.js theme because the previous versions were very outdated
and didn't work correctly with Metalsmith. Moreover, those old versions
contained vulnerabilities that are hereby fixed.

Fixes mozilla#18198.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant