Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pravin/hugo-theme-prav.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPravin Paratey <pravin@paratey.com>2022-04-07 15:42:09 +0300
committerGitHub <noreply@github.com>2022-04-07 15:42:09 +0300
commit6bef8bf0533c300ea8c61f13036713f5e5a30d63 (patch)
tree421a061d3be7d5689e7e7c30640fbf76615ac013
parentb74ac16d35195f8b493de8a7786c9b599dba5751 (diff)
parent9b9e91314747a2e1698afb3905dc681d1441f968 (diff)
Merge pull request #7 from leonrosenshein/master
Fixes for Bing's webmaster guidelines
-rw-r--r--layouts/index.html6
-rw-r--r--layouts/partials/header.html30
-rw-r--r--layouts/partials/render_single_article.html6
3 files changed, 26 insertions, 16 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 1050056..a1f4a37 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,8 +1,14 @@
{{ define "main" }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) 10 }}
+
<div id="content" class="pure-u-1 pure-u-md-3-4 pure-u-sm-1">
+ <h1 style="text-align: center; margin: 0;">
+ Recent Posts (page {{ $paginator.PageNumber }} / {{ $paginator.TotalPages }})
+ </h1>
+
{{ range .Paginator.Pages }}
+ {{ .Scratch.Set "isMainPage" "true" }}
<div class="pad">
{{- partial "render_single_article.html" . -}}
</div>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 5ad171e..5478392 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -2,16 +2,16 @@
<meta charset="utf-8">
<meta name="theme-color" content="#000" />
<title>
- {{ if .IsHome }}
- {{ if .Site.Title }}
- {{ .Site.Title }}
- {{ else }}
- {{ .Site.Params.Title }}
- {{ end }}
- &middot; {{ .Site.Params.Tagline }}
- {{ else }}
- {{ .Title }} &middot; {{ .Site.Title }} {{ .Site.Params.Title }}
- {{ end }}
+ {{- if .IsHome -}}
+ {{ if .Site.Title -}}
+ {{ .Site.Title -}}
+ {{ else -}}
+ {{ .Site.Params.Title -}}
+ {{ end -}}
+ &middot; {{ .Site.Params.Tagline -}}
+ {{ else -}}
+ {{ .Title }} &middot; {{ .Site.Title }} {{ .Site.Params.Title -}}
+ {{- end -}}
</title>
<!-- Stylesheets -->
@@ -32,15 +32,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="{{ hugo.Generator }}">
- {{ if .Description }}
+ {{ if .Description -}}
<meta name="description" content="{{ .Description }}">
- {{ else }}
+ {{ else -}}
<meta name="description" content="{{ .Site.Params.Tagline }}">
- {{ end }}
+ {{ end -}}
- {{ if .Params.tags }}
+ {{ if .Params.tags -}}
<meta name="keywords" content="{{ delimit .Params.tags "," }}">
- {{ end }}
+ {{ end -}}
<meta name="author" content="{{ .Site.Params.Author }}">
{{- partial "custom_header.html" . -}}
diff --git a/layouts/partials/render_single_article.html b/layouts/partials/render_single_article.html
index d0e91d1..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