Commit 68891b33 authored by Kaushal Modi's avatar Kaushal Modi
Browse files

Fix for deprecation in Hugo 0.55

parent 379c91d8
......@@ -7,11 +7,15 @@
<data class="u-url" value="{{ .Permalink }}"></data>
{{ partial "author.html" (dict "page" . "fmt" "u-author") }}
{{ if (eq .File.Path "") }} <!-- Regular section -->
<h1 class="p-name">Posts in ‘{{ .Dir | default .Section }}’</h1>
{{ else }} <!-- Branch bundle based section -->
<h1 class="p-name">{{ .Title }}</h1>
<h2>Posts in ‘{{ .Dir | default .Section }}’</h2>
{{ $title := .Title }}
{{ $section := .Section }}
{{ with .File }}
{{ if (eq .Path "") }} <!-- Regular section -->
<h1 class="p-name">Posts in ‘{{ .Dir | default $section }}’</h1>
{{ else }} <!-- Branch bundle based section -->
<h1 class="p-name">{{ $title }}</h1>
<h2>Posts in ‘{{ .Dir | default $section }}’</h2>
{{ end }}
{{ end }}
{{ if not .Params.notoc }}
......
......@@ -19,19 +19,23 @@
{{ end }}
{{ $ox_hugo_string = printf "%s +" $ox_hugo_string }}
{{ end }}
{{ with (and $source.url $source.md_dir $file_info.Path) }}
{{ $md_source_string := printf `Markdown <a href="%s/raw/%s/%s/%s">source</a> of this page` $source.url $branch $source.md_dir $file_info.Path }}
{{ with $source.ox_hugo }}
{{ $source_string = printf `%s<span class="nobr">&mdash; <code>ox-hugo</code>-generated</span> %s` $source_string $md_source_string }}
{{ else }}
{{ $source_string = printf `%s<span class="nobr">&mdash; %s</span>` $source_string $md_source_string }}
{{ with $file_info }}
{{ if (and $source.url $source.md_dir .Path) }}
{{ $md_source_string := printf `Markdown <a href="%s/raw/%s/%s/%s">source</a> of this page` $source.url $branch $source.md_dir .Path }}
{{ with $source.ox_hugo }}
{{ $source_string = printf `%s<span class="nobr">&mdash; <code>ox-hugo</code>-generated</span> %s` $source_string $md_source_string }}
{{ else }}
{{ $source_string = printf `%s<span class="nobr">&mdash; %s</span>` $source_string $md_source_string }}
{{ end }}
{{ end }}
{{ end }}
{{ with (and $source.url $source.org_dir) }}
{{ $source_string = printf `%s <span class="nobr">[<a href="%s/tree/%s/%s">Org mode source</a>]</span>` $source_string $source.url $branch $source.org_dir }}
{{ end }}
{{ with (and $source.url $source.md_dir $file_info.Path) }}
{{ $source_string = printf "%s." $source_string }}
{{ with $file_info }}
{{ if (and $source.url $source.md_dir .Path) }}
{{ $source_string = printf "%s." $source_string }}
{{ end }}
{{ end }}
{{ end }}
......
......@@ -12,7 +12,7 @@
<meta name="referrer" content="no-referrer">
<title>
{{ if eq .URL "/" }}
{{ if eq .RelPermalink "/" }}
{{ site.Title }} ❚
{{ else }}
{{ .Title }} ❚ {{ site.Title }}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment