diff options
author | Suraj Mandal <surajmandalcell@gmail.com> | 2019-08-17 17:46:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-17 17:46:20 +0300 |
commit | eaed5993ff70bc9987c264d7af65b6036c28be80 (patch) | |
tree | 69464afb08fffccd4ce30aa9c68ba36d1d586b40 | |
parent | acfd2b3926fbeed05b7cae78185265e116f52a97 (diff) | |
parent | ba8a2ef1d9eab15a719487c2b98caeb4e60245fc (diff) |
Merge pull request #3 from mzch/master
Prepare Hugo future version
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 12 | ||||
-rw-r--r-- | layouts/partials/head.html | 8 | ||||
-rw-r--r-- | layouts/partials/menu.html | 2 |
4 files changed, 20 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 63fa365..61177d4 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -26,6 +26,8 @@ copyright = "© Copyright notice" linkedin = "Your LinkedIn username" # Disqus shortname disqus = "" + # Commento Host + commento = "" # Google Analytics API key. ga_api_key = "Your Google Analytics tracking id" # Logo image. This is displayed ogp image. diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2ee0827..b750cda 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -35,6 +35,18 @@ </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> {{ end }} + {{ with .Site.Params.commento }} + <div id="commento"></div> + <script defer> + var commento_url = {{ . }}; + (function() { + var d = document, s = d.createElement('script'); + s.src = 'https://' + commento_url + '/js/commento.js'; + (d.head || d.body).appendChild(s); + })(); + </script> + <noscript>Please enable JavaScript to view the comments powered by Commento.</a></noscript> + {{ end }} <nav class="p-pagination c-pagination"> <div class="c-pagination__ctrl"> <div class="c-pagination__newer"> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 0ba38ec..e1ceb9e 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -37,14 +37,16 @@ <meta property="og:type" content="website" /> {{ end }} <!-- Hugo Version number --> - {{ .Hugo.Generator -}} + {{ hugo.Generator -}} <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600" rel="stylesheet"> <link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css" /> {{- with .Site.Params.favicon }} <link rel='icon' type='image/x-icon' href="{{ . | absURL }}" /> {{- end -}} - {{ if eq .URL "/" }} - <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> + {{ if eq .RelPermalink "/" }} + {{ with .Site.Home.AlternativeOutputFormats.Get "RSS" }} + <link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" /> + {{ end }} {{ end }} <script type="text/javascript" src="{{ .Site.BaseURL }}/js/bundle.js"></script> {{ partial "head_custom.html" . }} diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 5707fbe..9f7e839 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -13,7 +13,7 @@ </li> {{ else }} <li class="p-menu__listitem"> - <a href="{{ .URL }}"> + <a href="{{ .Permalink }}"> {{- .Name -}} </a> </li> |