Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion layouts/_default/list.archivehtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{ if .Title }}
<span class="p-name"><b>{{ .Title }}</b></span>
{{ end }}
<span class="p-summary">{{ .Summary | truncate 100 }}</span>
<span class="p-summary">{{ .Summary | plainify | htmlUnescape | truncate 100 }}</span>
</p>

{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.json.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "https://jsonfeed.org/version/1",
"title": {{ if eq .Title .Site.Title }}{{ .Site.Title | jsonify }}{{ else }}{{ printf `%s on %s` .Title .Site.Title | jsonify }}{{ end }},
"icon": "{{ .Site.Author.avatar }}",
"icon": "{{ .Site.Params.author.avatar }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Site.BaseURL }}feed.json",
"items": [
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with .Site.Params.author.email }}<author>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</author>{{end}}
{{- if .Params.guid }}
<guid>{{ .Params.guid }}</guid>
{{- else -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/index.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "https://jsonfeed.org/version/1",
"title": {{ .Site.Title | jsonify }},
"icon": "{{ .Site.Author.avatar }}",
"icon": "{{ .Site.Params.author.avatar }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Site.BaseURL }}feed.json",
"items": [
Expand All @@ -22,7 +22,7 @@
{{- $s := replace $s "\\u003e" ">" -}}
{{- $s := replace $s "\\u0026" "&" }}
"content_html": {{ $s }},
{{ if .Params.custom_summary }}"summary": {{ .Summary | plainify | jsonify }},{{ end }}
{{ if .Params.custom_summary }}"summary": {{ .Summary | plainify | htmlUnescape | jsonify }},{{ end }}
"date_published": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}",
"url": "{{ .Permalink }}"
{{- with .Params.categories -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with .Site.Params.author.email }}<author>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</author>{{end}}
{{- if .Params.guid }}
<guid>{{ .Params.guid }}</guid>
{{- else -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/list.archivehtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{ if .Title }}
<span class="p-name"><b>{{ .Title }}</b></span>
{{ end }}
<span class="p-summary">{{ .Summary | truncate 100 }}</span>
<span class="p-summary">{{ .Summary | plainify | htmlUnescape | truncate 100 }}</span>
</p>

{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/list.archivejson.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "https://jsonfeed.org/version/1",
"title": {{ .Site.Title | jsonify }},
"icon": "{{ .Site.Author.avatar }}",
"icon": "{{ .Site.Params.author.avatar }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Site.BaseURL }}photos/index.json",
"items": [
Expand All @@ -11,7 +11,7 @@
{
"id": "{{ .Permalink }}",
"title": {{ .Title | jsonify }},
"content_text": {{ .Summary | truncate 100 | jsonify }},
"content_text": {{ .Summary | plainify | htmlUnescape | truncate 100 | jsonify }},
"date_published": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}",
"url": "{{ .Permalink }}"
}
Expand Down
2 changes: 1 addition & 1 deletion layouts/list.photosjson.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "https://jsonfeed.org/version/1",
"title": {{ .Site.Title | jsonify }},
"icon": "{{ .Site.Author.avatar }}",
"icon": "{{ .Site.Params.author.avatar }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Site.BaseURL }}photos/index.json",
"items": [
Expand Down
2 changes: 1 addition & 1 deletion layouts/list.podcastjson.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "https://jsonfeed.org/version/1",
"title": {{ .Site.Title | jsonify }},
"icon": "{{ .Site.Author.avatar }}",
"icon": "{{ .Site.Params.author.avatar }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Site.BaseURL }}podcast.json",
"_podcast": {
Expand Down
2 changes: 1 addition & 1 deletion layouts/list.podcastxml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<title>{{ .Title | htmlEscape }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{ . | htmlEscape}}{{ with $.Site.Author.name }} ({{ . | htmlEscape}}){{end}}</author>{{end}}
{{ with .Site.Params.author.email }}<author>{{ . | htmlEscape}}{{ with $.Site.Params.author.name }} ({{ . | htmlEscape}}){{end}}</author>{{end}}
<guid isPermaLink="true">{{ .Permalink }}</guid>
<description><![CDATA[{{ .Content }}]]></description>
{{ range first 1 .Params.audio_with_metadata }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/newsletter.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="microblog_email">

<p class="microblog_header">
<img src="{{ .Site.Author.avatar }}" width="30" height="30" alt="Profile icon" style="border-radius: 15px; vertical-align: middle;">
<img src="{{ .Site.Params.author.avatar }}" width="30" height="30" alt="Profile icon" style="border-radius: 15px; vertical-align: middle;">
<b>{{ .Site.Title }}</b>
— <a href="{{ .Footer.UnsubscribeURL }}">Unsubscribe</a>

Expand Down
24 changes: 24 additions & 0 deletions layouts/partials/microblog_head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,30 @@
<link rel="me" href="https://instagram.com/{{ . }}">
{{ end }}

{{ if .Site.Params.opengraph_is_enabled }}
{{ if .IsHome }}
<meta property="og:title" content="{{ .Site.Title }}">
<meta name="og:description" content="{{ .Site.Params.about_me | truncate 200 }}">
<meta property="og:image" content="{{ .Site.Params.author.avatar }}">
{{ else }}
<meta property="og:title" content="{{ with .Page.Title }}{{ . }}{{ else }}{{ delimit (split (.Summary | plainify) " " | first 5) " " }} …{{ end }}">
<meta name="og:description" content="{{ .Summary | truncate 200 }}">
{{ if .Params.photos }}
{{- range .Params.photos -}}
<meta property="og:image" content="{{ . }}">
{{- end -}}
{{ else }}
{{ with .Params.opengraph.image }}
<meta property="og:image" content="{{ . }}">
{{ end }}
{{ end }}
{{- end -}}

<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
{{ end }}

<link rel="shortcut icon" href="https://micro.blog/{{ .Site.Params.author.username }}/favicon.png" type="image/x-icon">
<link rel="EditURI" type="application/rsd+xml" href="{{ "rsd.xml" | absURL }}">
<link rel="authorization_endpoint" href="https://micro.blog/indieauth/auth">
Expand Down