markdownify post titles since some people use backticks in post titles, and MathJax will treat content in backticks as inline math

e.g.

@jystatistics: https://jystatistics.rbind.io/post/2018/06/28/study-ggplot2/

@tcgriffith: https://tc.rbind.io/post/2018/01/25/apply-and-do-call/
This commit is contained in:
Yihui Xie 2018-08-30 09:24:07 -05:00
parent 9c9c90e5ab
commit e658235991
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
{{if not .IsHome }} {{if not .IsHome }}
<h1>{{ .Title }}</h1> <h1>{{ .Title | markdownify }}</h1>
{{ end }} {{ end }}
{{ .Content }} {{ .Content }}
@ -10,7 +10,7 @@
{{ range (where .Data.Pages "Section" "!=" "") }} {{ range (where .Data.Pages "Section" "!=" "") }}
<li> <li>
<span class="date">{{ .Date.Format "2006/01/02" }}</span> <span class="date">{{ .Date.Format "2006/01/02" }}</span>
<a href="{{ .URL }}">{{ .Title }}</a> <a href="{{ .URL }}">{{ .Title | markdownify }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View File

@ -1,6 +1,6 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
<div class="article-meta"> <div class="article-meta">
<h1><span class="title">{{ .Title }}</span></h1> <h1><span class="title">{{ .Title | markdownify }}</span></h1>
{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }} {{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }} {{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
</div> </div>