Open lb- opened 2 years ago
@thibaudcolas I'm guessing this is not relevant after yesterday's discussion and decisions?
I still think there's a case for this feature - being able to remix / reuse the content (similar to how current docs explort pdf/epub).
But as per Slack - if we will have versioning still within the CMS (via translations) - it's probably lower priority.
Yes, I agree that a historic record is very useful.
Other reasons to provide a 'dump of the contents' are:
A management command that:
dumpdata
to output a YYYMMDD-data.json
A periodic task could call this management command. Snapshots can be presented on a download page.
Example of a dumpdata command:
./manage.py dumpdata --natural-foreign --indent 2 \
-e contenttypes -e auth.permission -e postgres_search.indexentry \
-e wagtailcore.groupcollectionpermission \
-e wagtailcore.grouppagepermission -e wagtailimages.rendition \
-e sessions > YYYMMDD-data.json
The -e
excludes tables that we don't want to share. We should exclude users, comments, feedback, etc.
To load the dump./manage.py loaddata data.json
and unzip the media into the correct directory.
With the removal of the versioning solution (see https://github.com/wagtail/guide/issues/62 & https://github.com/wagtail/guide/pull/143 ) we will lose the ability to have a historic record of the Guide.
This will be a reasonably but downgrade from the current RTD solution where anyone can link to the guide for any older version. This is particularly useful for those who only use the LTS versions.
It would be good to be able to provide some kind of future proofing of this loss of detail via a way to export the current site.
This way we can store these somehow and when we do add versioning back we can import this content.
Proposed solution idea 1 - nightly JSON dump to this repo
We automatically use the Django dump data feature and get the CI to commit to this repo - replacing one large JSON file each day.
This would need to be sanitized somewhat (user emails / names) but could be a quick way to resolve this.
Proposed solution idea 2 - Static html export
Similar to above but we have a manual or automatic way to export a static html build of the entire guide. This could be good for those that want to host the content locally/ offline or even remix it.
Could be extended to an epub and even markdown export in the future.
This could also save the html to the rpo. But maybe a seperate isloated branch to avoid too much noise.
This could use bakery or Wagtail freeze.