Skip to content

Theme Export: Strip out site specific details #42730

@scruffian

Description

@scruffian

Description

The theme export process already removes theme slugs from template parts, as when templates come from files these aren't needed. Similarly we should remove other site/implementation specific details from templates on export, including:

  • Removed the ref id on the Navigation block
  • Remove IDs from the image block
  • Remove IDs from the query block

There may be more like this that we need to remove.

Step-by-step reproduction instructions

  1. Add some items to the navigation block in your theme
  2. Export your theme using the site editor
  3. You will see a "ref id" in the template for the navigation block - this won't have any meaning on another site.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions