Hi,

First I want to mention thanks for this project.

Do you think it would be nice, that the code related to import/export content could abstracted as a separated module?

Best,

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jmolivas created an issue. See original summary.

jmolivas’s picture

Issue summary: View changes
samuel.mortenson’s picture

Thanks @jmolivas! I think I'd prefer to abstract the HTML generation to another module, since the "new" thing Tome is solving is content entity export/import, not converting a website to static HTML. I offered to maintain the Static module in #2879232: Upgrade Static Generator module to Drupal 8, but am not sure what the status of that is.

The good news is that if all you want from Tome is the static content feature, you should be able to use it without worrying about the static HTML feature getting in your way. There will never be static HTML related code run unless you explicitly run drush tome:static, unlike the static content code which runs in response to entity CRUD events.

samuel.mortenson’s picture

Title: Extract content import/export to a separated module » Split static site generation and content import/export into separate sub-modules
Assigned: Unassigned » samuel.mortenson
Priority: Normal » Major

Changing the issue title a bit - I think the best path forward is to split the static site generation and content import/export into sub-modules, which would still allow you to only require the sub-module without installing all of Tome (i.e. composer require drupal/tome_export). The main Tome module would ideally just be an info file installing both sub-modules.

Part of that work will be re-working the StaticCache to only rely on content exports if they're available, many people have told me that they'd like to maintain an edit domain and only use Tome for exporting static HTML. Lots of work ahead, but I want to get this done!

samuel.mortenson’s picture

Due to #2863986: Allow updating modules with new service dependencies updating to beta1 will have to require manual update steps.

samuel.mortenson’s picture

Status: Active » Needs review
FileSize
103.51 KB

Here we go...

samuel.mortenson’s picture

samuel.mortenson’s picture

Tests pass, just want to sit on this overnight before committing.

samuel.mortenson’s picture

FileSize
105.71 KB
2.44 KB

Upgrade paths for Tome are going to be very difficult, I'm realizing.

  • samuel.mortenson authored 7461c41 on 8.x-1.x
    Issue #2997011 by samuel.mortenson: Split static site generation and...
samuel.mortenson’s picture

Status: Needs review » Fixed

Done! There should be no manual upgrade steps for alpha users, although I'll want to remove my workaround from #9 in stable.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.