Contentful logo

Contentful Community

Space wide, named, snapshots for version control of content?

We are considering using Contentful for a documentation page for an API. This page would contain a multi choice for different versions of the API which would contain specific guides/docs etc related to that version.

For example, lets say that the API gets a new version, version 1.6. This version will mean changes to a few parts of the content that has been deprecated in the version. We will still want to keep the old version of the docs available for editing etc but also have new content for the new version docs.

I’ve thought about a few solutions, like creating a Version content type to which i bind some other high level content types, like a specific page could be bound to that Version type but smaller sections of the pages would not be explicitly bound. This would however cause a lot of confusion when trying to edit content that is not explicitly versioned because it’s hard to know what version that is currently being edited and adding a version reference to all content types just isn’t feasible.

I’ve thought about a few other solutions as well but what I keep coming back to is that when a new version is added, I would want to create a snapshot of all the data in the space as it currently is and then name that snapshot to the current version (the version before the update is applied). For example if we are currently on 1.7 and we are going to release 1.8 I would name the snapshot v1.7 and then always fetch that snapshot when building the static site data for that version.

I am pretty sure that this doesn’t exists, but maybe someone has an alternative solution to my problem? Forgive me if this is in the wrong category as well, I couldn’t figure out where to put it.

1 Like

Depending on your plan, maybe you could create an environment per version and move master alias to the released documentation version.

The problem in that case is that environments are limited and our amount of versions can be up to 40-50. We also want all the versions to be “published” at the same time since all versions of the documentation should be available on the site.