diff options
author | Pravin Paratey <pravin@paratey.com> | 2020-04-30 00:42:58 +0300 |
---|---|---|
committer | Pravin Paratey <pravin@paratey.com> | 2020-04-30 00:42:58 +0300 |
commit | c287ebc9b03493a74c3ac6146c17578e72d2c589 (patch) | |
tree | 29fc4348da379adbe14e5c4d0f8e47166435ef31 | |
parent | 4817c3ce7d1145cd6ceeaf5edd63c2cc27ec753c (diff) |
You can now add custom code in headers and footers
-rw-r--r-- | layouts/_default/baseof.html | 5 | ||||
-rw-r--r-- | layouts/partials/custom_footer.html | 0 | ||||
-rw-r--r-- | layouts/partials/custom_header.html | 0 | ||||
-rw-r--r-- | layouts/partials/header.html (renamed from layouts/partials/head.html) | 2 | ||||
-rw-r--r-- | layouts/partials/render_single_article.html | 2 |
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 |