diff options
-rw-r--r-- | layouts/index.html | 1 | ||||
-rw-r--r-- | layouts/partials/render_single_article.html | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index 651deef..a1f4a37 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -8,6 +8,7 @@ {{ range .Paginator.Pages }} + {{ .Scratch.Set "isMainPage" "true" }} <div class="pad"> {{- partial "render_single_article.html" . -}} </div> diff --git a/layouts/partials/render_single_article.html b/layouts/partials/render_single_article.html index ada6f97..b519033 100644 --- a/layouts/partials/render_single_article.html +++ b/layouts/partials/render_single_article.html @@ -5,7 +5,11 @@ </div> {{ end }} <article> + {{ if eq (.Scratch.Get "isMainPage") "true" -}} <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> + {{ else -}} + <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> + {{- end -}} <div class="tags"> {{ range .Params.tags }} {{ $name := . }} @@ -13,4 +17,4 @@ {{ end }} </div> {{ replace .Content "<table>" "<table class='pure-table pure-table-striped'>" | safeHTML }} -</article> +</article>
\ No newline at end of file |