plain site; demo content added; re-terminal theme enabled; some theme customizations
This commit is contained in:
8
themes/re-terminal/layouts/partials/comments.html
Normal file
8
themes/re-terminal/layouts/partials/comments.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<!--
|
||||
To add comments section, please create `layouts/partials/comments.html` in your
|
||||
Hugo directory and insert:
|
||||
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
||||
or whatever comment engine you want -> https://gohugo.io/content-management/comments/#readout
|
||||
-->
|
17
themes/re-terminal/layouts/partials/comments_counter.html
Normal file
17
themes/re-terminal/layouts/partials/comments_counter.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!--
|
||||
To add comments section, please create `layouts/partials/comments_counter.html` in your
|
||||
Hugo directory and insert:
|
||||
|
||||
you can use the snippet bellow to add disqus comments counter to your posts
|
||||
|
||||
<span>
|
||||
<a class="disqus_comments" href="{{ .Permalink }}#disqus_thread">
|
||||
<span
|
||||
class="disqus-comment-count"
|
||||
data-disqus-url="{{ with .Params.disqus_url }}{{ . }}{{ else }}{{ .Permalink }}{{ end }}">O {{ $.Site.Params.comments | default "comments" }}</span>
|
||||
{{ .Site.Params.noCounter }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
or whatever comment engine you want -> https://gohugo.io/content-management/comments/#readout
|
||||
-->
|
54
themes/re-terminal/layouts/partials/cover.html
Normal file
54
themes/re-terminal/layouts/partials/cover.html
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
|
||||
{{- $ctx := "" -}}
|
||||
{{- $isCoverCaptionEnabled := default nil -}}
|
||||
{{- if (reflect.IsMap . ) -}}
|
||||
{{- /* Assign Custom Context */ -}}
|
||||
{{- $ctx = .ctx -}}
|
||||
{{- /* Assign value of .isCoverCaptionEnabled */ -}}
|
||||
{{- $isCoverCaptionEnabled = cond (not .isCoverCaptionEnabled) nil .isCoverCaptionEnabled -}}
|
||||
{{- else -}}
|
||||
{{- /* Passing dot context, default behaviour */ -}}
|
||||
{{- $ctx = . -}}
|
||||
{{- /* Default isCoverCaptionEnabled for Dot Context */ -}}
|
||||
{{- $isCoverCaptionEnabled = false -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- $cover := false -}}
|
||||
{{- $autoCover := default $.Site.Params.autoCover false }}
|
||||
|
||||
{{- if index $ctx.Params "cover" -}}
|
||||
{{- if .Resources.GetMatch $ctx.Params.Cover }}
|
||||
{{- $cover = (.Resources.GetMatch $ctx.Params.Cover).RelPermalink -}}
|
||||
{{- else -}}
|
||||
{{- $cover = absURL $ctx.Params.Cover -}}
|
||||
{{- end -}}
|
||||
{{- else if $.Site.Params.AutoCover -}}
|
||||
{{- if (not $ctx.Params.Cover) -}}
|
||||
{{- if .Resources.GetMatch "cover.*" -}}
|
||||
{{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $cover -}}
|
||||
{{ if and $ctx.Params.coverCaption $isCoverCaptionEnabled }}
|
||||
<figure>
|
||||
<!-- Cover image found -->
|
||||
<img src="{{ $cover }}"
|
||||
class="post-cover"
|
||||
alt="{{ .Title | plainify | default " " }}"
|
||||
title="{{ $ctx.Params.CoverCredit |plainify|default "Cover Image" }}" />
|
||||
|
||||
<figcaption class="right">{{ $ctx.Params.coverCaption | safeHTML }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
<!-- Cover image found -->
|
||||
<img src="{{ $cover }}"
|
||||
class="post-cover"
|
||||
alt="{{ .Title | plainify | default " " }}"
|
||||
title="{{ $ctx.Params.CoverCredit |plainify|default "Cover Image" }}" />
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
|
4
themes/re-terminal/layouts/partials/extended_footer.html
Normal file
4
themes/re-terminal/layouts/partials/extended_footer.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!--
|
||||
To add an extended footer section, please create
|
||||
`layouts/partials/extended_footer.html` in your Hugo directory.
|
||||
-->
|
4
themes/re-terminal/layouts/partials/extended_head.html
Normal file
4
themes/re-terminal/layouts/partials/extended_head.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!--
|
||||
To add an extended head section, please create
|
||||
`layouts/partials/extended_head.html` in your Hugo directory.
|
||||
-->
|
30
themes/re-terminal/layouts/partials/footer.html
Normal file
30
themes/re-terminal/layouts/partials/footer.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<footer class="footer">
|
||||
<div class="footer__inner">
|
||||
{{ if $.Site.Params.Copyright }}
|
||||
<div class="copyright copyright--user">
|
||||
<span>{{ $.Site.Params.Copyright | safeHTML }}</span>
|
||||
{{ else }}
|
||||
<div class="copyright">
|
||||
<span>© {{ now.Year }} Powered by <a href="https://gohugo.io">Hugo</a></span>
|
||||
{{ end }}
|
||||
<span>:: <a href="https://github.com/mirus-ua/hugo-theme-re-terminal" target="_blank">Theme</a> made by <a href="https://github.com/mirus-ua" target="_blank">Mirus</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{ $menu := resources.Get "js/menu.js" | js.Build }}
|
||||
{{ $prism := resources.Get "js/prism.js" | js.Build }}
|
||||
|
||||
{{ $bundle := slice $menu $prism | resources.Concat "bundle.js" | resources.Minify }}
|
||||
|
||||
<script type="text/javascript" src="{{ $bundle.RelPermalink }}"></script>
|
||||
|
||||
<!-- Banner JS if it enabled -->
|
||||
{{ if .Site.Params.Banner }}
|
||||
{{ $banner := resources.Get "js/banner.js" | js.Build | resources.Minify }}
|
||||
|
||||
<script type="text/javascript" src="{{ $banner.RelPermalink }}"></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- Extended footer section-->
|
||||
{{ partial "extended_footer.html" . }}
|
96
themes/re-terminal/layouts/partials/head.html
Normal file
96
themes/re-terminal/layouts/partials/head.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta name="keywords" content="{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}" />
|
||||
{{ if .Params.noindex }}
|
||||
{{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }}
|
||||
<meta name="robots" content="noindex" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<meta name="robots" content="noodp" />
|
||||
{{ end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
|
||||
{{ $defaultStylesTemplate := resources.Get "css/style.scss" }}
|
||||
{{ $defaultStyles := $defaultStylesTemplate | resources.ExecuteAsTemplate "main.scss" .}}
|
||||
<!-- Local Theme Variables -->
|
||||
{{ if and (isset .Params "color") (not (eq .Params.color "")) }}
|
||||
{{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }}
|
||||
{{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }}
|
||||
{{ $options := (dict "transpiler" "libsass") }}
|
||||
{{ $localColorStyles := $localCss | css.Sass $options }}
|
||||
<link rel="stylesheet" href="{{ $localColorStyles.Permalink }}">
|
||||
{{ else }}
|
||||
<!-- Theme Variables -->
|
||||
{{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "blue")) }}
|
||||
{{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }}
|
||||
{{ $options := (dict "transpiler" "libsass" "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }}
|
||||
{{ $styles := $css | css.Sass $options }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
{{ if (fileExists "static/style.css") -}}
|
||||
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
|
||||
{{- end }}
|
||||
|
||||
<!-- Icons -->
|
||||
{{ if isset $.Site.Params "favicon" }}
|
||||
<link rel="shortcut icon" href="{{ $.Site.Params.favicon | absURL }}">
|
||||
{{ else }}
|
||||
<link rel="shortcut icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
|
||||
<link rel="apple-touch-icon" href="{{ printf "img/theme-colors/%s.png" (or .Params.color $.Site.Params.ThemeColor | default "orange") | absURL }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
{{ if (isset $.Site.Params "twitter") }}
|
||||
{{ if (isset $.Site.Params.Twitter "site") }}
|
||||
<meta name="twitter:site" content="{{ $.Site.Params.Twitter.site }}" />
|
||||
{{ end }}
|
||||
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ .Params.Author }}{{ end }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- OG data -->
|
||||
<meta property="og:locale" content="{{ $.Site.Language.Lang }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:title" content="{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }}{{ end }}">
|
||||
<meta property="og:description" content="{{ if .IsHome }}{{ $.Site.Params.Subtitle }}{{ else if .Description}}{{ .Description | plainify }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:site_name" content="{{ $.Site.Title }}" />
|
||||
{{ if (isset .Params "cover") }}
|
||||
{{ $pageCover := .Param "cover" }}
|
||||
{{ with (.Resources.GetMatch (.Param "cover")) }}
|
||||
{{ $pageCover = .RelPermalink }}
|
||||
{{ end }}
|
||||
<meta property="og:image" content="{{ $pageCover | absURL }}">
|
||||
{{ else }}
|
||||
{{ if isset $.Site.Params "favicon" }}
|
||||
<meta property="og:image" content="{{ $.Site.Params.favicon | absURL }}">
|
||||
{{ else }}
|
||||
<meta property="og:image" content="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="627">
|
||||
{{ range .Params.categories }}
|
||||
<meta property="article:section" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ if isset .Params "date" }}
|
||||
<meta property="article:published_time" content="{{ time .Date }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- JSON Feed -->
|
||||
{{ with .OutputFormats.Get "json" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Extended head section-->
|
||||
{{ partial "extended_head.html" . }}
|
16
themes/re-terminal/layouts/partials/header.html
Normal file
16
themes/re-terminal/layouts/partials/header.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<header class="header">
|
||||
<div class="header__inner">
|
||||
<div class="header__logo">
|
||||
{{ partial "logo.html" . }}
|
||||
</div>
|
||||
{{ if len $.Site.Menus }}
|
||||
{{ partial "mobile-menu.html" . }}
|
||||
{{ end }}
|
||||
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
|
||||
{{ partial "language-menu.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if len $.Site.Menus }}
|
||||
{{ partial "menu.html" . }}
|
||||
{{ end }}
|
||||
</header>
|
10
themes/re-terminal/layouts/partials/language-menu.html
Normal file
10
themes/re-terminal/layouts/partials/language-menu.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<ul class="menu menu--desktop menu--language-selector">
|
||||
<li class="menu__trigger">{{ .Language.LanguageName }} ▾</li>
|
||||
<li>
|
||||
<ul class="menu__dropdown">
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
5
themes/re-terminal/layouts/partials/logo.html
Normal file
5
themes/re-terminal/layouts/partials/logo.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}">
|
||||
<div class="logo">
|
||||
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}re-Terminal{{ end }}
|
||||
</div>
|
||||
</a>
|
56
themes/re-terminal/layouts/partials/menu.html
Normal file
56
themes/re-terminal/layouts/partials/menu.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<nav class="navigation-menu">
|
||||
<ul class="navigation-menu__inner menu--desktop">
|
||||
{{ if or $.Site.Params.showMenuItems ( eq .Site.Params.showMenuItems 0 ) }}
|
||||
{{/* get first amount of item */}}
|
||||
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<ul class="menu">
|
||||
<li class="menu__trigger">{{ .Name }} ▾</li>
|
||||
<li>
|
||||
<ul class="menu__dropdown">
|
||||
{{ range .Children }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{{end}}
|
||||
{{ end }}
|
||||
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
||||
<li>
|
||||
<ul class="menu">
|
||||
<li class="menu__trigger">{{ $.Site.Params.MenuMore }} ▾</li>
|
||||
<li>
|
||||
<ul class="menu__dropdown">
|
||||
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ else }}
|
||||
<li class="menu__subdrop--title">▾ {{ .Name }}</li>
|
||||
<li>
|
||||
<ul class="menu__subdrop--list">
|
||||
{{ range .Children }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
29
themes/re-terminal/layouts/partials/mobile-menu.html
Normal file
29
themes/re-terminal/layouts/partials/mobile-menu.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<ul class="menu menu--mobile">
|
||||
<li class="menu__trigger">Menu ▾</li>
|
||||
<li>
|
||||
<ul class="menu__dropdown">
|
||||
{{ range $.Site.Menus.main }}
|
||||
{{ if not .HasChildren }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ else }}
|
||||
<li class="menu__subdrop--title">▾ {{ .Name }}</li>
|
||||
<li>
|
||||
<ul class="menu__subdrop--list">
|
||||
{{ range .Children }}
|
||||
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
|
||||
<hr />
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
16
themes/re-terminal/layouts/partials/pagination.html
Normal file
16
themes/re-terminal/layouts/partials/pagination.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a href="{{ .Paginator.Prev.URL }}" class="button previous">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">{{ $.Site.Params.newerPosts | default "Newer posts" }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a href="{{ .Paginator.Next.URL }}" class="button next">
|
||||
<span class="button__text">{{ $.Site.Params.olderPosts | default "Older posts" }}</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
26
themes/re-terminal/layouts/partials/posts_pagination.html
Normal file
26
themes/re-terminal/layouts/partials/posts_pagination.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{ if or .NextInSection .PrevInSection }}
|
||||
<div class="pagination">
|
||||
<div class="pagination__title">
|
||||
<span class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="pagination__buttons">
|
||||
{{ 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 }}
|
||||
{{ 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 }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
87
themes/re-terminal/layouts/partials/single_basic.html
Normal file
87
themes/re-terminal/layouts/partials/single_basic.html
Normal file
@@ -0,0 +1,87 @@
|
||||
<!--
|
||||
The single_basic.html partial layout in Jekyll allows you to create custom HTML, CSS, and JavaScript
|
||||
for individual pages on your site without modifying the default layout.
|
||||
This makes it easier to maintain consistency across your site
|
||||
while still allowing you to customize individual pages as needed.
|
||||
It also allows you to reuse the same code for multiple pages,
|
||||
making it a useful tool for creating custom widgets or demos that can be added to multiple pages on your site.
|
||||
|
||||
Take a look at https://gohugo.io/methods/page/layout/
|
||||
|
||||
# An example of `layouts/posts/foo.html`
|
||||
# Then you can use it as layout = "foo" in .MD files' meta in your `content/posts` folder
|
||||
{{ define "head" }}
|
||||
|
||||
###
|
||||
HERE INSERT ANY CUSTOM <script/> or <style/>
|
||||
###
|
||||
|
||||
{{ end }}{{ define "main" }}
|
||||
<div class="post">
|
||||
# The post itself
|
||||
{{ partial "single_basic.html" . }}
|
||||
|
||||
###
|
||||
HERE INSERT ANY CUSTOM HTML
|
||||
###
|
||||
|
||||
# Comments block
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }} {{ partial
|
||||
"posts_pagination.html" . }} {{ end }} {{ if not (.Params.hideComments |
|
||||
default false) }} {{ partial "comments.html" . }} {{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
-->
|
||||
|
||||
<h1 class="post-title">
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Params.Date }}
|
||||
<span class="post-date">
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ if $.Site.Params.showLastUpdated }}
|
||||
[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ with .Params }}
|
||||
<span class="post-author">
|
||||
{{ if .AuthorTwitter }}
|
||||
<a href="https://x.com/@{{ .AuthorTwitter }}" target="_blank">{{ .Author }}</a>
|
||||
{{ else }}
|
||||
{{ .Author }}
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
<!-- comments counter -->
|
||||
{{ partial "comments_counter.html" . }}
|
||||
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
||||
<span class="post-reading-time"> {{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urls.JoinPath "tags" (urlize .) "/") | absLangURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ partial "cover.html" (dict "ctx" . "isCoverCaptionEnabled" true) }}
|
||||
|
||||
{{ if (.Params.Toc | default .Site.Params.Toc) }}
|
||||
<div class="table-of-contents">
|
||||
<h2>
|
||||
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
|
||||
</h2>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{- with .Content -}}
|
||||
<div>
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
Reference in New Issue
Block a user