Skip to content

Commit 90a8c7d

Browse files
committed
removes all space consuming symbols in templates
1 parent c5ab13b commit 90a8c7d

26 files changed

+126
-126
lines changed

layouts/404.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{{ define "header" -}}
1+
{{ define "header" }}
22
{{ partial "header.html" . }}
3-
{{- end }}
3+
{{ end }}
44

5-
{{ define "content" -}}
5+
{{ define "content" }}
66
<h1>404: Page not found</h1>
77
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ .Site.BaseURL }}">Head back home</a> to try finding it again.</p>
8-
{{- end }}
8+
{{ end }}
99

10-
{{ define "footer" -}}
11-
{{- end }}
10+
{{ define "footer" }}
11+
{{ end }}

layouts/_default/baseof.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE html>
22
<html lang="{{ .Site.LanguageCode }}">
3-
{{ block "header" . -}}{{- end }}
3+
{{ block "header" . }}{{ end }}
44
<body {{ if .Site.Params.themeColor }}class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{ end }}"{{end}}>
5-
{{ partial "sidebar.html" . -}}
5+
{{ partial "sidebar.html" . }}
66
<div class="content container">
7-
{{ block "content" . -}}{{- end }}
7+
{{ block "content" . }}{{ end }}
88
</div>
9-
{{ block "footer" . -}}{{- end }}
9+
{{ block "footer" . }}{{ end }}
1010
</body>
1111
</html>

layouts/_default/list.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{{ define "header" -}}
1+
{{ define "header" }}
22
{{ partial "header.html" . }}
3-
{{- end -}}
3+
{{ end }}
44

5-
{{ define "content" -}}
5+
{{ define "content" }}
66
{{ partial "page-list/content.html" . }}
7-
{{- end -}}
7+
{{ end }}
88

9-
{{ define "footer" -}}
9+
{{ define "footer" }}
1010
{{ partial "page-list/footer.html" . }}
11-
{{- end }}
11+
{{ end }}

layouts/_default/single.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{{ define "header" -}}
1+
{{ define "header" }}
22
{{ partial "page-single/variables-init.html" . }}
33
{{ partial "header.html" . }}
4-
{{- end -}}
4+
{{ end }}
55

6-
{{ define "content" -}}
6+
{{ define "content" }}
77
{{ partial "page-single/content.html" . }}
8-
{{- end -}}
8+
{{ end }}
99

10-
{{ define "footer" -}}
10+
{{ define "footer" }}
1111
{{ partial "page-single/footer.html" . }}
1212
{{ partial "page-single/variables-deinit.html" . }}
13-
{{- end -}}
13+
{{ end }}

layouts/about/single.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{{- define "header" -}}
2-
{{- partial "header.html" . -}}
3-
{{- end -}}
1+
{{ define "header" }}
2+
{{ partial "header.html" . }}
3+
{{ end }}
44

5-
{{- define "content" -}}
5+
{{ define "content" }}
66
<div class="post">
77
<h1>{{ .Title }}</h1>
88
{{ .Content }}
99
</div>
10-
{{- end -}}
10+
{{ end }}
1111

12-
{{- define "footer" -}}
13-
{{- end -}}
12+
{{ define "footer" }}
13+
{{ end }}

layouts/index.html

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{{ define "header" -}}
1+
{{ define "header" }}
22
{{ partial "header.html" . }}
3-
{{- end }}
3+
{{ end }}
44

5-
{{ define "content" -}}
5+
{{ define "content" }}
66
<div class="post-list">
7-
{{ range (where .Data.Pages "Type" "not in" (slice "about" "portfolio")).GroupBy "Section" -}}
7+
{{ range (where .Data.Pages "Type" "not in" (slice "about" "portfolio")).GroupBy "Section" }}
88
{{ range .Pages }}
99
<div class="post-list__item">
1010
<span class="item__title--big">
@@ -14,21 +14,21 @@
1414
{{ .Date.Format (.Site.Params.dateformat | default "Jan 02, 2006") }}
1515
</span>
1616
{{ .Summary }}
17-
{{ if .Truncated -}}
17+
{{ if .Truncated }}
1818
<div class="read-more-link">
1919
<a href="{{ .RelPermalink }}">Read More…</a>
2020
</div>
21-
{{- end }}
21+
{{ end }}
2222
</div>
23-
{{- end -}}
24-
{{- end }}
23+
{{ end }}
24+
{{ end }}
2525
</div>
26-
{{- end }}
26+
{{ end }}
2727

