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>2020-04-30 00:42:58 +0300
committerPravin Paratey <pravin@paratey.com>2020-04-30 00:42:58 +0300
commitc287ebc9b03493a74c3ac6146c17578e72d2c589 (patch)
tree29fc4348da379adbe14e5c4d0f8e47166435ef31
parent4817c3ce7d1145cd6ceeaf5edd63c2cc27ec753c (diff)
You can now add custom code in headers and footers
-rw-r--r--layouts/_default/baseof.html5
-rw-r--r--layouts/partials/custom_footer.html0
-rw-r--r--layouts/partials/custom_header.html0
-rw-r--r--layouts/partials/header.html (renamed from layouts/partials/head.html)2
-rw-r--r--layouts/partials/render_single_article.html2
5 files changed, 6 insertions, 3 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 76b277e..9282e3d 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en">
- {{- partial "head.html" . -}}
+ {{- partial "header.html" . -}}
<body>
<div class="container">
@@ -19,5 +19,6 @@
{{- partial "footer.html" . -}}
</div>
- </bod>
+ {{- partial "custom_footer.html" . -}}
+ </body>
</html>
diff --git a/layouts/partials/custom_footer.html b/layouts/partials/custom_footer.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/custom_footer.html
diff --git a/layouts/partials/custom_header.html b/layouts/partials/custom_header.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/custom_header.html
diff --git a/layouts/partials/head.html b/layouts/partials/header.html
index e3fb2da..69aa1d9 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/header.html
@@ -38,4 +38,6 @@
<meta name="keywords" content="{{ delimit .Params.tags "," }}">
{{ end }}
<meta name="author" content="{{ .Site.Params.Author }}">
+
+ {{- partial "custom_header.html" . -}}
</head>
diff --git a/layouts/partials/render_single_article.html b/layouts/partials/render_single_article.html
index 5317bc1..4248835 100644
--- a/layouts/partials/render_single_article.html
+++ b/layouts/partials/render_single_article.html
@@ -12,5 +12,5 @@
<a href="/tags/{{ $name | urlize }}" class="pure-button">{{ $name }}</a>
{{ end }}
</div>
- {{ replace .Content "<table>" "<table class='pure-table pure-table-striped'>" | markdownify}}
+ {{ replace .Content "<table>" "<table class='pure-table pure-table-striped'>" | safeHTML }}
</article> \ No newline at end of file