-
- {{ $.Scratch.Set "link" .RelPermalink }}
- {{ with .Params.repo }}
- {{ $repoHost := default "github" $.Params.repoHost }}
- {{ if eq "github" $repoHost }}
- {{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
- {{ else if eq "gitlab" $repoHost }}
- {{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
- {{ else if eq "bitbucket" $repoHost }}
- {{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
- {{ end }}
- {{ end }}
- {{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
-
+
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "pub_date" }}
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
diff --git a/layouts/partials/list-item-project.html b/layouts/partials/list-item-project.html
index 41b6717..749b8d2 100644
--- a/layouts/partials/list-item-project.html
+++ b/layouts/partials/list-item-project.html
@@ -1,32 +1,21 @@
-
+
+ {{ with .Permalink }} {{ $.Scratch.Set "link" . }} {{ end }}
+
+ {{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
+ {{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
-{{ $.Scratch.Set "link" .RelPermalink }}
-{{ with .Params.repo }}
-{{ $repoHost := default "github" $.Params.repoHost }}
-{{ if eq "github" $repoHost }}
-{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
-{{ else if eq "gitlab" $repoHost }}
-{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
-{{ else if eq "bitbucket" $repoHost }}
-{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
-{{ end }}
-{{ end }}
-{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
-{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
-{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
-
-
-
+
{{ $.Scratch.Get "subtitle" }}
{{ range.Params.categories }}
-
- {{ . }}
-
- {{ end }}
+
+ {{ . }}
+
+ {{ end }}
{{ range .Params.tags }}
{{ . }}
-
+
{{ end }}
-
\ No newline at end of file
+
+
diff --git a/layouts/partials/post.html b/layouts/partials/post.html
new file mode 100644
index 0000000..db08407
--- /dev/null
+++ b/layouts/partials/post.html
@@ -0,0 +1,23 @@
+{{ partial "header-post" .}}
+
+
{{ .Content }}
+
+
+ {{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
+
+ {{ if $related }}
+
+
+
+ {{ range $related }} {{ partial "list-item" . }} {{ end }}
+
+ {{ end }}
+
+ {{ if and .Site.DisqusShortname (not .Params.disableComments) }}
+
+
+
+ {{ template "_internal/disqus.html" . }}
+
+ {{ end }}
+
\ No newline at end of file
diff --git a/layouts/partials/project.html b/layouts/partials/project.html
new file mode 100644
index 0000000..3825680
--- /dev/null
+++ b/layouts/partials/project.html
@@ -0,0 +1,4 @@
+{{ partial "header-project" .}}
+
\ No newline at end of file
diff --git a/static/css/main.css b/static/css/main.css
index 2c6284b..0766f41 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -202,3 +202,7 @@ img {
background-color: var(--accent) !important;
color: #f8f8f8 !important;
}
+.list-item {
+ padding-top: 5px;
+ margin-top: 10px;
+}