Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove useDescriptionAsTitle
  • Loading branch information
nodejh committed Apr 18, 2017
1 parent 7bf1ce5 commit 2ad2e71
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 21 deletions.
3 changes: 0 additions & 3 deletions exampleSite/config.toml
Expand Up @@ -28,9 +28,6 @@ hasCJKLanguage = true

enableGithubIssuesTips = false

# Use description as title in single page, posts page and tags page.
useDescriptionAsTitle = false

# Enable googleAnalytics
enableGoogleAnalytics = false

Expand Down
9 changes: 3 additions & 6 deletions layouts/_default/list.html
Expand Up @@ -12,14 +12,11 @@ <h3>{{ .Key }}</h3>
<div class="post-item">
<div class="post-time">{{ .Date.Format "Jan 2" }}</div>
<a href="{{ .Permalink }}" class="post-link">
{{ if .Site.Params.useDescriptionAsTitle }}
{{ .Description }}
{{ else }}
{{ .Title }}
{{ end }}
{{ .Title }}
</a>
</div>
{{ end }} </ul>
{{ end }}
</ul>
</div>
{{ end }}
{{ partial "footer.html" . }}
Expand Down
6 changes: 1 addition & 5 deletions layouts/_default/single.html
Expand Up @@ -6,11 +6,7 @@
<article class="post">
<header>
<h1>
{{ if .Site.Params.useDescriptionAsTitle }}
{{ .Description }}
{{ else }}
{{ .Title }}
{{ end }}
{{ .Title }}
</h1>
<h2 class="headline">
{{ .Date.Format "Jan 2, 2006 15:04" }}
Expand Down
7 changes: 1 addition & 6 deletions layouts/partials/post-list.html
Expand Up @@ -5,12 +5,7 @@
<li>
<a href='{{ .Permalink }}'><aside class="dates">{{ .Date.Format "Jan 2" }}</aside></a>
<a href='{{ .Permalink }}'>
{{ if .Site.Params.useDescriptionAsTitle }}
{{ .Description }} <h2>{{ .Title | markdownify }}</h2>
{{ else }}
{{ .Title }} <h2>{{ .Description | markdownify }}</h2>
{{ end }}

{{ .Title }} <h2>{{ .Description | markdownify }}</h2>
</a>
</li>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.css
Expand Up @@ -540,7 +540,7 @@ Post List

#footer {
/*box-shadow: inset 0 1px 0 #eee;*/
padding: 40px 0 0 0;
/*padding: 40px 0 0 0;*/
margin-top: 100px;
}

Expand Down

0 comments on commit 2ad2e71

Please sign in to comment.