feat: update for doks v1.0.0-alpha.1
This commit is contained in:
@ -1,10 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1 class="text-center">{{ i18n "404-title" }}</h1>
|
||||
<p class="text-center">{{ i18n "404-text" }}</p>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1 +0,0 @@
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}" class="anchor" aria-hidden="true">#</a></h{{ .Level }}>
|
@ -1,32 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ .Site.Params.languageTag | default "en-US" }}">
|
||||
{{ partial "head/head.html" . }}
|
||||
{{ if eq .Kind "home" -}}
|
||||
{{ .Scratch.Set "class" "home" -}}
|
||||
{{ else if eq .Kind "404" -}}
|
||||
{{ .Scratch.Set "class" "error404" -}}
|
||||
{{ else if eq .Kind "page" -}}
|
||||
{{ .Scratch.Set "class" .Type -}}
|
||||
{{ .Scratch.Add "class" " single" -}}
|
||||
{{ else -}}
|
||||
{{ .Scratch.Set "class" .Type -}}
|
||||
{{ .Scratch.Add "class" " list" -}}
|
||||
{{ end -}}
|
||||
<body class="{{ .Scratch.Get "class" }}"{{ if eq .Site.Params.options.scrollSpy true }} data-bs-spy="scroll" data-bs-target="#toc" data-bs-root-margin="0px 0px -90%" data-bs-smooth-scroll="true" tabindex="0"{{ end }}>
|
||||
{{ partial "header/header.html" . }}
|
||||
<div class="wrap container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}" role="document">
|
||||
<div class="content">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ block "sidebar-prefooter" . }}{{ end }}
|
||||
{{ block "sidebar-footer" . }}{{ end }}
|
||||
{{ partial "footer/footer.html" . }}
|
||||
{{ partial "footer/script-footer.html" . }}
|
||||
{{ if eq .Site.Params.options.toTopButton true -}}
|
||||
<div class="d-flex fixed-bottom pb-4 pb-lg-5 pe-4 pe-lg-5">
|
||||
<a id="toTop" href="#" class="btn btn-outline-primary rounded-circle ms-auto p-2"><span class="visually-hidden">Top</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><polyline points="18 15 12 9 6 15"></polyline></svg></a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
var docs = [
|
||||
{{ range $index, $page := (where .Site.Pages "Section" "docs") -}}
|
||||
{
|
||||
id: {{ $index }},
|
||||
title: "{{ .Title }}",
|
||||
description: "{{ .Params.description }}",
|
||||
href: "{{ .URL | relURL }}"
|
||||
},
|
||||
{{ end -}}
|
||||
];
|
@ -1,5 +0,0 @@
|
||||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{- range .Site.RegularPages -}}
|
||||
{{- $.Scratch.Add "index" (dict "title" .Title "description" .Params.description "contents" .Plain "RelPermalink" .RelPermalink) -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
@ -1,32 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-9">
|
||||
<h1 class="text-center">{{ .Title }}</h1>
|
||||
{{ with .Content -}}<div class="text-center">{{ . }}</div>{{ end -}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 row-cols-lg-2 g-lg-5">
|
||||
{{ $paginator := .Paginate (.Data.Pages) -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
{{- .Scratch.Set "fillImage" "1270x620 Center" -}}
|
||||
{{ partial "content/card-image.html" . }}
|
||||
<div class="card-body">
|
||||
<article>
|
||||
<h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
|
||||
<p>{{ .Params.excerpt | safeHTML }}</p>
|
||||
{{ partial "main/blog-meta.html" . -}}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-9">
|
||||
{{ $.Scratch.Set "paginator" true }}
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,46 +0,0 @@
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML -}}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range $i, $e := .Data.Pages -}}
|
||||
{{ if ne .Params.sitemap_exclude true }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ range .Sections -}}
|
||||
{{ range $i, $e := .Data.Pages -}}
|
||||
{{ if ne .Params.sitemap_exclude true -}}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</urlset>
|
@ -1,10 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,20 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<h1 class="text-center">{{ .Title }}</h1>
|
||||
<div class="text-center">{{ .Content }}</div>
|
||||
<div class="card-list">
|
||||
{{ range .Paginator.Pages }}
|
||||
<div class="card card-terms my-3">
|
||||
<div class="card-body">
|
||||
<article>
|
||||
<a class="stretched-link" href="{{ .RelPermalink }}">{{ .Params.title | title }} →</a>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,27 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="lead">{{ .Params.lead | safeHTML }}</p>
|
||||
{{ .Content }}
|
||||
<div class="row">
|
||||
{{ range $release := sort (index $.Site.Data "docs-versions") "group" "desc" -}}
|
||||
<div class="col-md-8 col-lg-4 col-xl mb-4">
|
||||
<h2>{{ $release.group }}</h2>
|
||||
<p>{{ $release.description }}</p>
|
||||
{{ $versions := sort $release.versions "v" "desc" -}}
|
||||
{{ range $i, $version := $versions -}}
|
||||
{{ $len := len $versions -}}
|
||||
{{ if (eq $i 0) }}<div class="list-group">{{ end }}
|
||||
<a class="list-group-item list-group-item-action py-2 text-primary{{ if (eq $version.v $.Site.Params.docsVersion) }} d-flex justify-content-between align-items-center{{ end }}" href="{{ $release.baseurl }}/{{ $version.v }}/">
|
||||
{{ $version.v }}
|
||||
{{ if (eq $version.v $.Site.Params.docsVersion) -}}
|
||||
<span class="badge bg-primary">Latest</span>
|
||||
{{ end -}}
|
||||
</a>
|
||||
{{ if (eq (add $i 1) $len) }}</div>{{ end }}
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
@ -1,59 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<article>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10">
|
||||
<div class="blog-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ partial "main/blog-meta.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-13">
|
||||
<div>
|
||||
{{- .Scratch.Set "fillImage" "1270x715 Center" -}}
|
||||
{{ partial "content/figure.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-9">
|
||||
{{ .Content }}
|
||||
{{ if .Params.tags -}}
|
||||
<div class="mt-4">
|
||||
{{ range $index, $tag := .Params.tags -}}
|
||||
<a class="btn btn-light" href="{{ "/tags/" | absURL }}{{ . | urlize }}/" role="button">{{ . }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
{{ $related := .Site.RegularPages.Related . | first 3 -}}
|
||||
{{ with $related -}}
|
||||
<div class="related-posts">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col">
|
||||
<h2 class="section-title">Related posts</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-lg-5">
|
||||
{{ range . -}}
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
{{- .Scratch.Set "fillImageCard" "1270x620 Center" -}}
|
||||
{{ partial "content/card-image.html" . }}
|
||||
<div class="card-body">
|
||||
<article>
|
||||
<h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
|
||||
<p>{{ .Params.excerpt | safeHTML }}</p>
|
||||
{{ partial "main/blog-meta.html" . -}}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1 class="text-center">{{ if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}</h1>
|
||||
<div class="text-center">{{ .Content }}</div>
|
||||
<div class="card-list">
|
||||
{{ $currentSection := .CurrentSection }}
|
||||
{{ range where .Site.RegularPages.ByTitle "Section" .Section }}
|
||||
{{ if in (.RelPermalink | string) $currentSection.RelPermalink }}
|
||||
<div class="card my-3">
|
||||
<div class="card-body">
|
||||
<a class="stretched-link" href="{{ .RelPermalink }}">{{ .Params.title | title }} →</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,53 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-lg-5 col-xl-4 docs-sidebar{{ if ne .Site.Params.options.navbarSticky true }} docs-sidebar-top{{ end }} d-none d-lg-block">
|
||||
<nav {{ if eq .Site.Params.menu.section.collapsibleSidebar false }}id="sidebar-default" {{ end }}class="docs-links" aria-label="Main navigation">
|
||||
{{ partial "sidebar/docs-menu.html" . }}
|
||||
</nav>
|
||||
</div>
|
||||
{{ if ne .Params.toc false -}}
|
||||
<nav class="docs-toc{{ if ne .Site.Params.options.navbarSticky true }} docs-toc-top{{ end }} d-none d-xl-block col-xl-3" aria-label="Secondary navigation">
|
||||
{{ partial "sidebar/docs-toc.html" . }}
|
||||
</nav>
|
||||
{{ end -}}
|
||||
{{ if .Params.toc -}}
|
||||
<main class="docs-content col-lg-11 col-xl{{ if eq .Site.Params.options.fullWidth false }}-9{{ end }}">
|
||||
{{ else -}}
|
||||
<main class="docs-content col-lg-11 col-xl-9 mx-xl-auto">
|
||||
{{ end -}}
|
||||
{{ if .Site.Params.options.breadCrumb -}}
|
||||
<!-- https://discourse.gohugo.io/t/breadcrumb-navigation-for-highly-nested-content/27359/6 -->
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
{{ partial "main/breadcrumb" . -}}
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ .Title }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{{ end }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="lead">{{ .Params.lead | safeHTML }}</p>
|
||||
{{ if ne .Params.toc false -}}
|
||||
<nav class="d-xl-none" aria-label="Quaternary navigation">
|
||||
{{ partial "sidebar/docs-toc.html" . }}
|
||||
</nav>
|
||||
{{ end -}}
|
||||
{{ .Content }}
|
||||
<div class="page-footer-meta d-flex flex-column flex-md-row justify-content-between">
|
||||
{{ if .Site.Params.lastMod -}}
|
||||
{{ partial "main/last-modified.html" . }}
|
||||
{{ end -}}
|
||||
{{ if .Site.Params.editPage -}}
|
||||
{{ partial "main/edit-page.html" . }}
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ partial "main/docs-navigation.html" . }}
|
||||
<!--
|
||||
{{ if not .Site.Params.options.collapsibleSidebar -}}
|
||||
{{ partial "main/docs-navigation.html" . }}
|
||||
{{ else -}}
|
||||
<div class="my-n3"></div>
|
||||
{{ end -}}
|
||||
-->
|
||||
</main>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
|
||||
X-Content-Type-Options: nosniff
|
||||
X-XSS-Protection: 1; mode=block
|
||||
Content-Security-Policy: default-src 'self'; frame-ancestors https://jamstackthemes.dev; manifest-src 'self' https://*.netlify.app; connect-src 'self' https://*.netlify.app; font-src 'self' https://*.netlify.app; img-src 'self' https://*.netlify.app data: https://i.giphy.com; script-src 'self' https://*.netlify.app 'sha512-RGGByJUOP98hE4wFZM78RM/3MijWJs0Tm0DbfrFhCDCXKXfDx60fii+syp5iMs3UcNX/1H4zJNgmqSejfhHrYw==' 'sha512-RBYr6Ld4w1yVqaACrgrBLQfPgGhj/1jyacA74WxJ1KM6KVcSWymwrdDwb3HDcdpwiNJ5yssot1He0U9vXoQVlg==' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk=' 'sha256-vOgyKS2vkH4n5TxBJpeh9SgzrE6LVGsAeOAvEST6oCc='; style-src 'self' https://*.netlify.app 'unsafe-inline'
|
||||
X-Frame-Options: SAMEORIGIN
|
||||
Referrer-Policy: strict-origin
|
||||
Feature-Policy: geolocation 'self'
|
||||
Cache-Control: public, max-age=31536000
|
||||
Access-Control-Allow-Origin: *
|
@ -1,61 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<section class="section container-fluid mt-n3 pb-3">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h1 class="mt-0">{{ .Title }}</h1>
|
||||
</div>
|
||||
<div class="col-lg-9 col-xl-8 text-center">
|
||||
<p class="lead">{{ .Params.lead | safeHTML }}</p>
|
||||
<a class="btn btn-primary btn-lg px-4 mb-2" href="/docs/{{ if .Site.Params.options.docsVersioning }}{{ .Site.Params.docsVersion }}/{{ end }}prologue/introduction/" role="button">{{ i18n "get-started" }}</a>
|
||||
<p class="meta">Open-source MIT Licensed. <a href="https://github.com/h-enk/doks">GitHub v{{ $data := getJSON "/package.json" }}{{ $data.version }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ define "sidebar-prefooter" }}
|
||||
{{ if eq $.Site.Language.LanguageName "English" }}
|
||||
<section class="section section-sm">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4">Security aware</h2>
|
||||
<p>Get A+ scores on <a href="https://observatory.mozilla.org/analyze/doks.netlify.app">Mozilla Observatory</a> out of the box. Easily change the default Security Headers to suit your needs.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4">Fast by default ⚡️</h2>
|
||||
<p>Get 100 scores on <a href="https://googlechrome.github.io/lighthouse/viewer/?gist=59aafe464a68f8bc30b8e9a636d5b053">Google Lighthouse</a> by default. Doks removes unused css, prefetches links, and lazy loads images.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4">SEO-ready</h2>
|
||||
<p>Use sensible defaults for structured data, open graph, and Twitter cards. Or easily change the SEO settings to your liking.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4">Full text search</h2>
|
||||
<p>Search your Doks site with FlexSearch. Easily customize index settings and search options to your liking.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4">Page layouts</h2>
|
||||
<p>Build pages with a landing page, blog, or documentation layout. Add custom sections and components to suit your needs.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4">Dark mode</h2>
|
||||
<p>Switch to a low-light UI with the click of a button. Change colors with variables to match your branding.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "sidebar-footer" }}
|
||||
<section class="section section-sm container-fluid">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-9">
|
||||
{{- .Content -}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
@ -1,13 +0,0 @@
|
||||
{{- range $p := .Site.Pages -}}
|
||||
{{- range .Aliases }}
|
||||
{{ . }} {{ $p.RelPermalink }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
# /docs/1.0/prologue/ /docs/1.0/prologue/introduction/
|
||||
# /docs/1.0/help/ /docs/1.0/help/how-to-update/
|
||||
# /docs/1.0/ /docs/1.0/prologue/introduction/
|
||||
# /docs/ /docs/1.0/prologue/introduction/
|
||||
#
|
||||
# /docs/0.1/* https://v0-1-0--doks-versioning-poc.netlify.app/docs/0.1/:splat 200
|
||||
# /docs/0.2/* https://v0-2-0--doks-versioning-poc.netlify.app/docs/0.2/:splat 200
|
@ -1,22 +0,0 @@
|
||||
{{ $fillImage := .Scratch.Get "fillImageCard" }}
|
||||
{{ if not $fillImage -}}
|
||||
{{ $fillImage = site.Params.fillImage }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
|
||||
{{ if not $image -}}
|
||||
{{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $webp := printf "%s%s" $fillImage " webp" }}
|
||||
{{ $image = $image.Resize $webp}}
|
||||
|
||||
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
|
||||
|
||||
<img
|
||||
class="card-img-top img-fluid lazyload blur-up"
|
||||
src="{{ $lqip.Permalink }}"
|
||||
data-src="{{ $image.Permalink }}"
|
||||
width="{{ $image.Width }}"
|
||||
height="{{ $image.Height }}"
|
||||
alt="{{ .Title }}">
|
@ -1,37 +0,0 @@
|
||||
{{ $fillImage := .Scratch.Get "fillImage" }}
|
||||
{{ if not $fillImage -}}
|
||||
{{ $fillImage = site.Params.fillImage }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
|
||||
{{ if not $image -}}
|
||||
{{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $image = $image.Fill $fillImage }}
|
||||
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
|
||||
|
||||
{{ $imgSrc := "" -}}
|
||||
{{ $imgSrcSet := slice -}}
|
||||
|
||||
{{ $widths := site.Params.landscapePhotoWidths -}}
|
||||
{{ if gt $image.Height $image.Width -}}
|
||||
{{ $widths = site.Params.portraitPhotoWidths -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ range $widths -}}
|
||||
{{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}}
|
||||
{{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}}
|
||||
{{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}}
|
||||
{{ end -}}
|
||||
{{ $imgSrcSet = (delimit $imgSrcSet ",") -}}
|
||||
|
||||
{{ if gt $image.Width site.Params.smallLimit -}}
|
||||
<figure class="figure">
|
||||
<img class="figure-img img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
|
||||
<noscript><img class="figure-img img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}"></noscript>
|
||||
<!-- {{ with .Title }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end -}} -->
|
||||
</figure>
|
||||
{{ else -}}
|
||||
<img class="img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
|
||||
{{ end -}}
|
@ -1,32 +0,0 @@
|
||||
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
|
||||
{{ if not $image -}}
|
||||
{{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $image = $image.Fill site.Params.fillImage }}
|
||||
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
|
||||
|
||||
{{ $imgSrc := "" -}}
|
||||
{{ $imgSrcSet := slice -}}
|
||||
|
||||
{{ $widths := site.Params.landscapePhotoWidths -}}
|
||||
{{ if gt $image.Height $image.Width -}}
|
||||
{{ $widths = site.Params.portraitPhotoWidths -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ range $widths -}}
|
||||
{{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}}
|
||||
{{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}}
|
||||
{{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}}
|
||||
{{ end -}}
|
||||
{{ $imgSrcSet = (delimit $imgSrcSet ",") -}}
|
||||
|
||||
{{ if gt $image.Width site.Params.smallLimit -}}
|
||||
<figure class="figure">
|
||||
<img class="figure-img img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
|
||||
<noscript><img class="figure-img img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}"></noscript>
|
||||
<!-- {{ with .Title }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end -}} -->
|
||||
</figure>
|
||||
{{ else -}}
|
||||
<img class="img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
|
||||
{{ end -}}
|
@ -1,18 +0,0 @@
|
||||
<footer class="footer text-muted">
|
||||
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 order-last order-lg-first">
|
||||
<ul class="list-inline">
|
||||
<li class="list-inline-item">{{ .Site.Params.footer | safeHTML }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-lg-8 order-first order-lg-last text-lg-end">
|
||||
<ul class="list-inline">
|
||||
{{ range .Site.Menus.footer -}}
|
||||
<li class="list-inline-item"><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
@ -1,119 +0,0 @@
|
||||
{{ $indexTemplate := resources.Get "js/index.js" -}}
|
||||
{{ $index := $indexTemplate | resources.ExecuteAsTemplate "index.js" . -}}
|
||||
|
||||
{{ $bs := resources.Get "js/bootstrap.js" -}}
|
||||
{{ $bs := $bs | js.Build -}}
|
||||
|
||||
{{ $highlight := resources.Get "js/highlight.js" -}}
|
||||
{{ $highlight := $highlight | js.Build -}}
|
||||
|
||||
{{ $katex := resources.Get "js/vendor/katex/dist/katex.js" -}}
|
||||
{{ $katexAutoRender := resources.Get "js/vendor/katex/dist/contrib/auto-render.js" -}}
|
||||
|
||||
{{ $mermaid := resources.Get "js/mermaid.js" | js.Build -}}
|
||||
|
||||
{{ $app := resources.Get "js/app.js" -}}
|
||||
|
||||
{{ $slice := slice $app -}}
|
||||
|
||||
{{ if .Site.Params.options.lazySizes -}}
|
||||
{{ $lazySizes := resources.Get "js/lazysizes.js" -}}
|
||||
{{ $lazySizes := $lazySizes | js.Build -}}
|
||||
{{ $slice = $slice | append $lazySizes -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Site.Params.options.clipBoard -}}
|
||||
{{ $clipBoard := resources.Get "js/clipboard.js" -}}
|
||||
{{ $clipBoard := $clipBoard | js.Build -}}
|
||||
{{ $slice = $slice | append $clipBoard -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Site.Params.options.instantPage -}}
|
||||
{{ $instantPage := resources.Get "js/instant.page.js" -}}
|
||||
{{ $instantPage := $instantPage | js.Build -}}
|
||||
{{ $slice = $slice | append $instantPage -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ $showFlexSearch := .Site.Params.options.flexSearch }}
|
||||
|
||||
{{ if $showFlexSearch -}}
|
||||
{{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.bundle.js" -}}
|
||||
{{ $slice = $slice | append $flexSearch -}}
|
||||
{{ if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) -}}
|
||||
{{ $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Site.Params.options.darkMode -}}
|
||||
{{ $darkMode := resources.Get "js/darkmode.js" -}}
|
||||
{{ $darkMode := $darkMode | js.Build -}}
|
||||
{{ $slice = $slice | append $darkMode -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if and (.Site.Params.alert) (.Site.Params.alertDismissable) -}}
|
||||
{{ $alert := resources.Get "js/alert.js" -}}
|
||||
{{ $alert := $alert | js.Build -}}
|
||||
{{ $slice = $slice | append $alert -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .Site.Params.options.kaTex -}}
|
||||
{{ $katexConfig := resources.Get "js/katex.js" -}}
|
||||
{{ $katexConfig := $katexConfig | js.Build -}}
|
||||
{{ $slice = $slice | append $katexConfig -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ $scrollLock := resources.Get "js/scroll-lock.js" | js.Build -}}
|
||||
{{ $slice = $slice | append $scrollLock -}}
|
||||
|
||||
{{ if .Site.Params.options.toTopButton -}}
|
||||
{{ $toTopButton := resources.Get "js/to-top.js" -}}
|
||||
{{ $toTopButton := $toTopButton | js.Build -}}
|
||||
{{ $slice = $slice | append $toTopButton -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ $js := $slice | resources.Concat "main.js" -}}
|
||||
|
||||
{{ if eq (hugo.Environment) "development" -}}
|
||||
{{ if .Site.Params.options.bootStrapJs -}}
|
||||
<script src="{{ $bs.RelPermalink }}" defer></script>
|
||||
{{ end -}}
|
||||
{{ if .Site.Params.options.highLight -}}
|
||||
<script src="{{ $highlight.RelPermalink }}" defer></script>
|
||||
{{ end -}}
|
||||
{{ if .Site.Params.options.kaTex -}}
|
||||
<script src="{{ $katex.RelPermalink }}" defer></script>
|
||||
<script src="{{ $katexAutoRender.RelPermalink }}" onload="renderMathInElement(document.body);" defer></script>
|
||||
{{ end -}}
|
||||
<script src="{{ $js.RelPermalink }}" defer></script>
|
||||
{{ with .Params.mermaid -}}
|
||||
<script src="{{ $mermaid.RelPermalink }}" defer></script>
|
||||
{{ end -}}
|
||||
{{ if $showFlexSearch -}}
|
||||
<script src="{{ $index.RelPermalink }}" defer></script>
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ $js := $js | minify | fingerprint "sha512" -}}
|
||||
{{ $index := $index | minify | fingerprint "sha512" -}}
|
||||
{{ $bs := $bs | minify | fingerprint "sha512" -}}
|
||||
{{ $highlight := $highlight | minify | fingerprint "sha512" -}}
|
||||
{{ $katex := $katex | minify | fingerprint "sha512" -}}
|
||||
{{ $katexAutoRender := $katexAutoRender | minify | fingerprint "sha512" -}}
|
||||
{{ $mermaid := $mermaid | minify | fingerprint "sha512" -}}
|
||||
{{ if .Site.Params.options.bootStrapJs -}}
|
||||
<script src="{{ $bs.RelPermalink }}" integrity="{{ $bs.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{ end -}}
|
||||
{{ if .Site.Params.options.highLight -}}
|
||||
<script src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{ end -}}
|
||||
{{ if .Site.Params.options.kaTex -}}
|
||||
<script src="{{ $katex.RelPermalink }}" integrity="{{ $katex.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
<script src="{{ $katexAutoRender.RelPermalink }}" integrity="{{ $katexAutoRender.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{ end -}}
|
||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{ with .Params.mermaid -}}
|
||||
<script src="{{ $mermaid.RelPermalink }}" integrity="{{ $mermaid.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{ end -}}
|
||||
{{ if $showFlexSearch -}}
|
||||
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
@ -1 +0,0 @@
|
||||
<!-- Custom head -->
|
@ -1,9 +0,0 @@
|
||||
<meta name="theme-color" content="{{ $.Site.Params.themeColor }}">
|
||||
<link rel="icon" href="{{ "favicon.ico" | absURL }}" sizes="any">
|
||||
{{ if os.FileExists "static/favicon.svg" -}}
|
||||
<link rel="icon" type="image/svg+xml" href="{{ "favicon.svg" | absURL }}">
|
||||
{{ end -}}
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absURL }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absURL }}">
|
||||
<link rel="manifest" crossorigin="use-credentials" href="{{ "site.webmanifest" | absURL }}">
|
@ -1,11 +0,0 @@
|
||||
<head>
|
||||
<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">
|
||||
{{ block "head/resource-hints" . }}{{ partial "head/resource-hints.html" . }}{{ end }}
|
||||
{{ block "head/script-header" . }}{{ partial "head/script-header.html" . }}{{ end }}
|
||||
{{ block "head/stylesheet" . }}{{ partial "head/stylesheet.html" . }}{{ end }}
|
||||
{{ block "head/seo" . }}{{ partial "head/seo.html" . }}{{ end }}
|
||||
{{ block "head/favicons" . }}{{ partial "head/favicons.html" . }}{{ end }}
|
||||
{{ block "head/custom-head" . }}{{ partial "head/custom-head.html" . }}{{ end }}
|
||||
</head>
|
@ -1,69 +0,0 @@
|
||||
<meta property="og:locale" content="{{ .Site.Params.ogLocale }}">
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
||||
<meta property="og:title" content="{{ .Title }}">
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
{{ if $.Scratch.Get "paginator" -}}
|
||||
{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "blog" ) -}}
|
||||
<meta property="og:url" content="{{ .Paginator.URL | absURL }}">
|
||||
{{ else -}}
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.title -}}
|
||||
<meta property="og:site_name" content="{{ . }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ $iso8601 := "2006-01-02T15:04:05-07:00" -}}
|
||||
{{ if .IsPage -}}
|
||||
{{ if not .PublishDate.IsZero -}}
|
||||
<meta property="article:published_time" {{ .PublishDate.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{ else if not .Date.IsZero -}}
|
||||
<meta property="article:published_time" {{ .Date.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{ end -}}
|
||||
{{ if not .Lastmod.IsZero -}}
|
||||
<meta property="article:modified_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ if not .Date.IsZero -}}
|
||||
<meta property="og:updated_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq .Kind "home" -}}
|
||||
{{ .Scratch.Set "title" .Site.Params.titleHome -}}
|
||||
{{ else -}}
|
||||
{{ .Scratch.Set "title" .Title -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ with $.Params.images -}}
|
||||
{{ range first 6 . -}}
|
||||
<meta property="og:image" content="{{ $.Permalink }}{{ . }}">
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ $images := $.Resources.ByType "image" -}}
|
||||
{{ $featured := $images.GetMatch "*feature*" -}}
|
||||
{{ if not $featured -}}
|
||||
{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}
|
||||
{{ end -}}
|
||||
{{ with $featured -}}
|
||||
<meta property="og:image" content="{{ $featured.Permalink }}"/>
|
||||
{{ else -}}
|
||||
{{ with $.Site.Params.images -}}
|
||||
<meta property="og:image" content="{{ index . 0 | absURL }}"/>
|
||||
<meta property="og:image:alt" content="{{ $.Site.Params.title }}">
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ with $.Site.Params.images -}}
|
||||
{{ $.Scratch.Set "primaryImage" (index . 0 | absURL) -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Params.audio -}}
|
||||
<meta property="og:audio" content="{{ . | absURL }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Params.videos -}}
|
||||
{{ range . -}}
|
||||
<meta property="og:video" content="{{ . | absURL }}">
|
||||
{{ end -}}
|
||||
{{ end -}}
|
@ -1,7 +0,0 @@
|
||||
<link rel="preload" as="font" href="{{ "fonts/vendor/jost/jost-v4-latin-regular.woff2" | absURL }}" type="font/woff2" crossorigin>
|
||||
<link rel="preload" as="font" href="{{ "fonts/vendor/jost/jost-v4-latin-500.woff2" | absURL }}" type="font/woff2" crossorigin>
|
||||
<link rel="preload" as="font" href="{{ "fonts/vendor/jost/jost-v4-latin-700.woff2" | absURL }}" type="font/woff2" crossorigin>
|
||||
{{ if .Site.Params.options.kaTex -}}
|
||||
<link rel="preload" as="font" href="{{ "fonts/KaTeX_Main-Regular.woff2" | absURL }}" type="font/woff2" crossorigin>
|
||||
<link rel="preload" as="font" href="{{ "fonts/KaTeX_Math-Italic.woff2" | absURL }}" type="font/woff2" crossorigin>
|
||||
{{ end -}}
|
@ -1,8 +0,0 @@
|
||||
{{ if .Site.Params.options.darkMode -}}
|
||||
{{ $darkModeInit := resources.Get "js/darkmode-init.js" | js.Build | minify -}}
|
||||
<script>{{ $darkModeInit.Content | safeJS }}</script>
|
||||
{{ end -}}
|
||||
{{- if and (.Site.Params.alert) (.Site.Params.alertDismissable) -}}
|
||||
{{ $alertInit := resources.Get "js/alert-init.js" | js.Build | minify -}}
|
||||
<script>{{ $alertInit.Content | safeJS }}</script>
|
||||
{{- end -}}
|
@ -1,48 +0,0 @@
|
||||
{{ if eq .Kind "404" -}}
|
||||
<meta name="robots" content="noindex, follow">
|
||||
{{ else -}}
|
||||
{{ with .Params.robots -}}
|
||||
<meta name="robots" content="{{ . }}">
|
||||
{{ else -}}
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta name="googlebot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
|
||||
<meta name="bingbot" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .IsHome -}}
|
||||
<title>{{ .Site.Params.title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.titleAddition }}</title>
|
||||
{{ else -}}
|
||||
<title>{{ .Title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.title }}</title>
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Description -}}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ else -}}
|
||||
{{ with .Summary | plainify -}}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ else -}}
|
||||
<meta name="description" content="{{ .Site.Params.description }}">
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if $.Scratch.Get "paginator" }}
|
||||
<link rel="canonical" href="{{ .Paginator.URL | absURL }}">
|
||||
{{ if .Paginator.HasPrev -}}
|
||||
<link rel="prev" href="{{ .Paginator.Prev.URL | absURL }}">
|
||||
{{ end -}}
|
||||
{{ if .Paginator.HasNext -}}
|
||||
<link rel="next" href="{{ .Paginator.Next.URL | absURL }}">
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ partial "head/opengraph.html" . }}
|
||||
{{ partial "head/twitter_cards.html" . }}
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ partial "head/structured-data.html" . }}
|
@ -1,210 +0,0 @@
|
||||
{{ $baseURL := "/" | absURL -}}
|
||||
|
||||
{{ $dot := . -}}
|
||||
{{ $dot.Scratch.Set "path" "" -}}
|
||||
{{ $dot.Scratch.Set "breadcrumb" slice -}}
|
||||
|
||||
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" -}}
|
||||
{{ $.Scratch.Add "path" .Site.BaseURL -}}
|
||||
|
||||
{{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) -}}
|
||||
{{ range $index, $element := split $url "/" -}}
|
||||
{{ $dot.Scratch.Add "path" $element -}}
|
||||
{{ $.Scratch.Add "path" "/" -}}
|
||||
{{ if ne $element "" -}}
|
||||
{{ $.Scratch.Add "breadcrumb" (slice (dict "url" ($.Scratch.Get "path") "name" . "position" (add $index 2))) -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
"@type": "Organization",
|
||||
"@id": {{ print $baseURL "#/schema/organization/1" }},
|
||||
{{ else -}}
|
||||
"@type": "Person",
|
||||
"@id": {{ print $baseURL "#/schema/person/1" }},
|
||||
{{ end -}}
|
||||
"name": "{{ .Site.Params.schemaName }}",
|
||||
"url": {{ print $baseURL }},
|
||||
"sameAs": [
|
||||
{{ with .Site.Params.schemaTwitter -}}
|
||||
{{ . }}
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.schemaLinkedIn -}}
|
||||
, {{ . }}
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.schemaGitHub -}}
|
||||
, {{ . }}
|
||||
{{ end -}}
|
||||
],
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"@id": {{ print $baseURL "#/schema/image/1"}},
|
||||
"url": {{ print $baseURL .Site.Params.schemaLogo }},
|
||||
"width": {{ .Site.Params.schemaLogoWidth }},
|
||||
"height": {{ .Site.Params.schemaLogoHeight }},
|
||||
"caption": "{{ .Site.Params.schemaName }}"
|
||||
},
|
||||
"image": {
|
||||
"@id": {{ print $baseURL "#/schema/image/1" }}
|
||||
}
|
||||
{{ else -}}
|
||||
"image": {
|
||||
"@type": "ImageObject",
|
||||
"@id": {{ print $baseURL "#/schema/image/1"}},
|
||||
"url": {{ print $baseURL .Site.Params.schemaImage }},
|
||||
"width": {{ .Site.Params.schemaImageWidth }},
|
||||
"height": {{ .Site.Params.schemaImageHeight }},
|
||||
"caption": "{{ .Site.Params.schemaName }}"
|
||||
}
|
||||
{{ end -}}
|
||||
},
|
||||
{
|
||||
"@type": "WebSite",
|
||||
"@id": {{ print $baseURL "#/schema/website/1" }},
|
||||
"url": {{ print $baseURL }},
|
||||
"name": "{{ .Site.Params.title }}",
|
||||
"description": "{{ .Site.Params.description }}",
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
"publisher": {
|
||||
"@id": {{ print $baseURL "#/schema/organization/1" }}
|
||||
}
|
||||
{{ else -}}
|
||||
"publisher": {
|
||||
"@id": {{ print $baseURL "#/schema/person/1" }}
|
||||
}
|
||||
{{ end -}}
|
||||
},
|
||||
{
|
||||
{{ if and (ne .Kind "taxonomy") (ne .Kind "term") -}}
|
||||
"@type": "WebPage",
|
||||
{{ else -}}
|
||||
"@type": "CollectionPage",
|
||||
{{ end -}}
|
||||
"@id": {{ .Permalink }},
|
||||
"url": {{ .Permalink }},
|
||||
"name": "{{ .Title }}",
|
||||
"description": "{{ .Description }}",
|
||||
"isPartOf": {
|
||||
"@id": {{ print $baseURL "#/schema/website/1" }}
|
||||
},
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
"about": {
|
||||
"@id": {{ print $baseURL "#/schema/organization/1" }}
|
||||
},
|
||||
{{ else -}}
|
||||
"about": {
|
||||
"@id": {{ print $baseURL "#/schema/person/1" }}
|
||||
},
|
||||
{{ end -}}
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05CET" }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
|
||||
"breadcrumb": {
|
||||
"@id": {{ print .Permalink "#/schema/breadcrumb/1" }}
|
||||
},
|
||||
"primaryImageOfPage": {
|
||||
"@id": {{ print .Permalink "#/schema/image/2" }}
|
||||
},
|
||||
"inLanguage": "{{ .Site.Params.schemaLocale }}",
|
||||
"potentialAction": [{
|
||||
"@type": "ReadAction", "target": [{{ .Permalink }}]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"@type": "BreadcrumbList",
|
||||
"@id": {{ print .Permalink "#/schema/breadcrumb/1" }},
|
||||
"name": "Breadcrumbs",
|
||||
"itemListElement": [{{ $list := $.Scratch.Get "breadcrumb" }}{{ $len := (len $list) }}{{ range $index, $element := $list }}{{ if ne .position 1 }},{{ end }}{
|
||||
"@type": "ListItem",
|
||||
"position": {{ .position }},
|
||||
"item": {
|
||||
{{ if ne (add $index 1) $len -}}
|
||||
"@type": "WebPage",
|
||||
"@id": {{ .url }},
|
||||
"url": {{ .url }},
|
||||
"name": "{{ .name | humanize | title }}"
|
||||
{{ else -}}
|
||||
"@id": {{ .url }}
|
||||
{{ end -}}
|
||||
}
|
||||
}{{ end }}]
|
||||
},
|
||||
|
||||
{{ if and (eq .Kind "page") (or (eq .Section "blog") (eq .Section "docs") (eq .Section "tutorial") (eq .Section "showcase")) -}}
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "Article",
|
||||
"@id": {{ print $baseURL "#/schema/article/1" }},
|
||||
"headline": "{{ .Title }}",
|
||||
"description": "{{ .Description }}",
|
||||
"isPartOf": {
|
||||
"@id": {{ .Permalink }}
|
||||
},
|
||||
"mainEntityOfPage": {
|
||||
"@id": {{ .Permalink }}
|
||||
},
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05CET" }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
|
||||
"author": {
|
||||
"@id": {{ print $baseURL "#/schema/person/2" }}
|
||||
},
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
"publisher": {
|
||||
"@id": {{ print $baseURL "#/schema/organization/1" }}
|
||||
},
|
||||
{{ else -}}
|
||||
"publisher": {
|
||||
"@id": {{ print $baseURL "#/schema/person/1" }}
|
||||
},
|
||||
{{ end -}}
|
||||
"image": {
|
||||
"@id": {{ print .Permalink "#/schema/image/2" }}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": {{ print $baseURL "#/schema/person/2" }},
|
||||
"name": {{ .Site.Params.schemaAuthor }},
|
||||
"sameAs": [
|
||||
{{ with .Site.Params.schemaAuthorTwitter -}}
|
||||
{{ . }}
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.schemaAuthorLinkedIn -}}
|
||||
, {{ . }}
|
||||
{{ end -}}
|
||||
{{ with .Site.Params.schemaAuthorGitHub -}}
|
||||
, {{ . }}
|
||||
{{ end -}}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{{ end -}}
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "ImageObject",
|
||||
"@id": {{ print .Permalink "#/schema/image/2" }},
|
||||
"url": {{ $.Scratch.Get "primaryImage" }},
|
||||
"contentUrl": {{ $.Scratch.Get "primaryImage" }},
|
||||
"caption": "{{ .Title }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
</script>
|
@ -1,11 +0,0 @@
|
||||
{{ if eq (hugo.Environment) "development" -}}
|
||||
{{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}}
|
||||
{{ $css := resources.Get "scss/app.scss" | toCSS $options -}}
|
||||
<link rel="stylesheet" href="{{ $css.Permalink | relURL }}">
|
||||
{{ else -}}
|
||||
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}}
|
||||
{{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}}
|
||||
{{ $secureCSS := $css | resources.Fingerprint "sha512" -}}
|
||||
<link rel="stylesheet" href="{{ $secureCSS.Permalink }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end -}}
|
||||
<noscript><style>img.lazyload { display: none; }</style></noscript>
|
@ -1,24 +0,0 @@
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="{{ .Site.Params.twitterSite }}">
|
||||
<meta name="twitter:creator" content="{{ .Site.Params.twitterCreator }}">
|
||||
<meta name="twitter:title" content="{{ .Title }}">
|
||||
<meta name="twitter:description" content="{{ .Description }}">
|
||||
{{ with $.Params.images -}}
|
||||
<meta name="twitter:image" content="{{ $.Permalink }}{{ index . 0 }}">
|
||||
{{ else -}}
|
||||
{{ $images := $.Resources.ByType "image" -}}
|
||||
{{ $featured := $images.GetMatch "*feature*" -}}
|
||||
{{ if not $featured -}}
|
||||
{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" -}}
|
||||
{{ end -}}
|
||||
{{ with $featured -}}
|
||||
<meta name="twitter:image" content="{{ $featured.Permalink }}">
|
||||
{{ else -}}
|
||||
{{ with $.Site.Params.images -}}
|
||||
<meta name="twitter:image" content="{{ index . 0 | absURL }}">
|
||||
{{ else -}}
|
||||
<meta name="twitter:card" content="summary">
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
<meta name="twitter:image:alt" content="{{ .Title }}">
|
@ -1,10 +0,0 @@
|
||||
{{ if .Site.Params.alertDismissable -}}
|
||||
<div id="announcement" data-id="global-alert-{{ md5 .Site.Params.alertText }}" class="alert alert-primary alert-dismissible fade show text-lg-center" role="alert">
|
||||
{{ .Site.Params.alertText | safeHTML }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
{{ else -}}
|
||||
<div class="alert alert-primary text-lg-center" role="alert">
|
||||
{{ .Site.Params.alertText | safeHTML }}
|
||||
</div>
|
||||
{{ end -}}
|
@ -1,199 +0,0 @@
|
||||
{{ if .Site.Params.alert -}}
|
||||
{{ partial "header/alert.html" . }}
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq .Site.Params.options.navbarSticky true -}}
|
||||
<div class="sticky-top">
|
||||
{{ end -}}
|
||||
|
||||
<div class="header-bar"></div>
|
||||
|
||||
<header class="navbar navbar-expand-lg navbar-light doks-navbar">
|
||||
<nav class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} flex-wrap flex-lg-nowrap" aria-label="Main navigation">
|
||||
|
||||
<a class="navbar-brand order-0" href="{{ .Site.BaseURL | relLangURL }}" aria-label="{{ .Site.Params.Title }}">
|
||||
{{ .Site.Params.Title }}
|
||||
</a>
|
||||
|
||||
{{ if (in .Site.Params.sections.sectionNav .Section) -}}
|
||||
<button class="btn btn-link order-0 ms-auto d-lg-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>
|
||||
</button>
|
||||
<div class="offcanvas offcanvas-start d-lg-none" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
|
||||
<div class="header-bar"></div>
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="offcanvasExampleLabel">{{ i18n "browse" }} {{ .Section }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
<aside class="doks-sidebar mt-n3">
|
||||
<nav id="doks-docs-nav" aria-label="Tertiary navigation">
|
||||
{{ partial "sidebar/docs-menu.html" . }}
|
||||
</nav>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
||||
|
||||
<button class="btn btn-menu order-2 d-block d-lg-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasDoks" aria-controls="offcanvasDoks" aria-label="Open main menu">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
|
||||
</button>
|
||||
<div class="offcanvas offcanvas-end border-0 py-lg-1" tabindex="-1" id="offcanvasDoks" data-bs-backdrop="true" aria-labelledby="offcanvasDoksLabel">
|
||||
<div class="header-bar d-lg-none"></div>
|
||||
<div class="offcanvas-header d-lg-none">
|
||||
<h2 class="h5 offcanvas-title ps-2" id="offcanvasDoksLabel"><a class="text-dark" href="{{ "/" | relLangURL }}">{{ .Site.Params.Title }}</a></h2>
|
||||
<button type="button" class="btn-close text-reset me-2" data-bs-dismiss="offcanvas" aria-label="Close main menu"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body p-4 p-lg-0">
|
||||
<ul class="nav flex-column flex-lg-row align-items-lg-center mt-2 mt-lg-0 ms-lg-2 me-lg-auto">
|
||||
{{- $current := . -}}
|
||||
{{- $section := $current.Section -}}
|
||||
{{ range .Site.Menus.main -}}
|
||||
{{- $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) -}}
|
||||
{{- $active = or $active (eq .Name $current.Title) -}}
|
||||
{{- $active = or $active (and (eq .Name ($section | humanize)) (eq $current.Section $section)) -}}
|
||||
{{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "contributors" "categories" "tags")) -}}
|
||||
{{ if .HasChildren }}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle ps-0 py-1" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ .Name }}
|
||||
<span class="dropdown-caret"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-main shadow rounded border-0" aria-labelledby="navbarDropdownMenuLink">
|
||||
{{ range .Children -}}
|
||||
{{- $active = eq .Name $current.Title -}}
|
||||
<li>
|
||||
<a class="dropdown-item{{ if $active }} active{{ end }}" href="{{ .URL | relLangURL }}"{{ if $active }} aria-current="true"{{ end }}>{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link ps-0 py-1{{ if $active }} active{{ end }}" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
</ul>
|
||||
|
||||
{{- $showFlexSearch := .Site.Params.options.flexSearch }}
|
||||
{{- if $showFlexSearch }}
|
||||
{{- if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) }}
|
||||
{{- $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if $showFlexSearch -}}
|
||||
<hr class="text-black-50 my-4 d-lg-none">
|
||||
<form class="doks-search position-relative flex-grow-1 ms-lg-auto me-lg-2">
|
||||
<input id="search" class="form-control is-search" type="search" placeholder="{{ i18n "search-text" }}" aria-label="{{ i18n "search-text" }}" autocomplete="off">
|
||||
<div id="suggestions" class="shadow bg-white rounded d-none"></div>
|
||||
</form>
|
||||
{{ end -}}
|
||||
|
||||
<hr class="text-black-50 my-4 d-lg-none">
|
||||
<ul class="nav flex-column flex-lg-row">
|
||||
{{ range .Site.Menus.social -}}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link social-link" href="{{ .URL | relURL }}">{{ .Pre | safeHTML }}<small class="ms-2 d-lg-none">{{ .Name | safeHTML }}</small></a>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
|
||||
{{ if .Site.Params.options.darkMode -}}
|
||||
<hr class="text-black-50 my-4 d-lg-none">
|
||||
<button id="mode" class="btn btn-link" type="button" aria-label="Toggle user interface mode">
|
||||
<span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span>
|
||||
<span class="toggle-light"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg></span>
|
||||
</button>
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq .Site.Params.options.multilingualMode true -}}
|
||||
<hr class="text-black-50 my-4 d-lg-none">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-doks-light dropdown-toggle" id="doks-languages" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static">
|
||||
{{ .Site.Params.languageName }}
|
||||
<span class="dropdown-caret"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-lg-end me-lg-2 shadow rounded border-0" aria-labelledby="doks-languages">
|
||||
|
||||
<li><a class="dropdown-item current" aria-current="true" href="{{ .RelPermalink }}">{{ .Site.Language.LanguageName }}</a></li>
|
||||
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
|
||||
{{ if .IsTranslated -}}
|
||||
{{ range .Translations }}
|
||||
<li><a class="dropdown-item" rel="alternate" href="{{ .RelPermalink }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ range .Site.Languages -}}
|
||||
{{ if ne $.Site.Language.Lang .Lang }}
|
||||
<li><a class="dropdown-item" rel="alternate" href="{{ .Lang | relLangURL }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .LanguageName }}</a></li>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
<!--
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="/docs/contributing/how-to-contribute/">Help Translate</a></li>
|
||||
-->
|
||||
</ul>
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq .Site.Params.options.docsVersioning true -}}
|
||||
<hr class="text-black-50 my-4 d-lg-none">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-doks-light dropdown-toggle" id="doks-versions" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static" aria-label="Toggle version menu">
|
||||
<span class="d-none">Doks</span> v{{ .Site.Params.docsVersion }}
|
||||
<span class="dropdown-caret"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-lg-end me-lg-2 shadow rounded border-0" aria-labelledby="doks-versions">
|
||||
<li><a class="dropdown-item current" aria-current="true" href="/docs/{{ .Site.Params.docsVersion }}/prologue/introduction/">Latest ({{ .Site.Params.docsVersion }}.x)</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="/docs/0.2/prologue/introduction/">v0.2.x</a></li>
|
||||
<li><a class="dropdown-item" href="/docs/0.1/prologue/introduction/">v0.1.x</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="/docs/versions/">All versions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
{{ if eq .Site.Params.options.navbarSticky true }}
|
||||
</div>
|
||||
{{ end -}}
|
||||
|
||||
{{ if eq .Section "docs" -}}
|
||||
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
|
||||
<aside class="doks-sidebar">
|
||||
<nav id="doks-docs-nav" class="collapse d-lg-none" aria-label="Tertiary navigation">
|
||||
{{ partial "sidebar/docs-menu.html" . }}
|
||||
</nav>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
{{ else if ne .CurrentSection .FirstSection -}}
|
||||
<!--
|
||||
<nav class="doks-subnavbar py-2 sticky-lg-top d-lg-none" aria-label="Secondary navigation">
|
||||
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} d-flex align-items-lg-center">
|
||||
<span class="navbar-text ms-0">{{ .Section | humanize }}</span>
|
||||
<button class="btn doks-sidebar-toggle d-lg-none ms-auto order-3 collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#doks-docs-nav" aria-controls="doks-docs-nav" aria-expanded="false" aria-label="Toggle documentation navigation">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="doks doks-expand" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Expand</title><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="doks doks-collapse" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Collapse</title><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline></svg>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
-->
|
||||
|
||||
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
|
||||
<aside class="doks-sidebar">
|
||||
<nav id="doks-docs-nav" class="collapse d-lg-none" aria-label="Tertiary navigation">
|
||||
{{ partial "sidebar/docs-menu.html" . }}
|
||||
</nav>
|
||||
</aside>
|
||||
</div>
|
||||
{{ end -}}
|
@ -1,2 +0,0 @@
|
||||
{{ $last := sub (len .Params.contributors) 1 }}
|
||||
<p><small>Posted{{ if .Params.categories -}} in {{ range $index, $category := .Params.categories -}}{{ if gt $index 0 -}}, {{ end -}}<a class="stretched-link position-relative link-muted" href="{{ "/categories/" | absURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}} on {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }}{{ if eq $index $last }} and {{ else }}, {{ end }}{{ end }}<a class="stretched-link position-relative" href="{{ "/contributors/" | relURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}} ‐ <strong>{{ .ReadingTime -}} min read</strong></small><p>
|
@ -1,4 +0,0 @@
|
||||
{{ with .Parent -}}
|
||||
{{ partial "main/breadcrumb.html" . -}}
|
||||
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ if .IsHome }}Home{{ else if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}</a></li>
|
||||
{{ end -}}
|
@ -1,6 +0,0 @@
|
||||
<!--
|
||||
Returns formatted date.
|
||||
Usage: partial "docs/date" (dict "Date" .Date "Format" .Site.Params.BookDateFormat)
|
||||
-->
|
||||
{{ $format := default "January 2, 2006" .Format -}}
|
||||
{{ return (.Date.Format $format) -}}
|
@ -1,24 +0,0 @@
|
||||
{{ if or .Prev .Next -}}
|
||||
<div class="docs-navigation d-flex justify-content-between">
|
||||
<!-- https://www.feliciano.tech/blog/custom-sort-hugo-single-pages/ -->
|
||||
{{ $pages := where site.RegularPages "Section" .Section -}}
|
||||
{{ with $pages.Next . -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<div class="card my-1">
|
||||
<div class="card-body py-2">
|
||||
← {{ .Title }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ end -}}
|
||||
{{ with $pages.Prev . -}}
|
||||
<a class="ms-auto" href="{{ .RelPermalink }}">
|
||||
<div class="card my-1">
|
||||
<div class="card-body py-2">
|
||||
{{ .Title }} →
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
@ -1,34 +0,0 @@
|
||||
{{ $parts := slice .Site.Params.docsRepo }}
|
||||
|
||||
{{ if (eq .Site.Params.repoHost "GitHub") }}
|
||||
{{ $parts = $parts | append "blob" .Site.Params.docsRepoBranch }}
|
||||
{{ else if (eq .Site.Params.repoHost "Gitea") }}
|
||||
{{ $parts = $parts | append "_edit" .Site.Params.docsRepoBranch }}
|
||||
{{ else if (eq .Site.Params.repoHost "GitLab") }}
|
||||
{{ $parts = $parts | append "-/blob" .Site.Params.docsRepoBranch }}
|
||||
{{ else if (eq .Site.Params.repoHost "Bitbucket") }}
|
||||
{{ $parts = $parts | append "src" .Site.Params.docsRepoBranch }}
|
||||
{{ else if (eq .Site.Params.repoHost "BitbucketServer") }}
|
||||
{{ $parts = $parts | append "browse" .Site.Params.docsRepoBranch }}
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Site.Params "docsreposubpath" }}
|
||||
{{ if not (eq .Site.Params.docsRepoSubPath "") }}
|
||||
{{ $parts = $parts | append .Site.Params.docsRepoSubPath }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $filePath := replace .File.Path "\\" "/" }}
|
||||
|
||||
{{ $parts = $parts | append "content" .Lang $filePath }}
|
||||
|
||||
{{ $url := delimit $parts "/" }}
|
||||
|
||||
<div class="edit-page">
|
||||
<a href="{{ $url }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2">
|
||||
<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>
|
||||
</svg>
|
||||
Edit this page on {{ .Site.Params.repoHost }}
|
||||
</a>
|
||||
</div>
|
@ -1,10 +0,0 @@
|
||||
{{ if and .GitInfo .Site.Params.docsRepo -}}
|
||||
{{- $date := partial "main/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}}
|
||||
{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}}
|
||||
<div class="last-modified">
|
||||
<a href="{{ .Site.Params.docsRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>
|
||||
Last modified on {{ $date }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end -}}
|
@ -1,57 +0,0 @@
|
||||
<!-- Auto collapsible section menu -->
|
||||
<ul class="list-unstyled collapsible-sidebar">
|
||||
{{ $currentPage := . -}}
|
||||
{{ $section := $currentPage.Section -}}
|
||||
{{ range (where .Site.Sections "Section" "in" $section) }}
|
||||
{{ range .Sections }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li class="mb-1">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||
{{ .Title }}
|
||||
</button>
|
||||
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ md5 .Title }}">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
{{ range .Pages }}
|
||||
{{ if .IsNode }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li class="my-1 ms-3">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||
{{ .Title }}
|
||||
</button>
|
||||
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ md5 .Title }}">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
{{ range .Pages }}
|
||||
{{ if .IsNode }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li class="my-1 ms-3">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ md5 .Title }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||
{{ .Title }}
|
||||
</button>
|
||||
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ md5 .Title }}">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{ else }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
@ -1,37 +0,0 @@
|
||||
<!-- Auto default section menu -->
|
||||
{{ $currentPage := . -}}
|
||||
{{ $section := $currentPage.Section -}}
|
||||
{{ range (where .Site.Sections "Section" "in" $section) }}
|
||||
{{ range .Sections }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<h3 class="h6 text-uppercase mb-2">{{ .Title }}</h3>
|
||||
<ul class="list-unstyled">
|
||||
{{ range .Pages }}
|
||||
{{ if .IsNode }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<h4 class="h6 text-uppercase ms-3 mt-3 mb-2">{{ .Title }}</h4>
|
||||
<ul class="list-unstyled ms-3">
|
||||
{{ range .Pages }}
|
||||
{{ if .IsNode }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<h5 class="h6 text-uppercase mt-2 mb-2">{{ .Title }}</h5>
|
||||
<ul class="list-unstyled ms-3">
|
||||
{{ range .Pages }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ else }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ else }}
|
||||
{{ $active := in $currentPage.RelPermalink .RelPermalink }}
|
||||
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .Permalink }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
@ -1,9 +0,0 @@
|
||||
{{ if and .Site.Params.menu.section.auto .Site.Params.menu.section.collapsibleSidebar -}}
|
||||
{{ partial "sidebar/auto-collapsible-menu.html" . -}}
|
||||
{{ else if and .Site.Params.menu.section.auto (not .Site.Params.menu.section.collapsibleSidebar) -}}
|
||||
{{ partial "sidebar/auto-default-menu.html" . -}}
|
||||
{{ else if and (not .Site.Params.menu.section.auto) .Site.Params.menu.section.collapsibleSidebar -}}
|
||||
{{ partial "sidebar/manual-collapsible-menu.html" . -}}
|
||||
{{ else if and (not .Site.Params.menu.section.auto) (not .Site.Params.menu.section.collapsibleSidebar) -}}
|
||||
{{ partial "sidebar/manual-default-menu.html" . -}}
|
||||
{{ end -}}
|
@ -1,26 +0,0 @@
|
||||
{{ if and (ne .Params.toc false) (ne .TableOfContents "<nav id=\"TableOfContents\"></nav>") -}}
|
||||
<div class="d-xl-none">
|
||||
<button class="btn btn-outline-primary btn-sm doks-toc-toggle collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#onThisPage" aria-controls="doks-docs-nav" aria-expanded="false" aria-label="Toggle On this page navigation">
|
||||
<span>{{ i18n "on-this-page" }}</span>
|
||||
<span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" class="doks doks-expand" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Expand</title><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" class="doks doks-collapse" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><title>Collapse</title><polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline></svg>
|
||||
</span>
|
||||
</button>
|
||||
<div class="collapse" id="onThisPage">
|
||||
<div class="card card-body mt-3 py-1">
|
||||
<div class="page-links">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-links d-none d-xl-block">
|
||||
<h3>{{ i18n "on-this-page" }}</h3>
|
||||
{{ if eq .Site.Params.options.scrollSpy true -}}
|
||||
{{ .TableOfContents | replaceRE "<nav id=\"TableOfContents\">" "<nav id=\"toc\">" | safeHTML }}
|
||||
{{ else -}}
|
||||
{{ .TableOfContents }}
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
@ -1,63 +0,0 @@
|
||||
<!-- Manual collapsible section menu -->
|
||||
<ul class="list-unstyled collapsible-sidebar">
|
||||
{{ $currentPage := . -}}
|
||||
{{ $section := $currentPage.Section -}}
|
||||
{{ range (index .Site.Menus $section) -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
||||
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
||||
<li class="mb-1">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||
{{ .Name }}
|
||||
</button>
|
||||
{{ if .HasChildren -}}
|
||||
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
{{ range .Children -}}
|
||||
{{ if .HasChildren -}}
|
||||
<li class="my-1 ms-3">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||
{{ .Name }}
|
||||
</button>
|
||||
{{ if .HasChildren -}}
|
||||
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
{{ range .Children -}}
|
||||
{{ if .HasChildren -}}
|
||||
<li class="my-1 ms-3">
|
||||
<button class="btn btn-toggle align-items-center rounded collapsed" data-bs-toggle="collapse" data-bs-target="#section-{{ .Identifier }}" aria-expanded="{{ if $active }}true{{ else }}false{{ end }}">
|
||||
{{ .Name }}
|
||||
</button>
|
||||
{{ if .HasChildren -}}
|
||||
<div class="collapse{{ if $active }} show{{ end }}" id="section-{{ .Identifier }}">
|
||||
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small">
|
||||
{{ range .Children -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
||||
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
||||
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</li>
|
||||
{{ else -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
||||
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
||||
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</li>
|
||||
{{ else -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
||||
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
||||
<li><a class="docs-link rounded{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
@ -1,41 +0,0 @@
|
||||
<!-- Manual default section menu -->
|
||||
{{ $currentPage := . -}}
|
||||
{{ $section := $currentPage.Section -}}
|
||||
{{ range (index .Site.Menus $section) -}}
|
||||
<h3 class="h6 text-uppercase mb-2">{{ .Name }}</h3>
|
||||
{{ if .HasChildren -}}
|
||||
<ul class="list-unstyled">
|
||||
{{ range .Children -}}
|
||||
{{ if .HasChildren -}}
|
||||
<h4 class="h6 text-uppercase ms-3 mt-3 mb-2">{{ .Name }}</h4>
|
||||
{{ if .HasChildren -}}
|
||||
<ul class="list-unstyled ms-3">
|
||||
{{ range .Children -}}
|
||||
{{ if .HasChildren -}}
|
||||
<h5 class="h6 text-uppercase mt-2 mb-2">{{ .Name }}</h5>
|
||||
{{ if .HasChildren -}}
|
||||
<ul class="list-unstyled ms-3">
|
||||
{{ range .Children -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
||||
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
||||
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
||||
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
||||
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</ul>
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
|
||||
{{- $active = or $active (eq $currentPage.Section .Identifier) -}}
|
||||
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</ul>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
@ -1,7 +0,0 @@
|
||||
User-agent: *
|
||||
{{ if eq (hugo.Environment) "production" -}}
|
||||
Allow: /
|
||||
{{ else -}}
|
||||
Disallow: /
|
||||
{{ end }}
|
||||
Sitemap: {{ "sitemap.xml" | absURL -}}
|
@ -1,27 +0,0 @@
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<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>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.Params.languageTag | default "en-US" }}
|
||||
<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.Params.copyRight }}
|
||||
<copyright>{{ . | safeHTML }}</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 }}{{ if ne .Params.feed_exclude true }}
|
||||
<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>
|
||||
</item>
|
||||
{{ end }}{{ end }}
|
||||
</channel>
|
||||
</rss>
|
@ -1,12 +0,0 @@
|
||||
<div class="alert alert-{{ with .Get "context" }}{{.}}{{ else }}doks{{ end }} d-flex" role="alert">
|
||||
<div class="flex-shrink-1 alert-icon">{{ with .Get "icon" }}{{.}} {{ end }}</div>
|
||||
{{ with .Get "text"}}
|
||||
<div class="w-100">{{ . | safeHTML }} </div>
|
||||
{{ else }}
|
||||
{{ with .Inner}}
|
||||
<div class="w-100"> {{ . | markdownify}}</div>
|
||||
{{ else }}
|
||||
{{ errorf "No valid text variable or Inner content given"}}
|
||||
{{ end }}
|
||||
{{ end}}
|
||||
</div>
|
@ -1,4 +0,0 @@
|
||||
<details{{ with .Get 1 }} {{ . | safeHTML }}{{ end -}}>
|
||||
<summary>{{ with .Get 0 -}}{{ . | safeHTML }}{{ else -}}{{ errorf "No summary provided"}}{{ end -}}</summary>
|
||||
{{ with .Inner -}}{{ . | markdownify}}{{ else -}}{{ errorf "No details provided"}}{{ end -}}
|
||||
</details>
|
@ -1 +0,0 @@
|
||||
<script type="text/javascript" nonce="dXNlcj0iaGVsbG8iLGRvbWFpbj0iaGVua3ZlcmxpbmRlLmNvbSIsZG9jdW1lbnQud3JpdGUodXNlcisiQCIrZG9tYWluKTs=">user="{{ with .Get "user" }}{{.}}{{ end }}",domain="{{ with .Get "domain" }}{{.}}{{ end }}",document.write(user+"@"+domain);</script><noscript>{{ with .Get "user" }}{{.}}{{ end }} at {{ with .Get "domain" }}{{.}}{{ end }}</noscript>
|
@ -1,8 +0,0 @@
|
||||
{{ if .Page.Params.mermaid -}}
|
||||
<div class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ $data := replaceRE "(^\\s+```)" "" .Inner -}}
|
||||
{{ replaceRE "(```\\s+$)" "" $data -}}
|
||||
</div>
|
||||
{{ else -}}
|
||||
{{ errorf "Failed to process mermaid shortcode: %s. Set mermaid to true in page front matter." .Position }}
|
||||
{{ end -}}
|
@ -1,11 +0,0 @@
|
||||
<div class="ratio ratio-{{ with .Get "ratio" }}{{.}}{{ end }}">
|
||||
<video{{ with .Get "attributes" }} {{ . | safeHTMLAttr }}{{ end }}>
|
||||
{{ with .Get "webm-src" -}}
|
||||
<source src="{{ . | relURL }}" type="video/webm">
|
||||
{{ end -}}
|
||||
{{ with .Get "mp4-src" -}}
|
||||
<source src="{{ . | relURL }}" type="video/mp4">
|
||||
{{ end -}}
|
||||
Sorry, your browser doesn't support embedded videos.
|
||||
</video>
|
||||
</div>
|
@ -1,22 +0,0 @@
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Pages }}{{ if ne .Params.sitemap_exclude true }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{ end }}{{ end }}
|
||||
</urlset>
|
Reference in New Issue
Block a user