28-
{{ define "footer" -}}
29-
{{ if .Site.GoogleAnalytics -}}
28+
{{ define "footer" }}
29+
{{ if .Site.GoogleAnalytics }}
3030
<!-- Google Analytics -->
31-
{{- template "_internal/google_analytics_async.html" . -}}
32-
{{- end }}
31+
{{ template "_internal/google_analytics_async.html" . }}
32+
{{ end }}
3333
{{ partial "footer/font-awesome-js.html" . }}
34-
{{- end }}
34+
{{ end }}

layouts/partials/header/feeds.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .RSSLink -}}
1+
{{ if .RSSLink }}
22
<!-- RSS -->
33
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
44
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />

layouts/partials/header/meta.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
{{ "<!-- Enable responsiveness on mobile devices -->" | safeHTML }}
55
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
66
{{ .Hugo.Generator }}
7-
{{- if .IsHome }}
8-
{{ $.Scratch.Set "theTitle" .Site.Title -}}
7+
{{ if .IsHome }}
8+
{{ $.Scratch.Set "theTitle" .Site.Title }}
99
{{else}}
1010
{{ $.Scratch.Add "theTitle" .Title}}
1111
{{ $.Scratch.Add "theTitle" " • "}}
1212
{{ $.Scratch.Add "theTitle" .Site.Title}}
13-
{{- end -}}
13+
{{ end }}
1414
<title>{{ $.Scratch.Get "theTitle" }}</title>
15-
{{ with .Site.Params.meta.description -}}<meta name="description" content="{{ . }}">{{- end }}
16-
{{ with .Site.Params.meta.keywords -}}<meta name="keywords" content="{{.}}">{{- end }}
15+
{{ with .Site.Params.meta.description }}<meta name="description" content="{{ . }}">{{ end }}
16+
{{ with .Site.Params.meta.keywords }}<meta name="keywords" content="{{.}}">{{ end }}
1717
{{ template "_internal/twitter_cards.html" . }}
1818
{{ template "_internal/opengraph.html" . }}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{{- if .Site.Params.highlightjs -}}
1+
{{ if .Site.Params.highlightjs }}
22
<!-- highlightjs -->
33
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
4-
{{- end -}}
5-
{{ if .Site.Params.PygmentsUseClasses -}}
4+
{{ end }}
5+
{{ if .Site.Params.PygmentsUseClasses }}
66
<!-- Pygments Syntax -->
77
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/syntax.min.css">
8-
{{- end }}
8+
{{ end }}

layouts/partials/highlight-js.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ if .Site.Params.highlightjs -}}
1+
{{ if .Site.Params.highlightjs }}
22
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
33
{{ with .Site.Params.highlightjslanguages }}
44
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
@@ -7,4 +7,4 @@
77
hljs.configure({languages: []});
88
hljs.initHighlightingOnLoad();
99
</script>
10-
{{- end }}
10+
{{ end }}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<span class="section__title">{{ .Title }}</span>
22
<ul class="posts">
3-
{{- with .Data.Pages -}}
3+
{{ with .Data.Pages }}
44
{{ partial "posts-list.html" . }}
5-
{{- end }}
5+
{{ end }}
66
</ul>
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{{ if .Site.GoogleAnalytics -}}
1+
{{ if .Site.GoogleAnalytics }}
22
<!-- Google Analytics -->
3-
{{- template "_internal/google_analytics_async.html" . -}}
4-
{{- end }}
3+
{{ template "_internal/google_analytics_async.html" . }}
4+
{{ end }}
55
{{ partial "footer/font-awesome-js.html" . }}

