diff options
author | Leonardo Faria <leonardofaria@gmail.com> | 2020-06-23 20:36:16 +0300 |
---|---|---|
committer | Leonardo Faria <leonardofaria@gmail.com> | 2020-06-23 20:36:16 +0300 |
commit | 8ac9e9d19669b2a7837e452af66ada0983567e20 (patch) | |
tree | 0e10f52e70d9d80f25d3f4fcd6faa7fdae45740a | |
parent | 6f277b30f24851c23be99657ced32ae1ecf5304a (diff) |
Fix RSS link
-rw-r--r-- | layouts/partials/nav-social-links.html | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/layouts/partials/nav-social-links.html b/layouts/partials/nav-social-links.html index 326982b..43f5373 100644 --- a/layouts/partials/nav-social-links.html +++ b/layouts/partials/nav-social-links.html @@ -38,12 +38,24 @@ </a> </li> {{ end }} - <li> - <a class="block p-2 opacity-75 hover:opacity-100 transition duration-300 ease-in-out" title="Feed" href="{{ with .OutputFormats.Get "RSS" }} {{ .RelPermalink }} {{ end }}"> - <svg class="fill-current w-5 h-5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> - <title>RSS</title> - <path d="M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24h-4.801zM3.291 17.415c1.814 0 3.293 1.479 3.293 3.295 0 1.813-1.485 3.29-3.301 3.29C1.47 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295zM15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91z"/> - </svg> - </a> - </li> + {{ with .Site.Params.rss }} + <li> + <a class="block p-2 opacity-75 hover:opacity-100 transition duration-300 ease-in-out" title="Feed" href="{{ . }}"> + <svg class="fill-current w-5 h-5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <title>RSS</title> + <path d="M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24h-4.801zM3.291 17.415c1.814 0 3.293 1.479 3.293 3.295 0 1.813-1.485 3.29-3.301 3.29C1.47 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295zM15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91z"/> + </svg> + </a> + </li> + {{ else }} + <li> + <a class="block p-2 opacity-75 hover:opacity-100 transition duration-300 ease-in-out" title="Feed" href="/index.xml"> + <svg class="fill-current w-5 h-5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <title>RSS</title> + <path + d="M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24h-4.801zM3.291 17.415c1.814 0 3.293 1.479 3.293 3.295 0 1.813-1.485 3.29-3.301 3.29C1.47 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295zM15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91z" /> + </svg> + </a> + </li> + {{ end }} </ul> |