Compare commits

..

No commits in common. '479a4d8ebc0cb0fc9910f43e1749fc36038c3179' and 'fd70e7a0fa8d0ab8c0b2c6cca0cb88026bad82bc' have entirely different histories.

  1. 52
      .github/workflows/hugo_cd.yml
  2. 6
      .github/workflows/hugo_ci.yml
  3. 13
      archetypes/default.md
  4. 13
      archetypes/posts.md
  5. 40
      config.toml
  6. 5
      config/production/hugo.toml
  7. 2
      content/portfolio/watch-together.md
  8. 13
      themes/maik-blog/archetypes/posts.md
  9. 3
      themes/maik-blog/layouts/_default/baseof.html
  10. 10
      themes/maik-blog/layouts/_default/rss.xml
  11. 6
      themes/maik-blog/layouts/partials/footer.html
  12. 7
      themes/maik-blog/layouts/partials/head.html
  13. 6
      themes/maik-blog/layouts/partials/javascript.html
  14. 8
      themes/maik-blog/layouts/partials/meta-tags.html
  15. 47
      themes/maik-blog/layouts/partials/seo.html
  16. 2
      themes/maik-blog/layouts/portfolio/single.html
  17. 2
      themes/maik-blog/layouts/posts/single.html
  18. 10
      themes/maik-blog/layouts/rss.xml
  19. 3
      themes/maik-blog/layouts/writeups/list.html
  20. 45
      themes/maik-blog/layouts/writeups/rss.xml
  21. 2
      themes/maik-blog/layouts/writeups/single.html

@ -10,53 +10,25 @@ defaults:
working-directory: ./ working-directory: ./
jobs: jobs:
build: cd:
timeout-minutes: 6 timeout-minutes: 6
name: Build name: CD
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup hugo - name: Setup hugo
uses: peaceiris/actions-hugo@v3 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: "latest" hugo-version: "latest"
extended: true extended: true
- name: Build - name: Build
run: hugo --minify run: hugo -D -F
- name: Create GitHub deployment
- name: Upload deployment uses: chrnorm/deployment-action@releases/v1
uses: actions/upload-artifact@v4 id: deployment
with:
name: public-html
path: ./public
deploy:
timeout-minutes: 6
name: Deploy
runs-on: ubuntu-latest
needs: build
environment:
name: production
url: https://maik.dev/
steps:
- name: Download deployment
uses: actions/download-artifact@v4
with: with:
name: public-html token: "${{ github.token }}"
path: ./public-html target_url: https://maik.dev/
environment: production
- name: Setup SSH config for remote server initial_status: "success"
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
echo "${{ secrets.SSH_HOST }} ssh-ed25519 ${{ secrets.SSH_HOST_KEY }}" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/id_ed25519
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
- name: Transfer deployment to remote server
run: |
rsync -avh --delete-after ./public-html/ ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:~/maik.dev

@ -22,13 +22,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v2
- name: Setup hugo - name: Setup hugo
uses: peaceiris/actions-hugo@v3 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: "latest" hugo-version: "latest"
extended: true extended: true
- name: Build - name: Build
run: hugo -D -F run: hugo -D -F

@ -0,0 +1,13 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
images = []
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++

@ -0,0 +1,13 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
images = []
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++

