diff options
author | Dragos Plesca <dragos.plesca@gmail.com> | 2017-12-04 11:25:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 11:25:18 +0300 |
commit | 83f298c5ef828d707e03500fc42f19a9f83cb35f (patch) | |
tree | e93f6e96fa909560d64c62cba95da18afd6ea9ee | |
parent | 06811c8dd52901e801e514eac94eeec129596418 (diff) | |
parent | a51dd08eafa3d663a16c308c852de979c5cb8d30 (diff) |
Merge pull request #21 from positivejam/sidebar-stackoverflow-link
Add optional Stack Overflow link to sidebar via site params
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 5 |
2 files changed, 7 insertions, 1 deletions
@@ -26,11 +26,12 @@ disqusShortname = "xxxx" [params] twitterName = "dragos_plesca" githubName = "dplesca" + stackOverflowId = "#######" description = "Demo site for a hugo theme" google_analytics = "UA-xxxxxx-xx" ``` -Notice the configuration necessary for disqus comments (just setting the disqusShortname), the twitter and github handlers (for the site sidebar), the site description and enabling Google Analytics reporting. +Notice the configuration necessary for disqus comments (just setting the disqusShortname); the twitter, github, and stack overflow handlers (for the site sidebar); the site description and enabling Google Analytics reporting. ### Syntax Highlighting diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 0d123ce..01b1bb2 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -17,6 +17,11 @@ <a class="pure-button" href="https://github.com/{{ . }} "><i class="fa fa-github-alt"></i> github</a> </li> {{ end }} + {{ with .Site.Params.stackOverflowId }} + <li class="nav-item"> + <a class="pure-button" href="https://stackoverflow.com/u/{{ . }} "><i class="fa fa-stack-overflow"></i> Stack Overflow</a> + </li> + {{ end }} <li class="nav-item"> <a class="pure-button" href="{{ .Site.BaseURL }}/index.xml"><i class="fa fa-rss"></i> rss</a> </li> |