This needs some adjusting (consider it a work in progress), but it’s a starting point…
This is an example of the multidimensional content model introduced in Hugo v0.153.0. This framework enables content to be organized across multiple languages, roles, and versions simultaneously. For this specific example, we are focusing on the version dimension to demonstrate a software documentation site where pages are added, modified, or removed with each release.
v0.1.0
- Added
/docs/functions/average - Added
/docs/functions/mean
v0.2.0
- Added
/docs/functions/variance - Modified
/docs/functions/mean
v0.3.0
- Added
/docs/functions/standard-deviation - Modified
/docs/functions/variance - Removed
/docs/functions/average
v0.4.0 (defaultContentVersion)
- Added
/docs/functions/median
Expected result when viewing the v0.4.0 site:
/docs/function/meanfrom v0.2.0/docs/functions/standard-deviationfrom v0.3.0/docs/functions/variancefrom v0.3.0/docs/functions/medianfrom v0.4.0
Try it:
git clone --single-branch -b hugo-forum-topic-56516 https://github.com/jmooring/hugo-testing hugo-forum-topic-56516
cd hugo-forum-topic-56516
hugo server
Notes:
- Hugo does not create an alias in the root of the public directory that points to the
defaultContentVersion. I need to figure out how to handle that. For now, visit http://localhost:1313/v0.4.0/. - This doesn’t use
module.mounts.sites.complements. I’m not sure how that should be configured for this example. Consequently, the desired inheritance isn’t working as desired.