-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
feat(open_graph): drop 'keywords' option from front-matter #4174
Merged
Conversation
This file contains 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
curbengh
changed the title
feat(open_graph): keywords option must be in array
feat(open_graph): drop 'keywords' option from front-matter
Mar 6, 2020
22 tasks
BREAKING CHANGE: keywords no longer support comma-separated string
BREAKING CHANGE: drop keywords option from front-matter keywords option in site config is still supported
curbengh
force-pushed
the
og-keywords-drop-string
branch
from
June 20, 2020 08:08
8cef984
to
7f7c571
Compare
SukkaW
approved these changes
Jun 20, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I think it is ready for review now.
22 tasks
curbengh
added a commit
to curbengh/hexo-theme-light
that referenced
this pull request
Aug 9, 2020
curbengh
added a commit
to curbengh/hexo-theme-phase
that referenced
this pull request
Aug 9, 2020
This was referenced Aug 9, 2020
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.
What does it do?
breaking change,
keywords
option is dropped from front-matter.keywords
value is added asarticle:tag
meta tag, same astags
value. So, the option is duplicate oftags
option in a post's front-matter.Currently,
page.keywords
takes precedent overpage.tags
. To avoid confusion, we should droppage.keywords
.However,
keywords
can also be specified in site config, which makes it behave like global tags, meaning it will be added to every post'sarticle:tag
meta tag, if the post doesn't have a tag. So,config.keywords
is still retained.Previously, there was
keywords
meta tag in which its value is comma-separated string.But that tag has been deprecated and replaced by
article:tag
meta tag in #3805, which is specified one-by-one.After #3805, as a side effect, open_graph ends up supporting tags and
config.keywords
in comma-separated string and array types and can lead to confusion (hexojs/site#1288 hexojs/site#1286).This PR drops support of comma-separated string so that it's consistent with
categories
.tags and
config.keywords
still supports string, but only for single value. It will be converted to a single-element array. e.g.'foo'
->[ 'foo' ]
.How to test
Screenshots
Pull request tasks