ADD hugo with pipline
This commit is contained in:
parent
45a317f7dd
commit
124e58c339
99 changed files with 4452 additions and 1 deletions
13
themes/gokarna/layouts/partials/footer.html
Normal file
13
themes/gokarna/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<footer class="footer">
|
||||
<!-- Option for user to inject custom html -->
|
||||
{{ if .Site.Params.CustomFooterHTML }}
|
||||
{{ .Site.Params.CustomFooterHTML | safeHTML }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.footer }}
|
||||
<span>© {{ now.Year }} {{ .Site.Params.Footer}}</span>
|
||||
{{ end }}
|
||||
<span>
|
||||
Made with ❤️ using <a target="_blank" href="https://github.com/526avijitgupta/gokarna">Gokarna</a>
|
||||
</span>
|
||||
</footer>
|
56
themes/gokarna/layouts/partials/head.html
Normal file
56
themes/gokarna/layouts/partials/head.html
Normal file
|
@ -0,0 +1,56 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--accent-color: {{ .Site.Params.AccentColor | default "#FF4D4D" }};
|
||||
}
|
||||
</style>
|
||||
|
||||
{{ $title := .Title | default .Site.Title }}
|
||||
{{ $description := .Description | default .Site.Params.Description }}
|
||||
{{ $image := .Params.image | default (.Scratch.Get "avatarImgSrc") }}
|
||||
{{ $siteKeywords := .Site.Params.MetaKeywords | default (slice) }}
|
||||
{{ $postKeywords := .Params.tags | default (slice) }}
|
||||
{{ $keywords := union $siteKeywords $postKeywords }}
|
||||
|
||||
<!-- SEO titles & descriptions -->
|
||||
<title>{{ $title }}</title>
|
||||
<meta name="description" content="{{ $description }}">
|
||||
<meta name="keywords" content='{{ delimit $keywords ", "}}'>
|
||||
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:description" content="{{ $description }}">
|
||||
<meta property="og:image" content="{{ absURL $image }}">
|
||||
<meta property="og:image:secure_url" content="{{ absURL $image }}">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
<meta name="twitter:description" content="{{ $description }}">
|
||||
<meta property="twitter:domain" content="{{ .Permalink }}">
|
||||
<meta property="twitter:url" content="{{ .Permalink }}">
|
||||
<meta name="twitter:image" content="{{ absURL $image }}">
|
||||
|
||||
<!-- SEO canonicals: helps Google understand your site better when using marketing campaign tagging etc -->
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
|
||||
{{ $cssNormalize := resources.Get "css/normalize.min.css" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $cssNormalize.RelPermalink }}" media="print">
|
||||
|
||||
{{ $cssMain := resources.Get "css/main.css" | minify }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $cssMain.RelPermalink }}">
|
||||
|
||||
{{ $cssDark := resources.Get "css/dark.css" | minify }}
|
||||
<link id="dark-theme" rel="stylesheet" href="{{ $cssDark.RelPermalink }}">
|
||||
|
||||
{{ $jsBundle := resources.Match "js/**.js" | resources.Concat "js/bundle.js" | minify | resources.Fingerprint "sha256" }}
|
||||
<script src="{{ $jsBundle.RelPermalink }}" integrity="{{ $jsBundle.Data.Integrity }}"></script>
|
||||
|
||||
<!-- Option for user to inject custom html -->
|
||||
{{ if .Site.Params.CustomHeadHTML }}
|
||||
{{ .Site.Params.CustomHeadHTML | safeHTML }}
|
||||
{{ end }}
|
||||
</head>
|
59
themes/gokarna/layouts/partials/header.html
Normal file
59
themes/gokarna/layouts/partials/header.html
Normal file
|
@ -0,0 +1,59 @@
|
|||
<header class="header">
|
||||
<nav class="header-nav">
|
||||
|
||||
{{ if isset .Site.Params "avatarurl" }}
|
||||
<div class="avatar">
|
||||
<a href="{{ .Site.BaseURL }}">
|
||||
<img src='{{ .Scratch.Get "avatarImgSrc" }}' alt="{{ .Site.Params.AvatarAltText|default "avatar" }}" />
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="nav-title">
|
||||
<a class="nav-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-links">
|
||||
{{ range .Site.Menus.main }}
|
||||
<div class="nav-link">
|
||||
<a href="{{ .URL | absURL }}">
|
||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<span class="nav-icons-divider"></span>
|
||||
<div class="nav-link dark-theme-toggle">
|
||||
<span id="dark-theme-toggle-screen-reader-target" class="sr-only"></span>
|
||||
<a>
|
||||
<span id="theme-toggle-icon" data-feather="moon"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="nav-link" id="hamburger-menu-toggle">
|
||||
<span id="hamburger-menu-toggle-screen-reader-target" class="sr-only">menu</span>
|
||||
<a>
|
||||
<span data-feather="menu"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- For mobile -->
|
||||
<ul class="nav-hamburger-list visibility-hidden">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="nav-item">
|
||||
<a href="{{ .URL | absURL }}">
|
||||
{{- .Pre | safeHTML }} {{ .Name }} {{ .Post | safeHTML -}}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="nav-item dark-theme-toggle">
|
||||
<span id="dark-theme-toggle-screen-reader-target" class="sr-only">theme</span>
|
||||
<a>
|
||||
<span id="theme-toggle-icon" data-feather="moon"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
5
themes/gokarna/layouts/partials/list-posts.html
Normal file
5
themes/gokarna/layouts/partials/list-posts.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<article class="post-title">
|
||||
<a href="{{ .Permalink }}" class="post-link">{{ .Title }}</a>
|
||||
<div class="flex-break"></div>
|
||||
<span class="post-date">{{ dateFormat "January 2, 2006" .Date }}</span>
|
||||
</article>
|
14
themes/gokarna/layouts/partials/list.html
Normal file
14
themes/gokarna/layouts/partials/list.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<div class="container list-posts">
|
||||
|
||||
<h1 class="list-title">{{ .Name }}</h1>
|
||||
|
||||
{{ range (where .Pages "Params.type" "post" ).GroupByDate "2006" }}
|
||||
|
||||
<h2 class="posts-year">{{ .Key }}</h2>
|
||||
|
||||
{{- range .Pages -}}
|
||||
{{- partial "list-posts.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
13
themes/gokarna/layouts/partials/page.html
Normal file
13
themes/gokarna/layouts/partials/page.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div class="post container">
|
||||
|
||||
<div class="post-header-section">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
34
themes/gokarna/layouts/partials/post.html
Normal file
34
themes/gokarna/layouts/partials/post.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<div class="post container">
|
||||
<div class="post-header-section">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<small role="doc-subtitle">{{ .Description }}</small>
|
||||
<p class="post-date">
|
||||
{{ dateFormat "January 2, 2006" .Date }}{{ if lt .Date .Lastmod }} | Updated {{ dateFormat "January 2, 2006" .Lastmod }}{{ end }}
|
||||
</p>
|
||||
|
||||
<ul class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
<li class="post-tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
{{ if .Site.DisqusShortname }}
|
||||
<div class="post-comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="prev-next">
|
||||
{{ if eq .Site.Params.TogglePreviousAndNextButtons "true" }}
|
||||
{{ if or .PrevInSection .NextInSection }}
|
||||
{{ partial "prev-next.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
29
themes/gokarna/layouts/partials/prev-next.html
Normal file
29
themes/gokarna/layouts/partials/prev-next.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{{ with .PrevInSection }}
|
||||
<div class="prev-post">
|
||||
<p>
|
||||
<a href="{{ .RelPermalink }}">
|
||||
←
|
||||
{{ i18n "previous" }}:
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</p>
|
||||
<p class="prev-post-date">
|
||||
{{ dateFormat "January 2, 2006" .Date }}
|
||||
</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .NextInSection }}
|
||||
<div class="next-post">
|
||||
<p>
|
||||
<a href="{{ .RelPermalink }}">
|
||||
{{ i18n "next" }}:
|
||||
{{ .Title }}
|
||||
→
|
||||
</a>
|
||||
</p>
|
||||
<p class="next-post-date">
|
||||
{{ dateFormat "January 2, 2006" .Date }}
|
||||
</p>
|
||||
</div>
|
||||
{{ end }}
|
7
themes/gokarna/layouts/partials/toc.html
Normal file
7
themes/gokarna/layouts/partials/toc.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ if .Params.ShowTableOfContents }}
|
||||
<aside class="post-toc">
|
||||
<nav id="toc">
|
||||
{{ .TableOfContents }}
|
||||
</nav>
|
||||
</aside>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue