Skip to content
Snippets Groups Projects
Verified Commit 59daf0c7 authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman :boom:
Browse files

Merge branch 'upstream'

parents f7b0ec92 8c10be0c
No related branches found
No related tags found
No related merge requests found
Pipeline #2165 passed
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
* Added MathJax support for rendering Latex and math. * Added MathJax support for rendering Latex and math.
* Added support for PseudocodeJS for rendering beautiful, standard, pseudocode. * Added support for PseudocodeJS for rendering beautiful, standard, pseudocode.
* Table of contents will now render if frontmatter `toc` is set to `true`. * Table of contents will now render if frontmatter `toc` is set to `true`.
* Fixed a bug where backslashes in the summary of a post could break ActivityPub
JSON endpoints.
## 1.1.0 ## 1.1.0
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
{{ range $index, $element := $paginator.Pages }} {{ range $index, $element := $paginator.Pages }}
<article class='post'> <article class='post'>
{{ partial "post_header_list.html" . }} {{ partial "post_header_list.html" . }}
{{ partial "toc.html" . }}
<section class='post-content'> <section class='post-content'>
{{.Content }} {{.Content }}
</section> </section>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<article class='post'> <article class='post'>
{{ partial "post_header_single.html" . }} {{ partial "post_header_single.html" . }}
<section class='post-content'> <section class='post-content'>
{{ if isset .Params "toc" }}{{ .TableOfContents }}{{ end}} {{ partial "toc.html" . }}
{{ .Content }} {{ .Content }}
{{ if eq .Section "resource" }}{{ partial "backlinks.html" . }}{{ end }} {{ if eq .Section "resource" }}{{ partial "backlinks.html" . }}{{ end }}
{{ partial "article_footer.html" . }} {{ partial "article_footer.html" . }}
......
{{- $summaryClean := "" }}
{{- if .Summary }}
{{- $summaryClean = .Summary }}
{{- $summaryClean = replace $summaryClean "\n" "<br>" }}
{{- $summaryClean = replace $summaryClean "\r" "" }}
{{- $summaryClean = replace $summaryClean "\\" "\\\\" }}
{{- end }}
{ {
{{ partial "context.ajson" . }}, {{ partial "context.ajson" . }},
"id": "{{ .Permalink }}", "id": "{{ .Permalink }}",
...@@ -12,7 +19,7 @@ ...@@ -12,7 +19,7 @@
"sensitive": false, "sensitive": false,
"atomUri": "{{ .Permalink }}", "atomUri": "{{ .Permalink }}",
"inReplyToAtomUri": null, "inReplyToAtomUri": null,
"content": {{ printf "\"" | safeHTML }}<b>{{.Title}}</b>{{ if .Summary }}<br>{{ replace (replace .Summary "\n" "<br>") "\r" "" | safeHTML}}{{ end }}<br><br>Read more here:<br><a href='{{.Permalink}}'>{{.Permalink}}</a><br><br>{{ if .Site.Params.renderArticleHashtags }}{{ if .Params.tags }}{{ range $indexArticleTags, $elementArticleTag := .Params.tags }}{{ if ne $indexArticleTags 0 }} {{ end }}<a href='{{ site.BaseURL }}tags/{{ $elementArticleTag | lower }}' class='mention hashtag' rel='tag'>#<span>{{ $elementArticleTag }}</span></a>{{ end }}{{ end }}{{ end }} {{ if .Site.Params.renderDefaultHashtags }}{{ if .Site.Params.postHashtags }}{{ range $indexTags, $elementTag := .Site.Params.postHashtags }}{{ if ne $indexTags 0 }} {{ end }}<a href='#' class='mention hashtag' rel='tag'>#<span>{{ $elementTag }}</span></a>{{ end }}{{ end }}{{ end }}{{ printf "\"" | safeHTML }}, "content": {{ printf "\"" | safeHTML }}<b>{{.Title}}</b>{{ if .Summary }}<br>{{ $summaryClean | safeHTML}}{{ end }}<br><br>Read more here:<br><a href='{{.Permalink}}'>{{.Permalink}}</a><br><br>{{ if .Site.Params.renderArticleHashtags }}{{ if .Params.tags }}{{ range $indexArticleTags, $elementArticleTag := .Params.tags }}{{ if ne $indexArticleTags 0 }} {{ end }}<a href='{{ site.BaseURL }}tags/{{ $elementArticleTag | lower }}' class='mention hashtag' rel='tag'>#<span>{{ $elementArticleTag }}</span></a>{{ end }}{{ end }}{{ end }} {{ if .Site.Params.renderDefaultHashtags }}{{ if .Site.Params.postHashtags }}{{ range $indexTags, $elementTag := .Site.Params.postHashtags }}{{ if ne $indexTags 0 }} {{ end }}<a href='#' class='mention hashtag' rel='tag'>#<span>{{ $elementTag }}</span></a>{{ end }}{{ end }}{{ end }}{{ printf "\"" | safeHTML }},
"attachment": [], "attachment": [],
{{ if (or (and .Site.Params.postHashtags .Site.Params.renderDefaultHashtags) (and .Params.tags .Site.Params.renderArticleHashtags)) }} {{ if (or (and .Site.Params.postHashtags .Site.Params.renderDefaultHashtags) (and .Params.tags .Site.Params.renderArticleHashtags)) }}
"tag": [ "tag": [
......
{{ .TableOfContents }} {{- if isset .Params "toc" }}{{ .TableOfContents }}{{ end}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment