Skip to content

docs: pin a version of markedjs from cdnjs#6194

Merged
calebcartwright merged 1 commit intorust-lang:masterfrom
jbr:fix-docs-markedjs
Jun 16, 2024
Merged

docs: pin a version of markedjs from cdnjs#6194
calebcartwright merged 1 commit intorust-lang:masterfrom
jbr:fix-docs-markedjs

Conversation

@jbr
Copy link
Copy Markdown
Contributor

@jbr jbr commented Jun 13, 2024

Hi! It seems like the docs site is currently broken. Previous to this commit, the cdn markedjs url was not versioned, so when markedjs v13 introduced breaking changes on 2024-06-12, the rustfmt docs site automatically pulled them in.

In addition to fixing that problem by pinning to v12, this PR:

  • Expands the cdnjs links and script tags to reflect their recommendations, including an integrity hash so the browser can check that the retrieved executable content is in fact as-expected.
  • Switches markedjs and vue from jsdelivr to cdnjs, which should be slightly faster as the browser already will have a reusable http/tls connection to cdnjs from other resources.
  • Uses the minified vue file, silencing a warning that vue was being used in development mode.

However, this PR does not change the versions of any dependencies, many of which are significantly out of date.

Thanks!

@ian-h-chamberlain
Copy link
Copy Markdown

@ytmimi thanks for the quick response, just confirming these changes do in fact resolve the problem for me (tested on Firefox 127.0 and Safari 17.5).

Seems like this change would help prevent future similar breakages from upstream too! 👍

Copy link
Copy Markdown
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

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

Thanks for the changes and detailed explanations!

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.

4 participants