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

github.com/dplesca/purehugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDragos Plesca <dragos.plesca@gmail.com>2017-12-04 11:25:18 +0300
committerGitHub <noreply@github.com>2017-12-04 11:25:18 +0300
commit83f298c5ef828d707e03500fc42f19a9f83cb35f (patch)
treee93f6e96fa909560d64c62cba95da18afd6ea9ee
parent06811c8dd52901e801e514eac94eeec129596418 (diff)
parenta51dd08eafa3d663a16c308c852de979c5cb8d30 (diff)
Merge pull request #21 from positivejam/sidebar-stackoverflow-link
Add optional Stack Overflow link to sidebar via site params
-rw-r--r--README.md3
-rw-r--r--layouts/partials/sidebar.html5
2 files changed, 7 insertions, 1 deletions
diff --git a/README.md b/README.md
index 7af01c5..c7c0a75 100644
--- a/README.md
+++ b/README.md
@@ -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>