Skip to content

Commit

Permalink
Updates to oembed code
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncanma committed May 28, 2024
1 parent 13a8b9d commit 8438406
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
18 changes: 9 additions & 9 deletions themes/hello-friend-ng/layouts/_default/baseof.oembed.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"version": "1.0",
"provider_name": "{{ .Site.Title }}",
"provider_url": "{{ .Site.BaseURL }}",
"type": "rich",
"title": "{{ .Title }} | {{ .Site.Title }}",
"url": "{{ .Permalink }}",
"author_name": "{{ if .Params.author }}{{ .Params.author }}{{ else }}Anonymous{{ end }}",
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"200\" title=\"{{ .Title }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
}
"version": "1.0",
"provider_name": "{{ .Site.Title }}",
"provider_url": "{{ .Site.BaseURL }}",
"type": "rich",
"title": "{{ .Title | partial "json-escape" }} | {{ .Site.Title }}",
"url": "{{ .Permalink }}",
"author_name": "{{ if .Params.author }}{{ .Params.author }}{{ else }}Anonymous{{ end }}",
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"200\" title=\"{{ .Title | partial "json-escape" }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
}
4 changes: 2 additions & 2 deletions themes/hello-friend-ng/layouts/_default/oembed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"provider_name": "{{ .Site.Title }}",
"provider_url": "{{ .Site.BaseURL }}",
"type": "rich",
"title": "{{ .Title }} | {{ .Site.Title }}",
"title": "{{ .Title | partial "json-escape" }} | {{ .Site.Title }}",
"url": "{{ .Permalink }}",
"author_name": "{{ if .Params.author }}{{ .Params.author }}{{ else }}Anonymous{{ end }}",
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"200\" title=\"{{ .Title }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"200\" title=\"{{ .Title | partial "json-escape" }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
}
18 changes: 9 additions & 9 deletions themes/hello-friend-ng/layouts/albums/single.oembed.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"version": "1.0",
"provider_name": "{{ .Site.Title }}",
"provider_url": "{{ .Site.BaseURL }}",
"type": "rich",
"title": "{{ .Title }} | {{ .Site.Title }}",
"url": "{{ .Permalink }}",
"author_name": "{{ if .Params.author }}{{ .Params.author }}{{ else }}Anonymous{{ end }}",
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"300\" title=\"{{ .Title }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
}
"version": "1.0",
"provider_name": "{{ .Site.Title }}",
"provider_url": "{{ .Site.BaseURL }}",
"type": "rich",
"title": "{{ .Title | partial "json-escape" }} | {{ .Site.Title }}",
"url": "{{ .Permalink }}",
"author_name": "{{ if .Params.author }}{{ .Params.author }}{{ else }}Anonymous{{ end }}",
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"200\" title=\"{{ .Title | partial "json-escape" }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
}
1 change: 1 addition & 0 deletions themes/hello-friend-ng/layouts/partials/json-escape.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ . | replaceRE `\"` `\"` | safeHTML }}
4 changes: 2 additions & 2 deletions themes/hello-friend-ng/layouts/posts/single.oembed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"provider_name": "{{ .Site.Title }}",
"provider_url": "{{ .Site.BaseURL }}",
"type": "rich",
"title": "{{ .Title }} | {{ .Site.Title }}",
"title": "{{ .Title | partial "json-escape" }} | {{ .Site.Title }}",
"url": "{{ .Permalink }}",
"author_name": "{{ if .Params.author }}{{ .Params.author }}{{ else }}Anonymous{{ end }}",
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"350\" title=\"{{ .Title }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
"html": "<iframe src=\"{{ .Permalink }}iframe.html\" width=\"600\" height=\"200\" title=\"{{ .Title | partial "json-escape" }}\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"></iframe>"
}

0 comments on commit 8438406

Please sign in to comment.