Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdownify titles #279

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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/baseof.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
{{- $avatarImgSrc := .Site.Params.AvatarURL -}}
{{- if and (isset site.Params "avatarURL") (not (hasPrefix $avatarImgSrc "http")) -}}
{{- if and (isset .Site.Params "avatarURL") (not (hasPrefix $avatarImgSrc "http")) -}}
{{- $avatarImgSrc = (urls.JoinPath $.Site.BaseURL ($.Site.Params.AvatarURL | default "")) -}}
{{- end -}}
{{- .Scratch.Set "avatarImgSrc" $avatarImgSrc -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
</style>

{{ $title := .Title | default .Site.Title }}
{{ $title := .Title | markdownify | default .Site.Title }}
{{ $description := ((.Description | default (.Summary | default .Content) | default .Site.Params.Description) | plainify | truncate 160) }}
{{ $image := .Params.image | default (.Scratch.Get "avatarImgSrc") }}
{{ $siteKeywords := .Site.Params.MetaKeywords | default (slice) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ end }}

<div class="nav-title">
<a class="nav-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<a class="nav-brand" href="{{ .Site.BaseURL }}">{{ .Title | markdownify }}</a>
</div>

<div class="nav-links">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/list-posts.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="post-title">
<a href="{{ .Permalink }}" class="post-link">{{ .Title }}</a>
<a href="{{ .Permalink }}" class="post-link">{{ .Title | markdownify }}</a>
{{/* Decide to display the date based on the tags */}}
{{ $displayDate := true }}
{{ $tagsHidePostDate := or .Site.Params.Hidden.TagsPostDate slice }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="post container">

<div class="post-header-section">
<h1>{{ .Title }}</h1>
<h1>{{ .Title | markdownify }}</h1>
</div>

<div class="post-content">
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/post.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="post container">
<div class="post-header-section">
<h1>{{ .Title }}</h1>
<h1>{{ .Title | markdownify }}</h1>

{{/* Determine whether to display the date & description based on tags */}}

Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/prev-next.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<a href="{{ .RelPermalink }}">
&#8592;
{{ i18n "previous" }}:
{{ .Title }}
{{ .Title | markdownify }}
</a>
</p>
<p class="prev-post-date">
Expand All @@ -18,7 +18,7 @@
<p>
<a href="{{ .RelPermalink }}">
{{ i18n "next" }}:
{{ .Title }}
{{ .Title | markdownify }}
&#8594;
</a>
</p>
Expand Down