Skip to content

Commit e912ff4

Browse files
authored
Merge pull request #65 from googollee/master
Custom the default page link and add a RSS link in the social profile.
2 parents 0b50172 + 021c3bc commit e912ff4

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

exampleSite/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ disqusShortname = "yourdiscussshortname"
6060
keywords = "" # site keywords
6161

6262
license= 'Released under <a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
63+
defaultPage = "/posts/"
6364

6465
[params.gravatar]
6566
#email = "example@gmail.com" #uncomment and insert your email address to use gravatar

layouts/partials/home_post.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
{{ with .Site.Params.avatar}}
66
{{ $avatar := .}}
77
<div class="avatar">
8-
<a href="/posts/"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a>
8+
<a href="{{ .Site.Params.DefaultPage }}"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a>
99
</div>
1010
{{ end }}
1111
{{ if or .Params.gravatar.Email (and .Site.Params.gravatar.Email (ne .Params.gravatar.Email false)) }}
1212
<div class="avatar">
13-
<a href="/posts/"> <img
13+
<a href="{{ .Site.Params.DefaultPage }}"> <img
1414
src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp"
1515
alt="gravatar"> </a>
1616
</div>
@@ -71,4 +71,4 @@ <h1 class="post-title" itemprop="name headline"><a href="{{ .Permalink }}">{{ .T
7171
{{ end }}
7272

7373
{{ partial "paginator.html" . }}
74-
</div>
74+
</div>

layouts/partials/home_profile.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
{{ with .Site.Params.avatar}}
44
{{ $avatar := .}}
55
<div class="avatar">
6-
<a href="/posts/"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a>
6+
<a href="{{ .Site.Params.DefaultPage }}"> <img src="{{ (printf "%s%s" $cdn_url $avatar)}}"> </a>
77
</div>
88
{{ end }}
99
{{ if or .Params.gravatar.Email (and .Site.Params.gravatar.Email (ne .Params.gravatar.Email false)) }}
1010
<div class="avatar">
11-
<a href="/posts/"> <img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" alt="gravatar"> </a>
11+
<a href="{{ .Site.Params.DefaultPage }}"> <img src="https://www.gravatar.com/avatar/{{ md5 .Site.Params.gravatar.email }}?s=240&d=mp" alt="gravatar"> </a>
1212
</div>
1313
{{ end }}
1414
{{ with .Site.Params.subtitle}}
@@ -20,4 +20,4 @@ <h2 class="description">
2020
{{ partial "social.html" . }}
2121

2222
</div>
23-
</div>
23+
</div>

layouts/partials/social.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<a href="{{ .Site.Params.DefaultPage }}/index.xml" target="_blank" rel="me noopener noreffer" target="_blank"><svg class="iconfont" style="width: 1em;height: 1em;vertical-align: text-bottom;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4080"><path d="M213.333333 128h597.333334a85.333333 85.333333 0 0 1 85.333333 85.333333v597.333334a85.333333 85.333333 0 0 1-85.333333 85.333333H213.333333a85.333333 85.333333 0 0 1-85.333333-85.333333V213.333333a85.333333 85.333333 0 0 1 85.333333-85.333333m106.666667 512A64 64 0 0 0 256 704 64 64 0 0 0 320 768 64 64 0 0 0 384 704 64 64 0 0 0 320 640M256 426.666667v85.333333a256 256 0 0 1 256 256h85.333333a341.333333 341.333333 0 0 0-341.333333-341.333333m0-170.666667v85.333333a426.666667 426.666667 0 0 1 426.666667 426.666667h85.333333A512 512 0 0 0 256 256z" fill="" p-id="4081"></path></svg></a>
12
{{ with .Site.Params.Social.Github }}
23
<a href="https://github.com/{{.}}" target="_blank" rel="me noopener noreffer" target="_blank"><i class="iconfont icon-github"></i></a>
34
{{ end }}

0 commit comments

Comments
 (0)