Gutenberg: Edit Site: Export all templates from `wp_templates`

Created on 19 Dec 2019  路  12Comments  路  Source: WordPress/gutenberg

There should be a way to export all templates defined in wp_templates as a theme package. Considerations should include whether it should use the current theme files if there is no matching user defined template.

This could start as an advanced tool in the actual templates CPT (similar to exporting reusable blocks) or within the editor ellipsis menu settings.

Needs Design [Feature] Full Site Editing [Priority] Low [Status] In Progress

Most helpful comment

I'm a little curious why this is marked as low.

I had been wondering why there haven't been many examples of people sharing FSE themes just yet and this one reason why. I was also going to make a ticket because I had create my first template with the FSE but then couldn't find it in my theme's folder...

To quickly experiment with other developers' themes, share my own theme creations and templates, and use version control on them, theme templates need to be exportable and strongly prefer the resultant HTML files to be able to be synced with the theme as it in browser (which is possible now if you're working with a php theme; make edits to the file; save it inside the theme's directory of an active WordPress installation (if it's not already there), and view your changes.

Enabling the export (and import) of templates to HTML (or any file other based format) that developers can easily share, distribute, and manage is important.

All 12 comments

Nice, I think we should add this as an ellipsis-menu tool in the top right of the header.

Done 馃槃

Screen Shot 2020-01-07 at 12 55 36 PM

Nice!

Can it be a vertical ellipsis though, to match the one from the post editor?

Screenshot 2020-01-07 at 19 12 21

If I'm not mistaken, on these circumstances the user is downloading as a theme her/his own design settings. If so, the copy could be more precise saying: _Export as a theme_, _Package as a theme_ or _Download as a theme_.

Can it be a vertical ellipsis though, to match the one from the post editor?

Done.

If so, the copy could be more precise saying: Export as a theme

Updated.

@epiqueras Is there already a related PR for this, or is this just a visual demo at this point?

I'm a little curious why this is marked as low.

I had been wondering why there haven't been many examples of people sharing FSE themes just yet and this one reason why. I was also going to make a ticket because I had create my first template with the FSE but then couldn't find it in my theme's folder...

To quickly experiment with other developers' themes, share my own theme creations and templates, and use version control on them, theme templates need to be exportable and strongly prefer the resultant HTML files to be able to be synced with the theme as it in browser (which is possible now if you're working with a php theme; make edits to the file; save it inside the theme's directory of an active WordPress installation (if it's not already there), and view your changes.

Enabling the export (and import) of templates to HTML (or any file other based format) that developers can easily share, distribute, and manage is important.

I am very torn about this.
Do I look forward to using this as a way to create and package new themes? Sure.

But it does not belong in Gutenberg. It does not belong in core. It belongs as a separate plugin, like a child theme generator.

Yes, it is a feature that helps people make very small changes and save something as a new theme.
But it is just as much a feature that invites abuse of commercial products, copyrights, and licenses, that can not be prevented.

It is not the _developers_ that are going to be sharing these files, it is the people who are trying to take advantage of the designer and developers, beyond what is fair according to GPL.
We are already battling a never ending stream of themes that are being copied and spread under new names, new fake authors and new fake copyrights _with bad intent._

@carolinan that's a fair point. I'd add that including it in Gutenberg (the plugin) shouldn't mean eventually launching it in core. Right now it's useful for developers as they get to test and play with block themes.

Also, I think if it's ever considered for core inclusion it should likely be part of Tools -> Export.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

wpalchemist picture wpalchemist  路  3Comments

BE-Webdesign picture BE-Webdesign  路  3Comments

pfefferle picture pfefferle  路  3Comments