layouts/partials/page-single/content.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ <h1>{{ .Title }}</h1>
66
{{.}}
77
</span>
88
{{ end }}
9-
{{ partial "page-single/post-meta-top.html" . }}
9+
{{ partial "page-single/post-meta.html" . }}
1010
</header>
1111
<div class="post">
1212
{{ .Content }}
1313
</div>
14-
{{ partial "page-single/post-meta-bottom.html" . }}
14+
{{ partial "page-single/post-navigation.html" . }}
1515
{{ partial "page-single/post-related.html" . }}
16-
{{- partial "page-single/post-comment.html" . -}}
16+
{{ partial "page-single/post-comment.html" . }}
1717
</article>
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{{ if .Site.GoogleAnalytics -}}
1+
{{ if .Site.GoogleAnalytics }}
22
<!-- Google Analytics -->
3-
{{- template "_internal/google_analytics_async.html" . -}}
4-
{{- end }}
3+
{{ template "_internal/google_analytics_async.html" . }}
4+
{{ end }}
55
{{ partial "footer/font-awesome-js.html" . }}
66
{{ partial "highlight-js.html" . }}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{{- if ne .Params.showcomments false -}}
2-
{{ if .Site.DisqusShortname -}}
3-
{{- partial "page-single/comment/disqus.html" . -}}
4-
{{- else if .Site.Params.GraphCommentId -}}
5-
{{- partial "page-single/comment/graphcomment.html" . -}}
6-
{{- end -}}
7-
{{- end }}
1+
{{ if ne .Params.showcomments false }}
2+
{{ if .Site.DisqusShortname }}
3+
{{ partial "page-single/comment/disqus.html" . }}
4+
{{ else if .Site.Params.GraphCommentId }}
5+
{{ partial "page-single/comment/graphcomment.html" . }}
6+
{{ end }}
7+
{{ end }}
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{{ $enabledPostNavigation := .Site.Params.postNavigation | default true }}
22
{{ if $enabledPostNavigation }}
33
<div class="post--navigation post--navigation-single">
4-
{{ with .PrevInSection -}}
4+
{{ with .PrevInSection }}
55
<a href="{{ .RelPermalink }}" class="post--navigation-prev">
66
<i aria-hidden="true" class="fa fa-chevron-left"></i>
77
<span class="navigation-tittle">{{ .Title }}</span>
88
</a>
9-
{{- end }}
10-
{{ with .NextInSection -}}
9+
{{ end }}
10+
{{ with .NextInSection }}
1111
<a href="{{ .RelPermalink }}" class="post--navigation-next">
1212
<span class="navigation-tittle">{{ .Title }}</span>
1313
<i aria-hidden="true" class="fa fa-chevron-right"></i>
1414
</a>
15-
{{- end }}
15+
{{ end }}
1616
</div>
1717
{{ end }}

layouts/partials/page-single/post-related.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ if .Site.Params.relatedPosts }}
22
{{ $related := .Site.RegularPages.Related . | first 5 }}
3-
{{ with $related -}}
3+
{{ with $related }}
44
<div class="post__related">
55
<!-- related content -->
66
<h2>Related Articles</h2>
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{{ if .Site.GoogleAnalytics -}}
1+
{{ if .Site.GoogleAnalytics }}
22
<!-- Google Analytics -->
3-
{{- template "_internal/google_analytics_async.html" . -}}
4-
{{- end }}
3+
{{ template "_internal/google_analytics_async.html" . }}
4+
{{ end }}
55
{{ partial "footer/font-awesome-js.html" . }}

layouts/partials/sidebar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Sidebar -->
22
<div class="sidebar">
3-
<div class="container {{ with .Site.Params.sidebarSticky -}}sidebar-sticky{{- end }}">
3+
<div class="container {{ with .Site.Params.sidebarSticky }}sidebar-sticky{{ end }}">
44
<div class="sidebar-about">
55
<span class="site__title">
66
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>

layouts/partials/sidebar/menu.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<div>
22
<ul class="sidebar-nav">
33
{{ $currentPage := . }}
4-
{{- range .Site.Menus.main -}}
5-
{{ if .HasChildren -}}
4+
{{ range .Site.Menus.main }}
5+
{{ if .HasChildren }}
66
<li {{ if $currentPage.HasMenuCurrent "main" . }}class="active"{{ end }}>
77
<a href="#">{{ .Pre }}
88
<span>{{ .Name }}</span>
99
</a>
1010
<ul class="sidebar-nav">
11-
{{- range .Children -}}
11+
{{ range .Children }}
1212
<li {{ if $currentPage.IsMenuCurrent "main" . }}class="active"{{ end }}>
1313
<a href="{{ .URL }}">{{ .Name | title }}</a>
1414
</li>
15-
{{- end -}}
15+
{{ end }}
1616
</ul>
17-
{{- else -}} <!-- No children -->
17+
{{ else }} <!-- No children -->
1818
<li>
1919
<a href="{{.URL}}">{{ .Pre }}
2020
<span>{{ .Name | title }}</span>
2121
</a>
2222
</li>
23-
{{- end -}}
24-
{{- end }}
23+
{{ end }}
24+
{{ end }}
2525
</li>
2626
</ul>
2727
</div>

