forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split schema to a separate include file (mmistakes#3085)
* Make changes to schema easier * Only show on one page not on all pages * Move schema.html to _includes/ and move the URL guard out --------- Co-authored-by: iBug <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script type="application/ld+json"> | ||
{ | ||
"@context": "https://schema.org", | ||
{% if site.social.type == "Organization" %} | ||
"@type": "Organization", | ||
"url": {{ '/' | absolute_url | jsonify }}{% if site.og_image %}, | ||
"logo": {{ site_og_image | jsonify }}{% endif %}{% if site.social.links %}, | ||
"sameAs": {{ site.social.links | jsonify }}{% endif %} | ||
{% else %} | ||
"@type": "Person", | ||
"name": {{ site.social.name | default: site.name | jsonify }}, | ||
"url": {{ '/' | absolute_url | jsonify }}{% if site.social.links %}, | ||
"sameAs": {{ site.social.links | jsonify }}{% endif %} | ||
{% endif %} | ||
} | ||
</script> |
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