@ -1,8 +1,12 @@
baseURL = "http://localhost:1313/" baseURL = "https://maik.dev/"
# baseURL = "http://localhost:1313/"
title = "Maik de Kruif" title = "Maik de Kruif"
languageCode = "en-us" languageCode = "en-us"
theme = "maik-blog" theme = "maik-blog"
paginate = 12
rssLimit = 10
copyright = "© Maik de Kruif (maik_dev). All rights reserved." copyright = "© Maik de Kruif (maik_dev). All rights reserved."
PygmentsCodeFences = true PygmentsCodeFences = true
@ -23,21 +27,31 @@ canonifyURLs = true
enableRobotsTXT = true enableRobotsTXT = true
enableGitInfo = true enableGitInfo = true
enableEmoji = true enableEmoji = true
enableMissingTranslationPlaceholders = false
disableRSS = false
disableSitemap = false
disable404 = false
disableHugoGeneratorInject = false
googleAnalytics = "UA-136337666-1"
[permalinks] [permalinks]
[permalinks.page]
posts = "/posts/:title/" posts = "/posts/:title/"
writeups = "/:sections/:title/" writeups = "/:sections/:title/"
# writeups = "/writeups/:title/"
portfolio = "/portfolio/:title/" [author]
name = "Maik de Kruif"
email = "maik@maik.dev"
twitter = "@maik_dev"
image = "/img/home/portrait.png"
[social]
twitter = "@maik_dev"
[outputs] [outputs]
home = ["HTML", "RSS"] home = ["HTML", "RSS"]
page = ["HTML", "RSS"] page = ["HTML", "RSS"]
[pagination]
pagerSize = 12
[params] [params]
dateform = "Jan 2, 2006" dateform = "Jan 2, 2006"
dateformShort = "Jan 2" dateformShort = "Jan 2"
@ -51,8 +65,6 @@ enableEmoji = true
genre = "Blog" genre = "Blog"
rssLimit = 15
showReadingTimeInList = false showReadingTimeInList = false
homeSubtitle = "Software Engineering, Linux and Cyber Security" homeSubtitle = "Software Engineering, Linux and Cyber Security"
@ -99,15 +111,6 @@ enableEmoji = true
alt = "Portrait" alt = "Portrait"
size = "175px" size = "175px"
[params.author]
name = "Maik de Kruif"
email = "maik@maik.dev"
twitter = "@maik_dev"
image = "/img/home/portrait.png"
[params.general]
twitter = "@maik_dev"
# Wallets # Wallets
[[params.wallets]] [[params.wallets]]
name = "XMR" name = "XMR"
@ -172,6 +175,7 @@ enableEmoji = true
[languages] [languages]
[languages.en] [languages.en]
subtitle = "maik.dev"
weight = 1 weight = 1
copyright = "© Maik de Kruif (maik_dev). All rights reserved." copyright = "© Maik de Kruif (maik_dev). All rights reserved."

@ -1,5 +0,0 @@
baseURL = "https://maik.dev/"
[services]
[services.googleAnalytics]
id = "UA-136337666-1"

@ -2,7 +2,7 @@
author = "Maik de Kruif" author = "Maik de Kruif"
title = "WatchTogether" title = "WatchTogether"
start_date = 2018-08-17 start_date = 2018-08-17
end_date = 2021-01-25 end_date = 9999-01-01
company_name = "Personal" company_name = "Personal"
company_url = "https://maik.dev" company_url = "https://maik.dev"
cover = "img/portfolio/watch-together/screenshot.png" cover = "img/portfolio/watch-together/screenshot.png"

@ -0,0 +1,13 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
cover = ""
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++

@ -1,3 +1,4 @@
{{- $paginator := .Paginate .RegularPagesRecursive }}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ .Site.Language }}"> <html lang="{{ .Site.Language }}">
@ -19,8 +20,6 @@
</div> </div>
{{ partial "javascript.html" . }} {{ partial "javascript.html" . }}
<!-- SEO stuff -->
{{ partial "seo.html" . }}
</body> </body>
</html> </html>

