-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
1,050 additions
and
676 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
if theme.structured_data && page.layout === 'post' | ||
- | ||
// use json-ld to add structured data | ||
const title = page.title | ||
const url = page.permalink | ||
const imageVal = page.cover_type === 'img' ? page.cover : theme.avatar.img | ||
const image = imageVal ? full_url_for(imageVal) : '' | ||
const datePublished = page.date.toISOString() | ||
const dateModified = (page.updated || page.date).toISOString() | ||
const author = page.copyright_author || config.author | ||
const authorHrefVal = page.copyright_author_href || theme.post_copyright.author_href || site.url; | ||
const authorHref = full_url_for(authorHrefVal); | ||
const jsonLd = { | ||
"@context": "https://schema.org", | ||
"@type": "BlogPosting", | ||
"headline": title, | ||
"url": url, | ||
"image": image, | ||
"datePublished": datePublished, | ||
"dateModified": dateModified, | ||
"author": [{ | ||
"@type": "Person", | ||
"name": author, | ||
"url": authorHref | ||
}] | ||
}; | ||
jsonLdScript = JSON.stringify(jsonLd, null, 2); | ||
- | ||
script(type="application/ld+json"). | ||
!{jsonLdScript} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#article-container | ||
#article-container.container | ||
!= page.content |
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
Oops, something went wrong.