Skip to content

Conversation

@ethrx
Copy link

@ethrx ethrx commented Jan 8, 2026

Description

The Head Plugin is very useful for Astro applications that have a mix of react providers or components that, for example, will only update the head once.

Adding persistAssets and persistTags provides the intended usage of the Head plugin, allowing us to keep certain tags from the previous page state.

Checks

  • The PR is submitted to the main branch
  • The documentation was updated as required

@codesandbox
Copy link

codesandbox bot commented Jan 8, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@daun
Copy link
Member

daun commented Jan 9, 2026

@ethrx Thanks! Good idea to make those available.

I'd prefer to nest those new keys under the existing updateHead key. Similar to the existing preload which is either a boolean or an object with nested options: preload: boolean | { hover: boolean; visible: boolean }. Could you change it to work like that, please?

@ethrx
Copy link
Author

ethrx commented Jan 9, 2026

@daun thanks! I think the latest change resolves your comment, and I've updated the README.md to closely match how preload is structured and https://swup.js.org/plugins/head-plugin/

Let me know if this wasn't the change you had in mind :)

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.

2 participants