diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 398a473..cd0d4d0 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -27,8 +27,9 @@ params: wordcount: true readingtime: true - # used for "View history" - historyURL: https://github.com/BBaoVanC/bobatheme/commits/master + # used for "View source" + gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master + gitFileIcon: github-circle privacy: googleAnalytics: diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html index b539638..994f0df 100644 --- a/layouts/partials/post-metadata.html +++ b/layouts/partials/post-metadata.html @@ -60,11 +60,16 @@ {{ end }} - {{ with .Site.Params.historyURL }} + {{ with .Site.Params.gitFileURL }} - {{ partial "icon.html" "history" }} + {{ with $.Site.Params.gitFileIcon }} + {{ partial "icon.html" . }} + {{ else }} + {{ partial "icon.html" "file" }} + {{ end }} + - View history + View source {{ end }}