-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Add roles and versions as new dimensions (in addition to language) #13679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
bep
wants to merge
28
commits into
gohugoio:master
Choose a base branch
from
bep:feat/roles-versions-5139
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
864cfcd
to
779649e
Compare
e914f3f
to
6f88a60
Compare
01f9c33
to
cf40195
Compare
958d82b
to
f131d38
Compare
9a2ad51
to
35d3765
Compare
3228817
to
99dda69
Compare
bee5b9a
to
42a0b02
Compare
42a0b02
to
1e16307
Compare
a8c56f5
to
c9852ca
Compare
c9852ca
to
1b8f38b
Compare
9e611be
to
7a22979
Compare
7a22979
to
5c87b0f
Compare
5c87b0f
to
671f1d5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The implementation here is still early and non-working. So, the
role
part of this has been thought about a lot (at least by me, e.g. in #519). Theversions
part of this is a little vaguer, but I think it helps with the end result to add them both in one go.So,
Note that the Glob pattern support in
v2.*
is also new – but I suspect we will need something like that for this.As for
languages
, it will be possible to configure a role/version as the default (e.g. the "current version"). I guess it also makes sense to control whether the default should be rendered to a sub folder or not.As to the order of the prefixes,
role
needs to come first, I guess.versions
androles
to the file mount config.content/mybundle/index.§1.md
andcontent/mybundle/index.§2.md
to allow having multiple variants of the same content path.New API
Site.Version
; a struct withName
,Site
...site.Versions
; a slice ofVersion
. Ordered byWeight
(if set) ascending, else semver order, newest first.Site.Role
; a struct withName
,Site
...site.Roles
; a slice ofRole
.Note that we currently have
Site.Sites
, which is, with the above setup coming, a little confusing, so we should possibly also consider to addSite
to `Language.New Config
I've thought about this, and decided to not make up any new clever syntax, but just mimic how we do it for languages.