Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsiya <parsiya@gmail.com>2020-07-26 09:58:27 +0300
committerparsiya <parsiya@gmail.com>2020-07-26 09:58:27 +0300
commit425ed89345066986c434a65a9b097e69430cb8a2 (patch)
tree75c0167195e2a16b3180948605daa8a1e8b16214
parent5bce87e3c4ade3a00dd1b3bb8b9f64affe4c7fb8 (diff)
add noopener noreferrer to links, fixes #61issue61
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/navigation.html6
-rw-r--r--layouts/partials/sidebar.html28
3 files changed, 18 insertions, 18 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 48aa5c5..5aa5143 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,6 +1,6 @@
<footer role="contentinfo">
<p>Copyright &copy; {{ now.Format "2006" }} {{ .Site.Params.author }} - <a href="{{ "/license/" | absURL }}">License</a> -
- <span class="credit">Powered by <a target="_blank" href="https://gohugo.io">Hugo</a> and <a target="_blank" href="https://github.com/parsiya/hugo-octopress/">Hugo-Octopress</a> theme.
+ <span class="credit">Powered by <a target="_blank" href="https://gohugo.io" rel="noopener noreferrer">Hugo</a> and <a target="_blank" href="https://github.com/parsiya/hugo-octopress/" rel="noopener noreferrer">Hugo-Octopress</a> theme.
</p>
</footer>
diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html
index 9f9860d..50c9ced 100644
--- a/layouts/partials/navigation.html
+++ b/layouts/partials/navigation.html
@@ -16,7 +16,7 @@
{{ if eq .URL "/" }}
<li><a href="{{ .URL | absURL }}" title="{{ .Name }}">{{ .Name }}</a></li>
{{ else }}
- <li><a href="{{ .URL | absURL }}" title="{{ .Name }}" {{ if eq $.Site.Params.navigationNewWindow true }} target="_blank" {{ end }}>{{ .Name }}</a></li>
+ <li><a href="{{ .URL | absURL }}" title="{{ .Name }}" {{ if eq $.Site.Params.navigationNewWindow true }} target="_blank" {{ end }} rel="noopener noreferrer">{{ .Name }}</a></li>
{{ end }}
{{ end }}
</ul>
@@ -24,7 +24,7 @@
<ul class="subscription">
{{ if or .Site.Params.rss .Site.Params.textrss }}
{{ if .Site.Params.rss }}
- <a href="{{ "/index.xml" | absURL }}" target="_blank" type="application/rss+xml" title="RSS"><i class="fa fa-rss-square fa-lg"></i></a>
+ <a href="{{ "/index.xml" | absURL }}" target="_blank" type="application/rss+xml" title="RSS" rel="noopener noreferrer"><i class="fa fa-rss-square fa-lg"></i></a>
{{ else }}
<li><a href="/index.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
{{ end }}
@@ -32,7 +32,7 @@
</ul>
{{ with .Site.Params.searchEngineURL }}
- <form action="{{ . }}" method="get" target="_blank">
+ <form action="{{ . }}" method="get" target="_blank" rel="noopener noreferrer">
<fieldset role="search">
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
<input type="hidden" name="q" value="site:{{ "/" | absURL }}" />
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 4e708b7..0f1ca35 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -23,22 +23,22 @@
<!-- Sidebar social network icons -->
<ul class="sidebar-nav">
<li class="sidebar-nav-item">
- {{ with .Site.Params.github }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-github fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.bitbucket }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitbucket fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.gitlab }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-gitlab fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.twitter }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-twitter fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.github }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-github fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.bitbucket }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitbucket fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.gitlab }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-gitlab fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.twitter }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-twitter fa-3x"></i></a>{{ end }}
{{ if not .Site.Params.fontAwesome }}
- {{ with .Site.Params.keybase }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-keybase fa-3x"></i></a>{{ end }} <!-- added keybase -->
+ {{ with .Site.Params.keybase }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-keybase fa-3x"></i></a>{{ end }} <!-- added keybase -->
{{ else }}
- {{ with .Site.Params.keybase }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-key fa-3x"></i></a>{{ end }} <!-- added keybase -->
+ {{ with .Site.Params.keybase }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-key fa-3x"></i></a>{{ end }} <!-- added keybase -->
{{ end }}
- {{ with .Site.Params.linkedin }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-linkedin fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.stackOverflow }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-stack-overflow fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.googleplus }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-google-plus fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.facebook }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-facebook fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.youtube }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-youtube fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.instagram }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-instagram fa-3x"></i></a>{{ end }}
- {{ with .Site.Params.bitcoin }}<a target="_blank" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitcoin fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.linkedin }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-linkedin fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.stackOverflow }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-stack-overflow fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.googleplus }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-google-plus fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.facebook }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-facebook fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.youtube }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-youtube fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.instagram }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-instagram fa-3x"></i></a>{{ end }}
+ {{ with .Site.Params.bitcoin }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitcoin fa-3x"></i></a>{{ end }}
<!-- Uncomment to add the RSS icon -->
<!-- {{ if .Site.Params.rss }}<a href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="RSS"><i class="fa fa-rss-square fa-3x"></i></a>{{ end }} -->
@@ -57,7 +57,7 @@
{{ end }}
{{ range $.Site.Menus.sidebar }}
<li>
- <a href="{{ .URL | absURL }}" title="{{ .Name }}" {{ if eq $.Site.Params.sidebarNewWindow true }} target="_blank" {{ end }}>{{ .Name }}</a>
+ <a href="{{ .URL | absURL }}" title="{{ .Name }}" {{ if eq $.Site.Params.sidebarNewWindow true }} target="_blank" rel="noopener noreferrer" {{ end }}>{{ .Name }}</a>
</li>
{{ end }}
</section>