diff options
author | syui <syui@users.noreply.github.com> | 2019-05-21 03:08:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 03:08:18 +0300 |
commit | aa866518d9cd472f118ec8ca5231460a3704fede (patch) | |
tree | e2f74e17360736b23de1b0f0e1069362ee661b40 | |
parent | 5cad6770b61d846d75cd0b769597a66a4374e5f9 (diff) | |
parent | 16e8b538bb7aa5349cf3cb37d19f7bd2471a6604 (diff) |
Merge pull request #14 from FloMiau/depr
fix deprecation warnings and change particles-js
-rw-r--r-- | layouts/404.html | 4 | ||||
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/header.html | 21 | ||||
-rw-r--r-- | layouts/partials/navigation.html | 2 |
7 files changed, 17 insertions, 18 deletions
diff --git a/layouts/404.html b/layouts/404.html index 9b843c6..7b44e9e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -16,7 +16,7 @@ {{ if .Site.Params.RSSLink}} <a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a> {{else}} - <a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a> + <a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a> {{end}} {{end}} </nav> @@ -49,4 +49,4 @@ <p>Please head back <a href="/">home</a>.</p> </article> -{{ partial "footer.html" . }}
\ No newline at end of file +{{ partial "footer.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4c73228..e9e2e61 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -18,7 +18,7 @@ {{ if .Site.Params.RSSLink}} <a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a> {{else}} - <a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a> + <a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a> {{end}} {{end}} </nav> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 82ab1e7..78a8030 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,7 +14,7 @@ {{ if .Site.Params.RSSLink}} <a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a> {{else}} - <a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a> + <a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a> {{end}} {{end}} --> diff --git a/layouts/index.html b/layouts/index.html index e6c3ce2..e33de31 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -19,7 +19,7 @@ {{ if .Site.Params.RSSLink}} <a class="menu-button icon-feed" href="{{.Site.Params.RSSLink }}"> Subscribe</a> {{else}} - <a class="menu-button icon-feed" href="{{ .RSSLink }}"> Subscribe</a> + <a class="menu-button icon-feed" href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"> Subscribe</a> {{end}} {{end}} --> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e526264..d094eb5 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -8,6 +8,8 @@ <script type="text/javascript" src="{{.Site.BaseURL}}js/jquery.js"></script> <script type="text/javascript" src="{{.Site.BaseURL}}js/jquery.fitvids.js"></script> <script type="text/javascript" src="{{.Site.BaseURL}}js/index.js"></script> + <script src="{{ .Site.BaseURL }}js/particles.min.js"></script> + <script src="{{ .Site.BaseURL }}js/particles.js"></script> </body> </html> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 8475157..15ad7eb 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,7 +5,7 @@ <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta property="og:title" content="{{ if ne .URL "/" }} {{ .Title }} · {{ end }} {{ .Site.Title }}" /> + <meta property="og:title" content="{{ if ne .RelPermalink "/" }} {{ .Title }} · {{ end }} {{ .Site.Title }}" /> <meta property="og:site_name" content="{{ .Site.Title }}" /> <meta property="og:url" content="{{ .Permalink }}" /> @@ -22,7 +22,7 @@ {{ end }} <title> - {{ if ne .URL "/" }} {{ .Title }} · {{ end }} {{ .Site.Title }} + {{ if ne .RelPermalink "/" }} {{ .Title }} · {{ end }} {{ .Site.Title }} </title> <meta name="description" content="{{ .Site.Params.description }}" /> @@ -37,17 +37,17 @@ <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400|Inconsolata" /> - {{ if .Site.Params.RSSLink}} - <link href="{{.Site.Params.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> + {{ if .Site.Params.RSSLink }} + <link href="{{ .Site.Params.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> {{else}} - {{ if ne .URL "/" }} + {{ if ne .RelPermalink "/" }} <link href="{{ .Site.BaseURL }}index.xml" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> {{ end }} {{if .IsNode}} - <link href="{{.RSSLink}}" rel="alternate" type="application/rss+xml" title="{{ if ne .URL "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}" /> + <link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ if ne .RelPermalink "/" }}{{ .Title }} · {{ end }}{{ .Site.Title }}" /> {{end}} {{end}} - {{.Hugo.Generator}} + {{hugo.Generator}} <link rel="canonical" href="{{ .Permalink }}" /> @@ -62,13 +62,10 @@ ga('send', 'pageview'); </script> - {{end}} -<div id="particles-js"></div> -<script src="{{ .Site.BaseURL }}js/particles.min.js"></script> -<script src="{{ .Site.BaseURL }}js/particles.js"></script> + {{end}} </head> <body class="nav-closed"> - +<div id="particles-js"></div> {{ partial "navigation.html" . }} <div class="site-wrapper"> diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html index ab88e73..57df13d 100644 --- a/layouts/partials/navigation.html +++ b/layouts/partials/navigation.html @@ -17,7 +17,7 @@ {{ if .Site.Params.RSSLink}} <a class="subscribe-button icon-feed" href="{{.Site.Params.RSSLink }}">Subscribe</a> </div> {{else}} - <a class="subscribe-button icon-feed" href="{{if .IsNode}}{{.RSSLink}}{{else}}{{ .Site.BaseURL }}index.xml{{end}}">Subscribe</a> + <a class="subscribe-button icon-feed" href="{{if .IsNode}}{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}{{else}}{{ .Site.BaseURL }}index.xml{{end}}">Subscribe</a> {{end}} </div> <span class="nav-cover"></span> |