-
Notifications
You must be signed in to change notification settings - Fork 298
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
Add og:locale support #166
Changes from all commits
308cf7a
59b20c7
179530d
2191a55
8a5b022
abf3291
a1e5b4e
b3d5db3
e2114ab
18ec573
a2f64d4
8a8a5e9
4f919b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
/bin/ | ||
*.gem |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,8 @@ | |
{% assign seo_page_image = seo_page_image | escape %} | ||
{% endif %} | ||
|
||
{% assign seo_page_lang = page.lang | default: site.lang | default: "en_US" %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know about default values here, but I suppose I don't have a strong preference either way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be some sort of string normalization applied with maybe a For example it's possible to have a In both cases it appears they expect values of language-REGION, e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call. I can make that happen. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And done (assuming I didn’t do anything to annoy Rubocop). |
||
|
||
{% if seo_tag.title and seo_title %} | ||
<title>{{ seo_title }}</title> | ||
{% endif %} | ||
|
@@ -109,6 +111,8 @@ | |
<meta name="author" content="{{ seo_author_name }}" /> | ||
{% endif %} | ||
|
||
<meta property="og:locale" content="{{ seo_page_lang | replace:'-','_' }}" /> | ||
|
||
{% if seo_description %} | ||
<meta name="description" content="{{ seo_description }}" /> | ||
<meta property="og:description" content="{{ seo_description }}" /> | ||
|
@@ -124,7 +128,6 @@ | |
{% endif %} | ||
|
||
{% if seo_page_image %} | ||
|
||
<meta property="og:image" content="{{ seo_page_image }}" /> | ||
{% if page.image.height %} | ||
<meta property="og:image:height" content="{{ page.image.height }}" /> | ||
|
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.
What is this?
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.
I was following the RSpec install recommendation which created that directory. I didn’t want to bundle it with the repo.