Merge pull request #66 from kentnek/kent-fix-urls

Fix relative icon issue + add title
This commit is contained in:
Jake Wiesler 2020-07-04 14:20:29 -04:00 committed by GitHub
commit 0b99d0e779
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ themesDir = "../../"
theme = "hugo-theme-codex"
# Override these settings with your own
title = "codex"
languageCode = "en-us"
baseURL = "https://example.org/"
copyright = "© {year}"

View File

@ -6,7 +6,7 @@
{{ $icon := anchorize . }}
{{ if isset $currentPage.Site.Params $icon }}
<a class="social-icons__icon" title="{{ . }}"
style="background-image: url(/images/social/{{ $icon }}.svg)"
style="background-image: url('{{print "images/social/" $icon ".svg" | absURL}}')"
href="{{ index $currentPage.Site.Params $icon }}"
target="_blank" rel="noopener">
</a>