mtn / cocoa-eh-hugo-theme

A enhanced version of Cocoa. Clean, fast, and responsive theme with cool typography.
https://themes.gohugo.io/theme/cocoa-eh-hugo-theme/
MIT License
224 stars 111 forks source link

Feature request: add ORCiD social icon / link #111

Closed alexpghayes closed 6 years ago

alexpghayes commented 6 years ago

Alternatively, as someone very new to web stuff, could you point me towards how to get started on this on my own?

alexpghayes commented 6 years ago

i.e. I'd like to link to https://orcid.org/0000-0002-4985-5160 and imagine those in academia might be similarly interested

mtn commented 6 years ago

Thanks for the issue! I'm more than happy to point you towards the right place. Take a look at in layouts/partials/footer.html:

        {{ if .Site.Params.gitlab }}
            <a href="https://gitlab.com/{{ .Site.Params.gitlab }}" rel=me target="_blank">
                <img class="icon" src="{{ .Site.BaseURL }}img/gitlab.svg" alt="gitlab" />
            </a>
        {{ end }}

        {{ if .Site.Params.instagram }}
            <a href="https://www.instagram.com/{{ .Site.Params.instagram }}" rel=me target="_blank">
                <img class="icon" src="{{ .Site.BaseURL }}img/instagram.svg" alt="instagram" />
            </a>
        {{ end }}

        {{ if .Site.Params.facebook }}
            <a href="https://facebook.com/{{ .Site.Params.facebook }}" rel=me target="_blank">
                <img class="icon" src="{{ .Site.BaseURL }}img/facebook.svg" alt="facebook" />
            </a>
        {{ end }}

        {{ if .Site.Params.github }}
            <a href="https://github.com/{{ .Site.Params.github }}" rel=me target="_blank">
                <img class="icon" src="{{ .Site.BaseURL }}img/github.svg" alt="github" />
            </a>
        {{ end }}

Basically, you want to add a line just like that, where .Site.Params.X refers to the parameter X in the config file. You'll also want to add an svg for the little logo which is stored in static/img/... and referred to just like in the above examples.

Let me know if you have any questions!

alexpghayes commented 6 years ago

Thanks! That was a breeze! Appreciate the work you've done pulling together such a nice theme.