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

Update additional head attributes #55

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Update additional head attributes #55

merged 1 commit into from
Oct 19, 2024

Conversation

daun
Copy link
Member

@daun daun commented Oct 19, 2024

Description

  • Allow updating other attributes on the head element
  • Filterable by string or regex: ['lang', 'dir', /^data-/]
  • Default to lang and dir — the dir attribute is new
  • I can imagine this still being a minor release: sites switching dir between pages must surely have implemented this feature on their own already, otherwise they'd be have broken layouts

Checks

  • The PR is submitted to the master branch
  • The code was linted before pushing (npm run lint)
  • All tests are passing (npm run test)
  • New or updated tests are included
  • The documentation was updated as required

Additional information

Closes #50

@daun daun requested a review from a team October 19, 2024 09:39
Copy link
Member

@hirasso hirasso left a comment

Choose a reason for hiding this comment

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

This is basically a copy of body-class-plugin, right?

Regarding bundle size, I'd vote in favour of marrying the two plugins at some point. But for now: Ship it 🚢

@daun
Copy link
Member Author

daun commented Oct 19, 2024

@hirasso Yes! Exact copy. Let's hope that gzip compression works in favor of everyone using a bundler 🤠 If we end up using that code a third time, it's definitely time to re-architect 🤠 🤠

@daun daun merged commit f61c824 into master Oct 19, 2024
1 check passed
@daun daun deleted the feat/attributes branch October 19, 2024 10:32
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.

Update dir attribute on html element
2 participants