-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from chollinger93/feat/no-code-in-wordcount
Do not count code blocks in WordCount
- Loading branch information
Showing
3 changed files
with
78 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,96 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
{{ partial "header.html" . }} | ||
|
||
<body> | ||
<div class="container wrapper"> | ||
{{ partial "head.html" . }} | ||
|
||
<div class="post"> | ||
<div class="post-header"> | ||
{{ if ne .Date.Year 1 }} | ||
<div class="meta"> | ||
<div class="date"> | ||
<span class="day">{{ dateFormat "02" .Date }}</span> | ||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" .Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | ||
</div> | ||
<div class="meta"> | ||
<div class="date"> | ||
<span class="day">{{ dateFormat "02" .Date }}</span> | ||
<span class="rest">{{ if $.Site.Data.month }}{{ index $.Site.Data.month (printf "%d" | ||
.Date.Month) }} {{ .Date.Year }}{{ else }}{{ dateFormat "Jan 2006" .Date }}{{ end }}</span> | ||
</div> | ||
</div> | ||
{{ end }} | ||
<div class="matter"> | ||
<h1 class="title">{{ .Title }}</h1> | ||
</div> | ||
</div> | ||
|
||
|
||
{{ if and (gt .WordCount 400 ) (.Site.Params.toc) (ne .Params.toc false) }} | ||
<aside class="toc"> | ||
<header> | ||
<h2>Contents</h2> | ||
<h2>Contents</h2> | ||
</header> | ||
{{.TableOfContents}} | ||
</aside> | ||
{{ end }} | ||
|
||
<div class="markdown"> | ||
{{ .Content }} | ||
</div> | ||
|
||
<div class="tags"> | ||
{{ if ne .Type "page" }} | ||
{{ if gt .Params.tags 0 }} | ||
<ul class="flat"> | ||
{{ range .Params.tags }} | ||
<li class="tag-li"><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li> | ||
{{ end }} | ||
</ul> | ||
{{ if gt .Params.tags 0 }} | ||
<ul class="flat"> | ||
{{ range .Params.tags }} | ||
<li class="tag-li"><a href="{{ " /tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li> | ||
{{ end }} | ||
</ul> | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
|
||
{{ if isset .Site.Params "github" }} | ||
<div class="back"> | ||
<a href="{{ .Site.Params.github }}/blob/master/content/{{ .File.Path }}" title="github"><i data-feather="github"></i> Edit this on GitHub</a> | ||
<a href="{{ .Site.Params.github }}/blob/master/content/{{ .File.Path }}" title="github"><i | ||
data-feather="github"></i> Edit this on GitHub</a> | ||
</div> | ||
{{ end }} | ||
|
||
<div class="back"> | ||
<a href="{{ $.Site.BaseURL }}"><span aria-hidden="true">← Back</span></a> | ||
</div> | ||
|
||
|
||
<div class="back"> | ||
{{ if isset .Site.Params "footers" }} | ||
{{ if ne .Type "page" }} | ||
Next time, we'll talk about <i>"{{ range .Site.Params.footers | shuffle | first 1 }}{{ . }}"</i>{{ end }} | ||
{{ end }} | ||
{{ if ne .Type "page" }} | ||
Next time, we'll talk about <i>"{{ range .Site.Params.footers | shuffle | first 1 }}{{ . }}"</i>{{ end | ||
}} | ||
{{ end }} | ||
{{ end }} | ||
</div> | ||
|
||
{{- if .Site.DisqusShortname -}} | ||
{{- $.Scratch.Set "isDisqus" true -}} | ||
|
||
{{- if and (isset .Params "type") (in .Site.Params.disableDisqusTypes .Params.type) -}} | ||
{{- $.Scratch.Set "isDisqus" false -}} | ||
{{- $.Scratch.Set "isDisqus" false -}} | ||
{{- end -}} | ||
|
||
{{- if and (isset .Params "disqus") (eq .Params.disqus false) -}} | ||
{{- $.Scratch.Set "isDisqus" false -}} | ||
{{- $.Scratch.Set "isDisqus" false -}} | ||
{{- else if and (isset .Params "disqus") (eq .Params.disqus true) -}} | ||
{{- $.Scratch.Set "isDisqus" true -}} | ||
{{- $.Scratch.Set "isDisqus" true -}} | ||
{{- end -}} | ||
|
||
{{- if eq ($.Scratch.Get "isDisqus") true -}} | ||
{{- partial "disqus.html" . -}} | ||
{{- end -}} | ||
{{- end -}} | ||
</div> | ||
|
||
</div> | ||
|
||
{{ partial "footer.html" . }} | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters