Add automatic anchor symbols using anchorjs

This commit is contained in:
Philipp Oppermann
2016-05-02 17:26:19 +02:00
parent e30f50019d
commit 5ec5a5828d
4 changed files with 8 additions and 0 deletions

View File

@@ -6,4 +6,5 @@
{{ .Content }} {{ .Content }}
</article> </article>
{{ partial "anchorjs.html" . }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@@ -28,6 +28,8 @@
<link href="/atom.xml" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="/atom.xml" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }} {{ end }}
<!-- JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
{{ partial "analytics.html" . }} {{ partial "analytics.html" . }}
<!-- redirect from phil-opp.github.io/blog_os --> <!-- redirect from phil-opp.github.io/blog_os -->

View File

@@ -24,4 +24,5 @@
<hr> <hr>
{{ partial "disqus.html" . }} {{ partial "disqus.html" . }}
{{ partial "anchorjs.html" . }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@@ -102,3 +102,7 @@ footer.footer {
sup, sub { sup, sub {
line-height: 0; line-height: 0;
} }
a.anchorjs-link:hover {
text-decoration: none;
}