marcantondahmen / automad

A flat-file content management system and template engine
https://automad.org
MIT License
660 stars 42 forks source link

Migration assistant for version 2 #89

Closed robinloeffel closed 8 months ago

robinloeffel commented 8 months ago

As stated here, content can't be ported over from version 1 to version 2. Are there any plans for some kind of migration assistant? While it's nice that old templates will continue to work, I'd rather my clients' page data were compatible. Templates can be adapted by us developers, content, not so much.

In that sense, an assistant that takes in pages from version 1, and emits the same content, but in the format of version 2, would be much appreciated. Or some kind of manual guide. I can't expect my freelance clients, some of them just one-man/woman-shows, to accept that they'll lose years worth of their content, because, in non-technical words, “the app where we manage our stuff” had to be updated.

I'm aware that Automad is a free and open source project, and I greatly appreciate all the work and time that was put into it, but this feels like a big oversight for a CMS.

marcantondahmen commented 8 months ago

There is now a migrate command for the console. It has been in the works already before. But since version 2 is in an early and unstable stage, migration is not the main focus. Testing is. The page you are linking to clearly states also that it is an alpha stage project. Upgrading now a production site is too early.

However, if you want to do it already for testing purpose, you can migrate an old site by creating a fresh installation and running the following command inside the main directory of the new site:

php automad/console migrate /path/to/old/site

More info in the docs.

robinloeffel commented 8 months ago

I know it's too early to upgrade right now, that was not my point. Since the only statement about compatibility between versions was the short paragraph above, stating that page content wouldn't be able to be ported over, and ending with something like “it's not trivial to upgrade”, there was no way to know what exactly upgrading would entail.

Thanks for the clarification and the script!