mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-09-27 20:46:25 +00:00
Improve SEO and code formatting
This commit is contained in:
@@ -10,12 +10,12 @@
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="content">
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{- block "main" . }}{{ end -}}
|
||||
</div>
|
||||
|
||||
{{ block "footer" . }}
|
||||
{{- block "footer" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{ partial "javascript.html" . }}
|
||||
|
||||
@@ -4,74 +4,74 @@
|
||||
<main class="posts">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ if .Content }}
|
||||
{{- if .Content }}
|
||||
<div class="content">{{ .Content }}</div>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .Paginator.HasPrev }}
|
||||
{{- if .Paginator.HasPrev }}
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
<div class="posts-list">
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="post">
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Date }}
|
||||
{{- if .Date }}
|
||||
<span class="post-date">
|
||||
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
|
||||
</span>
|
||||
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}<span class="post-author">{{ $.Site.Params.WrittenBy | default "Written by" }}
|
||||
{{ . }}</span>{{ end }}
|
||||
{{ if $.Site.Params.ShowReadingTimeInList }}
|
||||
{{- end }}
|
||||
{{- with .Params.Author }}
|
||||
<span class="post-author">{{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>
|
||||
{{- end }}
|
||||
{{- if $.Site.Params.ShowReadingTimeInList }}
|
||||
<span class="post-read-time">— {{ .ReadingTime }}
|
||||
{{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
{{- if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
{{- range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .Params.Cover }}
|
||||
{{- if .Params.Cover }}
|
||||
<figure class="post-cover">
|
||||
{{ $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
||||
{{- $img := imageConfig (printf "static/%s" .Params.Cover) }}
|
||||
|
||||
{{ if .Params.UseRelativeCover }}
|
||||
{{- if .Params.UseRelativeCover }}
|
||||
<img src="{{ (printf "%s%s" .Permalink .Params.Cover ) }}" alt="{{ .Title | plainify | default " " }}"
|
||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
<img src="{{ .Params.Cover | absURL }}" alt="{{ .Title | plainify | default " " }}"
|
||||
width="{{ $img.Width }}" height="{{ $img.Height }}" />
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .Params.CoverCaption }}
|
||||
{{- if .Params.CoverCaption }}
|
||||
<figcaption class="center">{{ .Params.CoverCaption | markdownify }}</figcaption>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ with .Description }}
|
||||
{{- with .Description }}
|
||||
{{ . | markdownify }}
|
||||
{{ else }}
|
||||
{{ if .Truncated }}
|
||||
{{- else }}
|
||||
{{- if .Truncated }}
|
||||
{{ .Summary | markdownify }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
{{ if not .Params.hideReadMore }}
|
||||
{{- if not .Params.hideReadMore }}
|
||||
<div><a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore | default "Read more" }}
|
||||
→</a></div>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<main role="main">
|
||||
<main role="main" style="">
|
||||
<div>
|
||||
{{ if .Site.Params.Portrait.Path }}
|
||||
{{- if .Site.Params.Portrait.Path }}
|
||||
<img src="{{ .Site.Params.Portrait.Path }}" class="circle" alt="{{ .Site.Params.Portrait.Alt }}"
|
||||
style="max-width:{{ .Site.Params.Portrait.MaxWidth }}" />
|
||||
{{ end }}
|
||||
style="max-width:{{ .Site.Params.Portrait.Size }}" />
|
||||
{{- end }}
|
||||
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
{{- with .Site.Params.homeSubtitle }}
|
||||
@@ -16,6 +16,7 @@
|
||||
{{ partial "social-icons.html" . }}
|
||||
</div>
|
||||
{{- end }}
|
||||
<div class="spacer" style="max-height: 5vh; height: calc({{ .Site.Params.Portrait.Size }} / 2)"></div>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
@@ -2,17 +2,19 @@
|
||||
<div class="footer__inner">
|
||||
<div class="footer__content">
|
||||
<span>© {{ now.Format "2006" }}</span>
|
||||
{{ if .Site.Author.name }}
|
||||
{{- if .Site.Author.name }}
|
||||
<span><a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a></span>
|
||||
{{ end }}
|
||||
{{ if .Site.Copyright }}
|
||||
<span>{{ .Site.Copyright| safeHTML }}</span>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- if .Site.Copyright }}
|
||||
<span>All rights reserved.</span>
|
||||
{{- end }}
|
||||
<span><a href="/privacy/">Privacy</a></span>
|
||||
<span>{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }}
|
||||
<a href="{{ "posts/index.xml" | absLangURL }}" target="_blank"
|
||||
title="rss">{{ partial "svg.html" (dict "name" "rss") }}</a>
|
||||
{{ end }}
|
||||
<span>
|
||||
{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }}
|
||||
<a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="rss">
|
||||
{{ partial "svg.html" (dict "name" "rss") }}
|
||||
</a>
|
||||
{{- end }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,82 +1,47 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="author"
|
||||
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}">
|
||||
<meta name="description"
|
||||
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="keywords"
|
||||
content="{{ .Site.Params.keywords }}{{ if .Params.tags }}{{ range .Params.tags }}, {{ . }}{{ end }}{{ end }}" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<!-- <meta name="theme-color" content="{{ .Site.Params.themeColor }}" /> -->
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
<link rel="preload" href="{{ .Site.BaseURL }}fonts/Inter-UI-Regular.woff2" as="font" type="font/woff2"
|
||||
crossorigin="anonymous">
|
||||
<link rel="preload" href="{{ .Site.BaseURL }}fonts/Inter-UI-Bold.woff2" as="font" type="font/woff2"
|
||||
crossorigin="anonymous">
|
||||
|
||||
{{ block "title" . }}
|
||||
<title>
|
||||
{{ if .IsHome }}
|
||||
{{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
|
||||
{{ else }}
|
||||
{{ .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
|
||||
{{ end }}
|
||||
</title>
|
||||
{{ end }}
|
||||
|
||||
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Fingerprint }}
|
||||
{{- $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
||||
{{ range $val := $.Site.Params.customCSS }}
|
||||
{{ if gt (len $val) 0 }}
|
||||
{{- range $val := $.Site.Params.customCSS }}
|
||||
{{- if gt (len $val) 0 }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $val }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
<!-- Icons -->
|
||||
{{- partial "favicons.html" . }}
|
||||
{{- partial "favicons.html" . -}}
|
||||
|
||||
{{ template "_internal/schema.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
{{ if isset .Site.Taxonomies "series" }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Params.categories }}
|
||||
<meta property="article:section" content="{{ . }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Params "date" }}
|
||||
<meta property="article:published_time" content="{{ time .Date }}" />
|
||||
{{ end }}
|
||||
<!-- Meta tags -->
|
||||
{{- partial "meta-tags.html" . -}}
|
||||
|
||||
<!-- 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 }}
|
||||
{{ end -}}
|
||||
{{- end }} -->
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "/posts/index.xml" | absURL }}" title="{{ $.Site.Title }}" />
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ if .OutputFormats.Get "json" }}
|
||||
{{- if .OutputFormats.Get "json" }}
|
||||
<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate"
|
||||
type="application/json" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ .Site.GoogleAnalytics }}');
|
||||
</script>
|
||||
{{ end }}
|
||||
{{- block "title" . }}
|
||||
<title>
|
||||
{{- if .IsHome }}
|
||||
{{- $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
|
||||
{{- else }}
|
||||
{{- .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
|
||||
{{- end -}}
|
||||
</title>
|
||||
{{- end }}
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ partial "logo.html" . }}
|
||||
|
||||
<span class="header__right">
|
||||
{{ if len .Site.Menus }}
|
||||
{{- if len .Site.Menus }}
|
||||
{{ partial "menu.html" . }}
|
||||
<span class="menu-trigger">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
@@ -11,7 +11,7 @@
|
||||
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />
|
||||
</svg>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
<span class="theme-toggle unselectable">{{ partial "theme-icon.html" . }}</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
{{ $main := resources.Get "js/main.js" }}
|
||||
{{ $menu := resources.Get "js/menu.js" }}
|
||||
{{ $theme := resources.Get "js/theme.js" }}
|
||||
{{ $secureJS := slice $main $menu $theme | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
|
||||
{{- $main := resources.Get "js/main.js" }}
|
||||
{{- $menu := resources.Get "js/menu.js" }}
|
||||
{{- $theme := resources.Get "js/theme.js" }}
|
||||
{{- $secureJS := slice $main $menu $theme | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
|
||||
<script type="text/javascript" src="{{ $secureJS.RelPermalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
|
||||
|
||||
{{- if .Site.GoogleAnalytics }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{- end}}
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
{{ range $val := $.Site.Params.customJS }}
|
||||
{{ if gt (len $val) 0 }}
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ .Site.GoogleAnalytics }}');
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
{{- range $val := $.Site.Params.customJS }}
|
||||
{{- if gt (len $val) 0 }}
|
||||
<script src="{{ $val }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,15 +1,15 @@
|
||||
<a href="{{ if .Site.Params.Logo.LogoHomeLink }}{{ .Site.Params.Logo.LogoHomeLink }}{{else}}{{ .Site.BaseURL }}{{ end }}"
|
||||
style="text-decoration: none;">
|
||||
<div class="logo">
|
||||
{{ if .Site.Params.Logo.path }}
|
||||
{{- if .Site.Params.Logo.path }}
|
||||
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
<span class="logo__mark">></span>
|
||||
<span class="logo__text">{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }}</span>
|
||||
<span class="logo__cursor" style="{{ with.Site.Params.Logo.logoCursorDisabled }}visibility:hidden;{{ end }}
|
||||
{{ with.Site.Params.Logo.logoCursorColor }}background-color:{{ . }};{{ end }}
|
||||
{{ with.Site.Params.Logo.logoCursorAnimate }}animation-duration:{{ . }};{{ end }}">
|
||||
<span class="logo__text">{{- with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }}</span>
|
||||
<span class="logo__cursor" style="{{- with.Site.Params.Logo.logoCursorDisabled }}visibility:hidden;{{ end -}}
|
||||
{{- with.Site.Params.Logo.logoCursorColor }}background-color:{{ . }};{{ end -}}
|
||||
{{- with.Site.Params.Logo.logoCursorAnimate }}animation-duration:{{ . }};{{ end -}}">
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</a>
|
||||
@@ -1,7 +1,7 @@
|
||||
<nav class="menu">
|
||||
<ul class="menu__inner">
|
||||
{{- $currentPage := . -}}
|
||||
{{ range .Site.Menus.main -}}
|
||||
{{ range .Site.Menus.main }}
|
||||
<li><a href="{{ .URL | absLangURL }}">{{ .Name }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<!-- Default -->
|
||||
<meta name="author"
|
||||
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}">
|
||||
<meta name="description"
|
||||
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
|
||||
<meta name="keywords"
|
||||
content="{{ .Site.Params.keywords }}{{ if .Params.tags }}{{ range .Params.tags }}, {{ . }}{{ end }}{{ end }}" />
|
||||
<meta name="robots" content="noodp" />
|
||||
|
||||
<!-- Og -->
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
<meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}" />
|
||||
<meta property="og:title"
|
||||
content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Params.title | plainify }}{{ end }}" />
|
||||
<meta property="og:description"
|
||||
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
{{- with .Params.cover }}
|
||||
<meta property="og:image" content="{{ . | absURL }}" />
|
||||
{{- $img := imageConfig (printf "static/%s" .) }}
|
||||
<meta property="og:image:width" content="{{ $img.Width }}" />
|
||||
<meta property="og:image:height" content="{{ $img.Height }}" />
|
||||
{{- end }}
|
||||
|
||||
<!-- Article -->
|
||||
<meta property="article:publisher" content="{{ .Site.BaseURL }}" />
|
||||
<meta name="article:author"
|
||||
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}">
|
||||
|
||||
{{- if isset .Params "date" }}
|
||||
<meta property="article:published_time" content="{{ time .Date }}" />
|
||||
{{- end }}
|
||||
|
||||
{{- if .GitInfo }}
|
||||
<meta property="article:modified_time" content="{{ time .GitInfo.AuthorDate }}" />
|
||||
{{- end }}
|
||||
|
||||
{{- range .Params.categories }}
|
||||
<meta property="article:section" content="{{ . }}" />
|
||||
{{- end }}
|
||||
|
||||
{{- range .Params.tags }}
|
||||
<meta property="article:tag" content="{{ . }}" />
|
||||
{{- end }}
|
||||
|
||||
<!-- Itemprops -->
|
||||
{{- template "_internal/schema.html" . }}
|
||||
|
||||
<!-- Twitter cards -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
{{- if .Params.cover }}
|
||||
<meta name="twitter:image" content="{{ .Params.cover | absURL }}" />
|
||||
<meta name="twitter:image:alt" content="{{ .Params.title | plainify | default " " }}" />
|
||||
{{- end }}
|
||||
<meta name="twitter:title" content="{{ .Title }}" />
|
||||
<meta name="twitter:description"
|
||||
content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" />
|
||||
<meta name="twitter:url" content="{{ .Permalink }}" />
|
||||
{{- with .Site.Social.twitter }}
|
||||
<meta name="twitter:site" content="{{ . }}" />
|
||||
{{- end }}
|
||||
{{- with .Site.Author.twitter }}
|
||||
<meta name="twitter:creator" content="{{ . }}" />
|
||||
{{- end }}
|
||||
@@ -1,5 +1,6 @@
|
||||
<!-- Sharingbutton Facebook -->
|
||||
<!-- <a class="resp-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank"
|
||||
{{- with .Site.Params.sharingButtons }}
|
||||
{{- if in . "facebook" }}
|
||||
<a class="resp-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u={{ $.Permalink }}" target="_blank"
|
||||
rel="noopener" aria-label="" title="Share on facebook">
|
||||
<div class="resp-sharing-button resp-sharing-button--facebook resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -9,10 +10,11 @@
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a> -->
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton Twitter -->
|
||||
<a class="resp-sharing-button__link" href="https://twitter.com/intent/tweet/?url={{ .Permalink }}" target="_blank"
|
||||
{{- if in . "twitter" }}
|
||||
<a class="resp-sharing-button__link" href="https://twitter.com/intent/tweet/?url={{ $.Permalink }}" target="_blank"
|
||||
rel="noopener" aria-label="" title="Share on twitter">
|
||||
<div class="resp-sharing-button resp-sharing-button--twitter resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -25,10 +27,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton Tumblr -->
|
||||
<!-- <a class="resp-sharing-button__link"
|
||||
href="https://www.tumblr.com/widgets/share/tool?posttype=link&title={{ .Title }}&caption={{ .Title }}&canonicalUrl={{ .Permalink }}"
|
||||
{{- if in . "tumblr" }}
|
||||
<a class="resp-sharing-button__link"
|
||||
href="https://www.tumblr.com/widgets/share/tool?posttype=link&title={{ $.Title }}&caption={{ $.Title }}&canonicalUrl={{ $.Permalink }}"
|
||||
target="_blank" rel="noopener" aria-label="" title="Share on tumblr">
|
||||
<div class="resp-sharing-button resp-sharing-button--tumblr resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -39,10 +42,12 @@
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a> -->
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton E-Mail -->
|
||||
<a class="resp-sharing-button__link" href="mailto:?subject={{ .Title }}&body={{ .Permalink }}" target="_self"
|
||||
|
||||
{{- if in . "email" }}
|
||||
<a class="resp-sharing-button__link" href="mailto:?subject={{ $.Title }}&body={{ $.Permalink }}" target="_self"
|
||||
rel="noopener" aria-label="" title="Share via email">
|
||||
<div class="resp-sharing-button resp-sharing-button--email resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -54,10 +59,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton Pinterest -->
|
||||
<!-- <a class="resp-sharing-button__link"
|
||||
href="https://pinterest.com/pin/create/button/?url={{ .Permalink }}&media={{ .Permalink }};description={{ .Title }}"
|
||||
|
||||
{{- if in . "pinterest" }}
|
||||
<a class="resp-sharing-button__link"
|
||||
href="https://pinterest.com/pin/create/button/?url={{ $.Permalink }}&media={{ $.Permalink }};description={{ $.Title }}"
|
||||
target="_blank" rel="noopener" aria-label="" title="Share on pinterest">
|
||||
<div class="resp-sharing-button resp-sharing-button--pinterest resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -68,11 +75,13 @@
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a> -->
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton LinkedIn -->
|
||||
|
||||
{{- if in . "linkedin" }}
|
||||
<a class="resp-sharing-button__link"
|
||||
href="https://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink }}&title={{ .Title }}&summary={{ .Title }}&source={{ .Permalink }}"
|
||||
href="https://www.linkedin.com/shareArticle?mini=true&url={{ $.Permalink }}&title={{ $.Title }}&summary={{ $.Title }}&source={{ $.Permalink }}"
|
||||
target="_blank" rel="noopener" aria-label="" title="Share on linkedin">
|
||||
<div class="resp-sharing-button resp-sharing-button--linkedin resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -85,10 +94,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton Reddit -->
|
||||
{{- if in . "reddit" }}
|
||||
<a class="resp-sharing-button__link"
|
||||
href="https://reddit.com/submit/?url={{ .Permalink }}&resubmit=true&title={{ .Title }}" target="_blank"
|
||||
href="https://reddit.com/submit/?url={{ $.Permalink }}&resubmit=true&title={{ $.Title }}" target="_blank"
|
||||
rel="noopener" aria-label="" title="Share on reddit">
|
||||
<div class="resp-sharing-button resp-sharing-button--reddit resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -100,10 +110,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton XING -->
|
||||
<!-- <a class="resp-sharing-button__link"
|
||||
href="https://www.xing.com/app/user?op=share;url={{ .Permalink }};title={{ .Title }}" target="_blank" rel="noopener"
|
||||
{{- if in . "xing" }}
|
||||
<a class="resp-sharing-button__link"
|
||||
href="https://www.xing.com/app/user?op=share;url={{ $.Permalink }};title={{ $.Title }}" target="_blank" rel="noopener"
|
||||
aria-label="" title="Share on xing">
|
||||
<div class="resp-sharing-button resp-sharing-button--xing resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -114,10 +125,11 @@
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a> -->
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton WhatsApp -->
|
||||
<a class="resp-sharing-button__link" href="whatsapp://send?text={{ .Title }}%20{{ .Permalink }}" target="_blank"
|
||||
{{- if in . "whatsapp" }}
|
||||
<a class="resp-sharing-button__link" href="whatsapp://send?text={{ $.Title }}%20{{ $.Permalink }}" target="_blank"
|
||||
rel="noopener" aria-label="" title="Share on whatsapp">
|
||||
<div class="resp-sharing-button resp-sharing-button--whatsapp resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -129,10 +141,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton Hacker News -->
|
||||
<!-- <a class="resp-sharing-button__link"
|
||||
href="https://news.ycombinator.com/submitlink?u={{ .Permalink }}&t={{ .Title }}" target="_blank" rel="noopener"
|
||||
{{- if in . "hackernews" }}
|
||||
<a class="resp-sharing-button__link"
|
||||
href="https://news.ycombinator.com/submitlink?u={{ $.Permalink }}&t={{ $.Title }}" target="_blank" rel="noopener"
|
||||
aria-label="" title="Share on hacker news">
|
||||
<div class="resp-sharing-button resp-sharing-button--hackernews resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -143,10 +156,11 @@
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a> -->
|
||||
</a>
|
||||
{{- end }}
|
||||
|
||||
<!-- Sharingbutton Telegram -->
|
||||
<a class="resp-sharing-button__link" href="https://telegram.me/share/url?text={{ .Title }}&url={{ .Permalink }}"
|
||||
{{- if in . "telegram" }}
|
||||
<a class="resp-sharing-button__link" href="https://telegram.me/share/url?text={{ $.Title }}&url={{ $.Permalink }}"
|
||||
target="_blank" rel="noopener" aria-label="" title="Share on telegram">
|
||||
<div class="resp-sharing-button resp-sharing-button--telegram resp-sharing-button--small">
|
||||
<div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
|
||||
@@ -157,4 +171,6 @@
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,25 +1,35 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<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>
|
||||
<title>XXX {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<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.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.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" -}}
|
||||
<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.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
|
||||
{{- end }}
|
||||
{{- with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.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 -}}
|
||||
{{- end }}
|
||||
{{ range .Pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | html }}</description>
|
||||
<content type="html">{{ printf `<![CDATA[%s]]>` .Content | safeHTML }}</content>
|
||||
<author>{{ .Params.author }}</author>
|
||||
<guid isPermaLink="true">{{ .Permalink }}</guid>
|
||||
<description>{{ printf `<![CDATA[%s]]>` .Params.description | safeHTML }}</description>
|
||||
<content:encoded type="html">{{ printf `<![CDATA[%s]]>` .Content | safeHTML }}</content:encoded>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
</svg>
|
||||
{{ i18n "readingTime" .Page.ReadingTime }}
|
||||
|
||||
{{ if .IsTranslated }} | {{ i18n "postAvailable" }}
|
||||
{{ range .Translations }}
|
||||
{{- if .IsTranslated }} | {{ i18n "postAvailable" }}
|
||||
{{- range .Translations }}
|
||||
<a href="{{ .Permalink }}"><span
|
||||
class="flag flag-icon flag-icon-{{ index $.Site.Data.langFlags (.Lang) }} flag-icon-squared"></span></a>
|
||||
{{ end}}
|
||||
{{ end }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -85,7 +85,11 @@
|
||||
<line x1="8" y1="2" x2="8" y2="6"></line>
|
||||
<line x1="3" y1="10" x2="21" y2="10"></line>
|
||||
</svg>
|
||||
{{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .Date.Local }}{{ end }}
|
||||
{{- if .Site.Params.dateformNumTime }}
|
||||
{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}
|
||||
{{- else }}
|
||||
{{ dateFormat "2006-01-02 15:04 -0700" .Date.Local }}
|
||||
{{- end }}
|
||||
</p>
|
||||
|
||||
{{- if .GitInfo }}
|
||||
@@ -100,8 +104,12 @@
|
||||
|
||||
<a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank"
|
||||
rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a>
|
||||
@
|
||||
{{ if .Site.Params.dateformNum }}{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}{{ else }}{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}{{ end }}
|
||||
{{- " @ " -}}
|
||||
{{- if .Site.Params.dateformNum -}}
|
||||
{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}
|
||||
{{- else -}}
|
||||
{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}
|
||||
{{- end }}
|
||||
</p>
|
||||
{{- end }}
|
||||
</div>
|
||||
@@ -113,7 +121,7 @@
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{ if and (not $.Site.Params.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
|
||||
{{- if and (not $.Site.Params.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ .Site.Params.ReadOtherPosts }}</span>
|
||||
@@ -121,35 +129,35 @@
|
||||
</div>
|
||||
|
||||
<div class="pagination__buttons">
|
||||
{{ if .NextInSection }}
|
||||
{{- if .NextInSection }}
|
||||
<span class="button previous">
|
||||
<a href="{{ .NextInSection.Permalink }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if .PrevInSection }}
|
||||
{{- if .PrevInSection }}
|
||||
<span class="button next">
|
||||
<a href="{{ .PrevInSection.Permalink }}">
|
||||
<span class="button__text">{{ .PrevInSection.Title }}</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ if not (eq .Params.Comments "false") }}
|
||||
{{- if .Site.DisqusShortname }}
|
||||
{{- if not (eq .Params.Comments "false") }}
|
||||
<div id="comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
</main>
|
||||
{{ end }}
|
||||
@@ -1,26 +1,36 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<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>
|
||||
<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.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.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" -}}
|
||||
<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.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
|
||||
{{- end }}
|
||||
{{- with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.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 .Pages }}
|
||||
{{- end }}
|
||||
{{- range .Pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<author>{{ .Site.Author.name }}</author>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | html }}</description>
|
||||
<content type="html">{{ printf `<![CDATA[%s]]>` .Content | safeHTML }}</content>
|
||||
<description>{{ printf `<![CDATA[%s]]>` .Summary | safeHTML }}</description>
|
||||
<content:encoded type="html">{{ printf `<![CDATA[%s]]>` .Content | safeHTML }}</content:encoded>
|
||||
</item>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
||||
|
||||
Reference in New Issue
Block a user