@ -7,11 +7,11 @@
{{- with .Site.LanguageCode }} {{- with .Site.LanguageCode }}
<language>{{.}}</language> <language>{{.}}</language>
{{- end }} {{- end }}
{{- with .Site.Params.author.email }} {{- with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor> <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
{{- end }} {{- end }}
{{- with .Site.Params.author.email }} {{- with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster> <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>
{{- end }} {{- end }}
{{- with .Site.Copyright }} {{- with .Site.Copyright }}
<copyright>{{.}}</copyright> <copyright>{{.}}</copyright>
@ -22,7 +22,7 @@
{{- with .OutputFormats.Get "RSS" }} {{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }} {{- end }}
{{ range .Pages | first .Site.Params.rssLimit }} {{ range .Pages | first 15 }}
<item> <item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title> <title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>

@ -3,17 +3,19 @@
<div class="footer__content"> <div class="footer__content">
<div class="footer__content__section regular"> <div class="footer__content__section regular">
<span>&copy; {{ now.Format "2006" }}</span> <span>&copy; {{ now.Format "2006" }}</span>
{{- if .Site.Params.author.name }} {{- if .Site.Author.name }}
<span><a href="{{ .Site.BaseURL }}">{{ .Site.Params.author.name }}</a></span> <span><a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a></span>
{{- end }} {{- end }}
{{- if .Site.Copyright }} {{- if .Site.Copyright }}
<span>All rights reserved.</span> <span>All rights reserved.</span>
{{- end }} {{- end }}
<span><a href="/privacy/">Privacy</a></span> <span><a href="/privacy/">Privacy</a></span>
<span> <span>
{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }}
<a href="{{ "index.xml" | absLangURL }}" target="_blank" title="rss"> <a href="{{ "index.xml" | absLangURL }}" target="_blank" title="rss">
{{ partial "svg.html" (dict "name" "rss") }} {{ partial "svg.html" (dict "name" "rss") }}
</a> </a>
{{- end }}
</span> </span>
</div> </div>
<div class="footer__content__section donations"> <div class="footer__content__section donations">

@ -10,11 +10,11 @@
crossorigin="anonymous"> crossorigin="anonymous">
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }} {{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{- $style := resources.Get "scss/main.scss" | css.Sass $options | resources.Fingerprint }} {{- $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}"> <link rel="stylesheet" href="{{ $style.Permalink }}">
{{ $options := (dict "targetPath" "syntax_highlighting.css" "outputStyle" "compressed" "enableSourceMap" true) }} {{ $options := (dict "targetPath" "syntax_highlighting.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{- $style := resources.Get "scss/syntax_highlighting.scss" | css.Sass $options | resources.Fingerprint }} {{- $style := resources.Get "scss/syntax_highlighting.scss" | resources.ToCSS $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}"> <link rel="stylesheet" href="{{ $style.Permalink }}">
{{- range $val := $.Site.Params.customCSS }} {{- range $val := $.Site.Params.customCSS }}
@ -28,6 +28,9 @@
<!-- Meta tags --> <!-- Meta tags -->
{{- partial "meta-tags.html" . -}} {{- partial "meta-tags.html" . -}}
<!-- SEO stuff -->
{{- partial "seo.html" . -}}
<!-- RSS --> <!-- RSS -->
<!-- {{- with .OutputFormats.Get "rss" }} <!-- {{- with .OutputFormats.Get "rss" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}

@ -5,9 +5,9 @@
{{- $secureJS := slice $main $menu $theme $nav | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }} {{- $secureJS := slice $main $menu $theme $nav | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script> <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
{{- if .Site.Config.Services.GoogleAnalytics.ID }} {{- if .Site.GoogleAnalytics }}
<!-- Global site tag (gtag.js) - Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"></script> <script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
@ -16,7 +16,7 @@
} }
gtag('js', new Date()); gtag('js', new Date());
gtag('config', '{{ .Site.Config.Services.GoogleAnalytics.ID }}'); gtag('config', '{{ .Site.GoogleAnalytics }}');
</script> </script>
{{- end }} {{- end }}

@ -1,6 +1,6 @@
<!-- Default --> <!-- Default -->
<meta name="author" <meta name="author"
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Params.author.name }}{{ . }}{{ end }}{{ end }}"> content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ end }}{{ end }}">
<meta name="description" <meta name="description"
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" /> content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
<meta name="keywords" <meta name="keywords"
@ -26,7 +26,7 @@
<!-- Article --> <!-- Article -->
<meta property="article:publisher" content="{{ .Site.BaseURL }}" /> <meta property="article:publisher" content="{{ .Site.BaseURL }}" />
<meta name="article:author" <meta name="article:author"
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Params.author.name }}{{ . }}{{ end }}{{ end }}"> content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ end }}{{ end }}">
{{- if isset .Params "date" }} {{- if isset .Params "date" }}
<meta property="article:published_time" content="{{ time .Date }}" /> <meta property="article:published_time" content="{{ time .Date }}" />
@ -60,9 +60,9 @@
<meta name="twitter:description" <meta name="twitter:description"
content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" /> content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" />
<meta name="twitter:url" content="{{ .Permalink }}" /> <meta name="twitter:url" content="{{ .Permalink }}" />
{{- with .Site.Params.general.twitter }} {{- with .Site.Social.twitter }}
<meta name="twitter:site" content="{{ . }}" /> <meta name="twitter:site" content="{{ . }}" />
{{- end }} {{- end }}
{{- with .Site.Params.author.twitter }} {{- with .Site.Author.twitter }}
<meta name="twitter:creator" content="{{ . }}" /> <meta name="twitter:creator" content="{{ . }}" />
{{- end }} {{- end }}

@ -1,9 +1,10 @@
{{- /* <!-- Breadcrumbs --> */}} {{- /* <!-- Breadcrumbs --> */}}
{{- $visiblePage := .}}
{{- $breadcrumbs := slice }} {{- $breadcrumbs := slice }}
{{- $path := "" }} {{- $path := "" }}
{{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (or (eq .Kind "404") (.File))) }} {{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (eq .Kind "404")) }}
{{- $path = .RelPermalink }} {{- $path = .RelPermalink }}
{{- else if .File }}
{{- $path = string .File }}
{{- else if .IsHome }} {{- else if .IsHome }}
{{- $path = "" }} {{- $path = "" }}
{{- else }} {{- else }}
@ -21,10 +22,10 @@
{{- $breadcrumbs = $breadcrumbs | append (dict "name" "Not Found" "url" (printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $currentPath))) }} {{- $breadcrumbs = $breadcrumbs | append (dict "name" "Not Found" "url" (printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $currentPath))) }}
{{- else }} {{- else }}
{{- $title := $page.Title }} {{- $title := $page.Title }}
{{- if eq (trim $currentPath "/") $path }} {{- if eq $page $ }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $visiblePage.Title "url" $visiblePage.Permalink) }}
{{- else }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink) }} {{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink) }}
{{- else }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink)}}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
@ -38,11 +39,11 @@
{ {
"@type": "Person", "@type": "Person",
"@id": "{{ $.Site.BaseURL }}#website_founder", "@id": "{{ $.Site.BaseURL }}#website_founder",
"name": {{ $.Site.Params.author.name | safeHTML }}, "name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Params.author.email }} {{- with $.Site.Author.email }}
"email": {{ . | safeHTML }}, "email": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- with $.Site.Params.author.image }} {{- with $.Site.Author.image }}
{{- $img := resources.Get . }} {{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }} {{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": { "image": {
@ -56,7 +57,7 @@
}, },
{ {
"@type": "Organization", "@type": "Organization",
"name": {{ $.Site.Params.author.name | safeHTML }}, "name": {{ $.Site.Author.name | safeHTML }},
"slogan": {{$.Site.Params.HomeSubtitle | safeHTML }}, "slogan": {{$.Site.Params.HomeSubtitle | safeHTML }},
{{- with $socials := .Site.Params.social }} {{- with $socials := .Site.Params.social }}
"sameAs": [ "sameAs": [
@ -65,10 +66,10 @@
{{- end }} {{- end }}
], ],
{{- end }} {{- end }}
{{- with $.Site.Params.author.email }} {{- with $.Site.Author.email }}
"email": {{ . | safeHTML }}, "email": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- with $.Site.Params.author.image }} {{- with $.Site.Author.image }}
{{- $img := resources.Get . }} {{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }} {{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"logo": { "logo": {
@ -107,15 +108,15 @@
{{- with .Site.Copyright }} {{- with .Site.Copyright }}
"license": {{ . | safeHTML }}, "license": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- if .Site.Params.author.name }} {{- if .Site.Author.name }}
{{- range slice "publisher" "author" }} {{- range slice "publisher" "author" }}
{{ . }}: { {{ . }}: {
"@type": "Person", "@type": "Person",
"name": {{ $.Site.Params.author.name | safeHTML }}, "name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Params.author.email }} {{- with $.Site.Author.email }}
"email": {{ . | safeHTML }}, "email": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- with $.Site.Params.author.image }} {{- with $.Site.Author.image }}
{{- $img := resources.Get . }} {{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }} {{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": { "image": {
@ -186,15 +187,15 @@
{{- with .Site.Copyright }} {{- with .Site.Copyright }}
"license": {{ . | safeHTML }}, "license": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- if .Site.Params.author.name }} {{- if .Site.Author.name }}
{{- range slice "publisher" "author" }} {{- range slice "publisher" "author" }}
{{ . }}: { {{ . }}: {
"@type": "Person", "@type": "Person",
"name": {{ $.Site.Params.author.name | safeHTML }}, "name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Params.author.email }} {{- with $.Site.Author.email }}
"email": {{ . | safeHTML }}, "email": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- with $.Site.Params.author.image }} {{- with $.Site.Author.image }}
{{- $img := resources.Get . }} {{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }} {{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": { "image": {
@ -257,15 +258,15 @@
{{- with .Site.Copyright }} {{- with .Site.Copyright }}
"license": {{ . | safeHTML }}, "license": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- if .Site.Params.author.name }} {{- if .Site.Author.name }}
{{- range slice "publisher" "author" }} {{- range slice "publisher" "author" }}
{{ . }}: { {{ . }}: {
"@type": "Person", "@type": "Person",
"name": {{ $.Site.Params.author.name | safeHTML }}, "name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Params.author.email }} {{- with $.Site.Author.email }}
"email": {{ . | safeHTML }}, "email": {{ . | safeHTML }},
{{- end }} {{- end }}
{{- with $.Site.Params.author.image }} {{- with $.Site.Author.image }}
{{- $img := resources.Get . }} {{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }} {{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": { "image": {

@ -144,7 +144,7 @@
{{- end }} {{- end }}
{{- if .Site.Config.Services.Disqus.Shortname }} {{- if .Site.DisqusShortname }}
{{- if not (eq .Params.Comments "false") }} {{- if not (eq .Params.Comments "false") }}
<div id="comments"> <div id="comments">
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}

@ -152,7 +152,7 @@
{{- end }} {{- end }}
{{- if .Site.Config.Services.Disqus.Shortname }} {{- if .Site.DisqusShortname }}
{{- if not (eq .Params.Comments "false") }} {{- if not (eq .Params.Comments "false") }}
<div id="comments"> <div id="comments">
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}

@ -7,11 +7,11 @@
{{- with .Site.LanguageCode }} {{- with .Site.LanguageCode }}
<language>{{.}}</language> <language>{{.}}</language>
{{- end }} {{- end }}
{{- with .Site.Params.author.email }} {{- with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor> <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
{{- end }} {{- end }}
{{- with .Site.Params.author.email }} {{- with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster> <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>
{{- end }} {{- end }}
{{- with .Site.Copyright }} {{- with .Site.Copyright }}
<copyright>{{.}}</copyright> <copyright>{{.}}</copyright>
@ -27,7 +27,7 @@
{{- $allContent = union $allContent .RegularPagesRecursive }} {{- $allContent = union $allContent .RegularPagesRecursive }}
{{- end }} {{- end }}
{{- $allContent = sort $allContent "Date" "desc" }} {{- $allContent = sort $allContent "Date" "desc" }}
{{- $allContent = $allContent | first .Site.Params.rssLimit }} {{- $allContent = $allContent | first 15 }}
{{- range $allContent }} {{- range $allContent }}
<item> <item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title> <title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>

@ -1,5 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ $paginator := (.Paginate .RegularPagesRecursive) }}
<main class="posts"> <main class="posts">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
@ -13,7 +12,7 @@
{{- end }} {{- end }}
<div class="posts-list masonry"> <div class="posts-list masonry">
{{ range $paginator.Pages }} {{ range .Paginator.Pages }}
<div class="post masonry-item"> <div class="post masonry-item">
<div class="masonry-item-content"> <div class="masonry-item-content">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2> <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>

@ -1,45 +0,0 @@
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<icon>{{"favicon-32x32.png" | absURL}}</icon>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
{{- with .Site.LanguageCode }}
<language>{{.}}</language>
{{- end }}
{{- with .Site.Params.author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor>
{{- end }}
{{- with .Site.Params.author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster>
{{- end }}
{{- with .Site.Copyright }}
<copyright>{{.}}</copyright>
{{- end }}
{{- if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{- end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{ range .RegularPagesRecursive | first .Site.Params.rssLimit }}
<item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<published>{{ .Date.Format "2006-01-02T15:04:05Z0700" | safeHTML }}</published>
{{- if .GitInfo }}
<updated>{{ dateFormat "2006-01-02T15:04:05Z0700" .GitInfo.AuthorDate.Local | safeHTML }}</updated>
{{- end }}
<author>{{ .Params.author }}</author>
<guid isPermaLink="true">{{ .Permalink }}</guid>
<description>{{ printf `<![CDATA[%s]]>` .Params.description | safeHTML }}</description>
{{ $content := .Content}}
{{- if .Params.Cover }}
{{- $content = (printf `%s%s` (partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify) "class" "post-cover")) $content) }}
{{- end }}
<content:encoded type="html">{{ printf `<![CDATA[%s]]>` $content | safeHTML }}</content:encoded>
</item>
{{ end }}
</channel>
</rss>

@ -152,7 +152,7 @@
{{- end }} {{- end }}
{{- if .Site.Config.Services.Disqus.Shortname }} {{- if .Site.DisqusShortname }}
{{- if not (eq .Params.Comments "false") }} {{- if not (eq .Params.Comments "false") }}
<div id="comments"> <div id="comments">
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}

Loading…
Cancel
Save