Uh oh!
There was an error while loading. Please reload this page.
Update site.json and frontmatter tag behavior - #652
Conversation
yamgent
commented
Feb 2, 2019
Seems reasonable for now, although that means that if authors really use Also, I see |
damithc
commented
Feb 2, 2019
Will there be a need to allow more than one tag? e.g., Another approach is to have a mechanism like the following (assuming we allow tags to be specified at the point of inclusion too):
|
yamgent
commented
Feb 2, 2019
I think this approach is the best, it allows the author to have ultimate control over how the overriding behaviour works. Let's do that. |
jamos-tay
commented
Feb 2, 2019
Hmm okay, seems doable |
727364e to
63a35f0Comparejamos-tay
commented
Feb 2, 2019
Updated
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
71a9559 to
c6acd21CompareUpdated |
yamgent
left a comment
There was a problem hiding this comment.
Need you to resolve merge conflicts.
c6acd21 to
28c714bComparejamos-tay
commented
Feb 10, 2019
Rebased |
yamgent
commented
Feb 11, 2019
Need you to resolve conflict again. :P I will merge this first next time. |
28c714b to
978a081Comparejamos-tay
commented
Feb 11, 2019
Rebased |
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [X] Enhancement to an existing feature
Follow up from #467
What is the rationale for this request?
The current tagging overwrite behavior is too aggressive. We want to support the following use case:
What changes did you make? (Give an overview)
Introduced group tags. Group tags are represented as
group--tagName. No changes to current tag syntax, e.g.tags: ['lang--java', 'lang--c++', 'level--advanced']. (I think this is more convenient than using an object{ lang : java }, also it is consistent with usage in html files)Instead of overriding, site and frontmatter tags are merged, but only one tag of a single group will be applied. For example:
site.json:['a', 'b', 'lang--java']frontmatter:['c', 'd', 'lang--cs', 'level--beginner']Merged:
['a', 'b', 'c', 'd', 'lang--java', 'level--beginner']Only the first
--matters, tags like['group--Name--name']are possibleTags without
--are treated as a group tag with no name, they can be used on their own. We don't have to worry about overriding behavior for these.Users can turn off tags completely by specifying a non-existent tag name:
site.json:['lang--off', 'x--off']frontmatter:['lang--java', 'x']lang--javaandxtags will no longer show.Is there anything you'd like reviewers to focus on?
Does the above behavior work? I'm open to revising it.
I'll update the documentation if it's okay.