Pages versionning
Created by: el00ruobuob
Hi everyone,
I wonder if we could use front matter in all pages to track changes and display a disclaimer on the website. The idea is:
- To warn the readers that the version may be outdated or incomplete
- To help the localization team to do update
For that, i suggest to add:
- On Each File:
---
version.major: 1
version.minor: 0
version.build: 0
---
{% include version_check.html title={{ page.title }} version={{ page.version }} %}
- in a version_check.html page:
{% assign templatepage = site.pages | where: 'title', {{ title }} %}
{% for item in templatepage %}
{% if item.path | slice: 1, 2 == "en" %}
{% assign templateVersion = item.version %}
{% endif %}
{% endfor %}
{% if version.major != mainVersion.major %}
//disclaimer "This page is outdated, do not use it as reference"
{% version.minor != mainVersion.major %}
//disclaimer "This page is not up to date, but may be used as reference"
{% else %}
// Nothing
{% endif %}
The Major version concerns changes that make the old version unusable (totally outdated - a full rewrite needed), the Minor version is for improvements (like adding updated screenshots, or new options) keeping the old version usable, and build version is for typos and other corrections which are not related to the content that matter.
What do you think of this @rehrar @erciccione