layouts/partials/sidebar/social.html

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
<section class="social">
2-
{{ with .Site.Params.social.twitter -}}
2+
{{ with .Site.Params.social.twitter }}
33
<a href="https://twitter.com/{{.}}"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a>
4-
{{- end }}
5-
{{ with .Site.Params.social.facebook -}}
4+
{{ end }}
5+
{{ with .Site.Params.social.facebook }}
66
&nbsp;<a href="https://facebook.com/{{.}}"><i class="fab fa-facebook-f"></i></a>
7-
{{- end }}
8-
{{ with .Site.Params.social.github -}}
7+
{{ end }}
8+
{{ with .Site.Params.social.github }}
99
&nbsp;<a href="https://github.com/{{.}}"><i class="fab fa-github fa-lg" aria-hidden="true"></i></a>
10-
{{- end }}
11-
{{ with .Site.Params.social.bitbucket -}}
10+
{{ end }}
11+
{{ with .Site.Params.social.bitbucket }}
1212
&nbsp;<a href="https://bitbucket.org/{{.}}"><i class="fab fa-bitbucket fa-lg" aria-hidden="true"></i></a>
13-
{{- end }}
14-
{{ with .Site.Params.social.gitlab -}}
13+
{{ end }}
14+
{{ with .Site.Params.social.gitlab }}
1515
&nbsp;<a href="https://gitlab.com/{{.}}"><i class="fab fa-gitlab fa-lg" aria-hidden="true"></i></a>
16-
{{- end }}
17-
{{ with .Site.Params.social.instagram -}}
16+
{{ end }}
17+
{{ with .Site.Params.social.instagram }}
1818
&nbsp;<a href="https://instagram.com/{{.}}"><i class="fab fa-instagram fa-lg" aria-hidden="true"></i></a>
19-
{{- end }}
20-
{{ with .Site.Params.social.linkedin -}}
19+
{{ end }}
20+
{{ with .Site.Params.social.linkedin }}
2121
&nbsp;<a href="https://linkedin.com/in/{{.}}"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a>
22-
{{- end }}
23-
{{ with .Site.Params.social.stackoverflow -}}
22+
{{ end }}
23+
{{ with .Site.Params.social.stackoverflow }}
2424
&nbsp;<a href="https://stackoverflow.com/users/{{.}}"><i class="fab fa-stack-overflow fa-lg" aria-hidden="true"></i></a>
25-
{{- end }}
25+
{{ end }}
2626
{{ with .Site.Params.social.medium}}
2727
&nbsp;<a href="https://medium.com/@{{.}}"><i class="fab fa-medium fa-lg" aria-hidden="true"></i></a>
28-
{{- end }}
29-
{{ with .Site.Params.social.xing -}}
28+
{{ end }}
29+
{{ with .Site.Params.social.xing }}
3030
&nbsp;<a href="https://www.xing.com/profile/{{.}}"><i class="fab fa-xing fa-lg" aria-hidden="true"></i></a>
31-
{{- end }}
32-
{{ with .Site.Params.social.keybase -}}
31+
{{ end }}
32+
{{ with .Site.Params.social.keybase }}
3333
&nbsp;<a href="https://keybase.io/{{.}}"><i class="fab fa-keybase fa-lg" aria-hidden="true"></i></a>
34-
{{- end }}
35-
{{ with .Site.Params.social.email -}}
34+
{{ end }}
35+
{{ with .Site.Params.social.email }}
3636
&nbsp;<a href="mailto:{{.}}"><i class="fas fa-at fa-lg" aria-hidden="true"></i></a>
37-
{{- end }}
37+
{{ end }}
3838
</section>

0 commit comments

Comments
 (0)