Display available documentation nicely formatted in UI (#865)

Closes #748

Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
Co-authored-by: Sergio Castaño Arteaga <tegioz@icloud.com>
Co-authored-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
This commit is contained in:
Cynthia S. Garcia 2020-11-18 15:02:29 +01:00 committed by GitHub
parent 8df0cfb821
commit eb4d13b874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
75 changed files with 2494 additions and 37 deletions

5
.gitignore vendored
View File

@ -7,6 +7,11 @@ yarn-debug.log*
yarn-error.log* yarn-error.log*
node_modules/ node_modules/
web/build web/build
web/public/docs
web/coverage web/coverage
charts/artifact-hub/charts charts/artifact-hub/charts
Chart.lock Chart.lock
docs/www/content/topics/*
!docs/www/content/topics/annotations
docs/www/content/topics/annotations/*
!docs/www/content/topics/annotations/_index.md

View File

@ -13,6 +13,14 @@ COPY web .
RUN yarn install RUN yarn install
RUN yarn build RUN yarn build
# Build docs
FROM klakegg/hugo:0.78.2 AS docs-builder
WORKDIR /
COPY scripts scripts
COPY docs docs
RUN scripts/prepare-docs.sh
RUN cd docs/www && hugo
# Final stage # Final stage
FROM alpine:latest FROM alpine:latest
RUN apk --no-cache add ca-certificates && addgroup -S hub && adduser -S hub -G hub RUN apk --no-cache add ca-certificates && addgroup -S hub && adduser -S hub -G hub
@ -21,5 +29,6 @@ WORKDIR /home/hub
COPY --from=backend-builder /hub ./ COPY --from=backend-builder /hub ./
COPY --from=frontend-builder /web/build ./web COPY --from=frontend-builder /web/build ./web
COPY --from=frontend-builder /web/yarn.lock ./web COPY --from=frontend-builder /web/yarn.lock ./web
COPY --from=docs-builder /web/build/docs ./web/docs
CMD ["./hub"] CMD ["./hub"]
EXPOSE 8000 EXPOSE 8000

View File

@ -320,7 +320,9 @@ func (h *Handlers) setupRouter() {
// Static files and index // Static files and index
webBuildPath := h.cfg.GetString("server.webBuildPath") webBuildPath := h.cfg.GetString("server.webBuildPath")
staticFilesPath := path.Join(webBuildPath, "static") staticFilesPath := path.Join(webBuildPath, "static")
static.FileServer(r, "/static", staticFilesPath) docsFilesPath := path.Join(webBuildPath, "docs")
static.FileServer(r, "/static", staticFilesPath, static.StaticCacheMaxAge)
static.FileServer(r, "/docs", docsFilesPath, static.DocsCacheMaxAge)
r.Get("/image/{image}", h.Static.Image) r.Get("/image/{image}", h.Static.Image)
r.Get("/manifest.json", func(w http.ResponseWriter, r *http.Request) { r.Get("/manifest.json", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", helpers.BuildCacheControlHeader(5*time.Minute)) w.Header().Set("Cache-Control", helpers.BuildCacheControlHeader(5*time.Minute))

View File

@ -24,7 +24,8 @@ import (
const ( const (
indexCacheMaxAge = 5 * time.Minute indexCacheMaxAge = 5 * time.Minute
staticCacheMaxAge = 365 * 24 * time.Hour DocsCacheMaxAge = 15 * time.Minute
StaticCacheMaxAge = 365 * 24 * time.Hour
) )
// Handlers represents a group of http handlers in charge of handling // Handlers represents a group of http handlers in charge of handling
@ -99,7 +100,7 @@ func (h *Handlers) Image(w http.ResponseWriter, r *http.Request) {
} }
// Set headers and write image data to response writer // Set headers and write image data to response writer
w.Header().Set("Cache-Control", helpers.BuildCacheControlHeader(staticCacheMaxAge)) w.Header().Set("Cache-Control", helpers.BuildCacheControlHeader(StaticCacheMaxAge))
if svg.Is(data) { if svg.Is(data) {
w.Header().Set("Content-Type", "image/svg+xml") w.Header().Set("Content-Type", "image/svg+xml")
} else { } else {
@ -152,7 +153,7 @@ func (h *Handlers) ServeIndex(w http.ResponseWriter, r *http.Request) {
} }
// FileServer sets up a http.FileServer handler to serve static files. // FileServer sets up a http.FileServer handler to serve static files.
func FileServer(r chi.Router, public, static string) { func FileServer(r chi.Router, public, static string, cacheMaxAge time.Duration) {
if strings.ContainsAny(public, "{}*") { if strings.ContainsAny(public, "{}*") {
panic("FileServer does not permit URL parameters") panic("FileServer does not permit URL parameters")
} }
@ -170,7 +171,7 @@ func FileServer(r chi.Router, public, static string) {
w.WriteHeader(http.StatusNotFound) w.WriteHeader(http.StatusNotFound)
return return
} }
w.Header().Set("Cache-Control", helpers.BuildCacheControlHeader(staticCacheMaxAge)) w.Header().Set("Cache-Control", helpers.BuildCacheControlHeader(cacheMaxAge))
fsHandler.ServeHTTP(w, r) fsHandler.ServeHTTP(w, r)
})) }))
} }

View File

@ -93,7 +93,7 @@ func TestImage(t *testing.T) {
assert.Equal(t, http.StatusOK, resp.StatusCode) assert.Equal(t, http.StatusOK, resp.StatusCode)
assert.Equal(t, tc.expectedContentType, h.Get("Content-Type")) assert.Equal(t, tc.expectedContentType, h.Get("Content-Type"))
assert.Equal(t, helpers.BuildCacheControlHeader(staticCacheMaxAge), h.Get("Cache-Control")) assert.Equal(t, helpers.BuildCacheControlHeader(StaticCacheMaxAge), h.Get("Cache-Control"))
assert.Equal(t, imgData, data) assert.Equal(t, imgData, data)
hw.is.AssertExpectations(t) hw.is.AssertExpectations(t)
}) })
@ -158,7 +158,7 @@ func TestServeStaticFile(t *testing.T) {
hw := newHandlersWrapper() hw := newHandlersWrapper()
r := chi.NewRouter() r := chi.NewRouter()
staticFilesPath := path.Join(hw.h.cfg.GetString("server.webBuildPath"), "static") staticFilesPath := path.Join(hw.h.cfg.GetString("server.webBuildPath"), "static")
FileServer(r, "/static", staticFilesPath) FileServer(r, "/static", staticFilesPath, StaticCacheMaxAge)
s := httptest.NewServer(r) s := httptest.NewServer(r)
defer s.Close() defer s.Close()
@ -180,7 +180,7 @@ func TestServeStaticFile(t *testing.T) {
data, _ := ioutil.ReadAll(resp.Body) data, _ := ioutil.ReadAll(resp.Body)
assert.Equal(t, http.StatusOK, resp.StatusCode) assert.Equal(t, http.StatusOK, resp.StatusCode)
assert.Equal(t, helpers.BuildCacheControlHeader(staticCacheMaxAge), h.Get("Cache-Control")) assert.Equal(t, helpers.BuildCacheControlHeader(StaticCacheMaxAge), h.Get("Cache-Control"))
assert.Equal(t, []byte("testCssData\n"), data) assert.Equal(t, []byte("testCssData\n"), data)
}) })
} }

View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

12
docs/www/config.yaml Normal file
View File

@ -0,0 +1,12 @@
baseURL: /docs
languageCode: en-us
title: Artifact Hub documentation
theme: "hugo-geekdoc"
publishdir: ../../web/build/docs
build:
noJSConfigInAssets: false
useResourceCacheWhen: fallback
writeStats: false
params:
AuthorName: Artifact Hub Team
geekdocSearch: false

View File

@ -0,0 +1,22 @@
---
title: "Documentation"
weight: 1
---
# Welcome
Welcome to the [Artifact Hub](https://artifacthub.io/) documentation. Artifact Hub is a web-based application that enables finding, installing, and publishing Kubernetes packages.
The documentation is organized in the following topics:
|Topic|Description|
|-|-|
|[Repositories guide](/docs/topics/repositories)|The repositories guide explains how to add repositories to Artifact Hub, as well as other related concepts like Verified Publisher or Ownership Claim.|
|[Helm annotations](/docs/topics/annotations/helm)|Describes some custom annotations that allow enriching the existing metadata in Helm Charts to improve users' experience in Artifact Hub.|
|[OLM annotations](/docs/topics/annotations/olm)|Describes some custom annotations that allow enriching the existing metadata in OLM operators to improve users' experience in Artifact Hub.|
|[Packages security report](/docs/topics/security_report)|Explains how packages are scanned for security vulnerabilities and the structure of the security report.|
|[Development environment setup](/docs/topics/dev)|This guide will help contributors setup their development environment to do some work on Artifact Hub.|
|[Authorization](/docs/topics/authorization)|Explains how the authorization mechanism that allows organizations to define what actions can be performed by their members works and how to set it up.|

View File

@ -0,0 +1,6 @@
---
title: "Annotations"
weight: 2
params:
geekdocBreadcrumb: false
---

View File

@ -0,0 +1,7 @@
---
title: "Authorization"
weight: 5
aliases: [
"/authorization",
]
---

7
docs/www/headers/dev Normal file
View File

@ -0,0 +1,7 @@
---
title: "Development environment setup"
weight: 4
aliases: [
"/dev",
]
---

View File

@ -0,0 +1,7 @@
---
title: "Helm"
weight: 1
aliases: [
"/helm_annotations"
]
---

View File

@ -0,0 +1,7 @@
---
title: "OLM"
weight: 2
aliases: [
"/olm_annotations",
]
---

View File

@ -0,0 +1,7 @@
---
title: "Repositories"
weight: 1
aliases: [
"/repositories"
]
---

View File

@ -0,0 +1,7 @@
---
title: "Packages security report"
weight: 3
aliases: [
"/security_report",
]
---

View File

@ -0,0 +1,8 @@
{
"indent_size": 4,
"indent_char": " ",
"preserve_newlines": false,
"unformatted" : ["svg"],
"content_unformatted": ["pre"],
"extra_liners": ["head", "body", "html", "main", "header", "footer", "section"]
}

View File

@ -0,0 +1,5 @@
- BREAKING
- remove `geekblogAnchorLeft`;
for a better spacing left-side anchors were removed
- INTERNAL
- upgrade CI pipeline to use Hugo v0.74.3

View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2020 Robert Kaussow
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,18 @@
# Hugo Geekdoc Theme
[![Build Status](https://img.shields.io/drone/build/xoxys/hugo-geekdoc?logo=drone)](https://cloud.drone.io/xoxys/hugo-geekdoc)
[![Hugo Version](https://img.shields.io/badge/hugo-0.65-blue.svg)](https://gohugo.io)
[![GitHub release](https://img.shields.io/github/v/release/xoxys/hugo-geekdoc)](https://github.com/xoxys/hugo-geekdoc/releases/latest)
[![License: MIT](https://img.shields.io/github/license/xoxys/hugo-geekdoc)](LICENSE)
Geekdoc is a simple Hugo theme for documentations. This work is inspired and partially based on the [hugo-book](https://github.com/alex-shpak/hugo-book) theme. You can find a demo and the full documentation at [https://geekdocs.de](https://geekdocs.de).
![Screenshot](local_media/screenshot.png)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Maintainers and Contributors
[Robert Kaussow](https://github.com/xoxys)

View File

@ -0,0 +1 @@
v0.4.0

View File

@ -0,0 +1,7 @@
---
title: "{{ .Name | humanize | title }}"
weight: 1
# geekdocFlatSection: false
# geekdocToc: 6
# geekdocHidden: false
---

View File

@ -0,0 +1,4 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
---

View File

@ -0,0 +1,27 @@
'use strict';
(function() {
const indexCfg = {{ with .Scratch.Get "geekdocSearchConfig" }}
{{ . | jsonify}};
{{ else }}
{};
{{ end }}
indexCfg.doc = {
id: 'id',
field: ['title', 'content'],
store: ['title', 'href'],
};
const index = FlexSearch.create(indexCfg);
window.geekdocSearchIndex = index;
{{ range $index, $page := .Site.Pages }}
index.add({
'id': {{ $index }},
'href': '{{ $page.RelPermalink }}',
'title': {{ (partial "title" $page) | jsonify }},
'content': {{ $page.Plain | jsonify }}
});
{{- end -}}
})();

View File

@ -0,0 +1,66 @@
'use strict';
{{ $searchDataFile := printf "js/%s.search-data.js" .Language.Lang }}
{{ $searchData := resources.Get "js/search-data.js" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify | resources.Fingerprint }}
(function() {
const input = document.querySelector('#gdoc-search-input');
const results = document.querySelector('#gdoc-search-results');
input.addEventListener('focus', init);
input.addEventListener('keyup', search);
function init() {
input.removeEventListener('focus', init); // init once
input.required = true;
loadScript('{{ "js/flexsearch.min.js" | relURL }}');
loadScript('{{ $searchData.RelPermalink }}', function() {
input.required = false;
search();
});
}
function search() {
while (results.firstChild) {
results.removeChild(results.firstChild);
}
if (!input.value) {
console.log("empty")
results.classList.remove("has-hits");
return;
}
const searchHits = window.geekdocSearchIndex.search(input.value, 10);
console.log(searchHits.length);
if (searchHits.length > 0) {
results.classList.add("has-hits");
} else {
results.classList.remove("has-hits");
}
searchHits.forEach(function(page) {
const li = document.createElement('li'),
a = li.appendChild(document.createElement('a'));
a.href = page.href;
a.textContent = page.title;
results.appendChild(li);
results.classList.add("DUMMY");
});
}
function loadScript(src, callback) {
const script = document.createElement('script');
script.defer = true;
script.async = false;
script.src = src;
script.onload = callback;
document.head.appendChild(script);
}
})();

View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
<head>
{{ partial "head" . }}
</head>
<body>
{{ partial "svg-icon-symbols" . }}
<div class="wrapper">
{{ partial "site-header" (dict "Root" . "MenuEnabled" false) }}
<main class="gdoc-error flex-even">
<div class="flex align-center justify-center">
<div class="gdoc-error__icon">
<svg class="icon telescope"><use xlink:href="#telescope"></use></svg>
</div>
<div class="gdoc-error__message">
<div class="gdoc-error__line gdoc-error__title">Lost?</div>
<div class="gdoc-error__line gdoc-error__code">Error 404</div>
<div class="gdoc-error__line gdoc-error__help">
Seems like what you are looking for can't be found. Don't worry we can
bring you back to the <a class="gdoc-error__link" href="{{ .Site.BaseURL }}">homepage</a>.
</div>
</div>
</div>
</main>
{{ partial "site-footer" . }}
</div>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
<head>
{{ partial "head" . }}
</head>
<body>
{{ partial "svg-icon-symbols" . }}
<div class="wrapper">
<input type="checkbox" class="hidden" id="menu-control" />
{{ partial "site-header" (dict "Root" . "MenuEnabled" true) }}
<main class="container flex flex-even">
<aside class="gdoc-nav">
{{ partial "menu" . }}
</aside>
<div class="gdoc-page">
{{ template "main" . }}
{{ partial "page-footer" . }}
</div>
</main>
{{ partial "site-footer" . }}
</div>
{{ partial "foot" . }}
</body>
</html>

View File

@ -0,0 +1,7 @@
{{ define "main" }}
{{ partial "page-header" . }}
<article class="gdoc-markdown">
<!-- <h1>{{ partial "title" . }}</h1> -->
{{ partial "content" . }}
</article>
{{ end }}

View File

@ -0,0 +1,8 @@
{{ define "main" }}
{{ partial "page-header" . }}
<article class="gdoc-markdown">
<!-- <h1>{{ partial "title" . }}</h1> -->
{{ partial "content" . }}
</article>
{{ end }}

View File

@ -0,0 +1,10 @@
{{ $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Site.Params.GeekdocAnchor)) }}
{{ $.Scratch.Set "content" (.Content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML) }}
{{ if $showAnchor }}
{{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(<h[2-9] id=\"([^\"]+)\"[^>]*>)(.*?)(</h[2-9]+>)" (printf `<div class="gdoc-page__anchorwrap">%s%s<a data-clipboard-text="%s" class="gdoc-page__anchor gdoc-page__anchor--right clip" aria-label="Anchor %s" href="#%s"><svg class="icon link"><use xlink:href="#link"></use></svg></a>%s</div>` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${4}`) | safeHTML) }}
{{ end }}
{{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "<a href=\"https://github.com/artifacthub/hub/blob/master/docs/(.*?).md\">(.*?)</a>" (printf `<a href="/docs/%s">%s</a>` `${1}` `${2}`) | safeHTML) }}
{{ $.Scratch.Get "content" }}

View File

@ -0,0 +1,16 @@
{{ if default true .Site.Params.GeekdocSearch }}
{{ .Scratch.Set "geekdocSearchConfig" .Site.Params.GeekdocSearchConfig }}
<!-- Remove after https://github.com/gohugoio/hugo/issues/6331 -->
{{ $searchJSFile := printf "js/%s.search.js" .Language.Lang }}
{{ $searchJS := resources.Get "js/search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify }}
<script defer src="{{ $searchJS.RelPermalink }}"></script>
{{ end }}
{{ if default true .Site.Params.GeekdocAnchorCopy }}
<script defer src="{{ "js/clipboard.min.js" | relURL }}"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var clipboard = new ClipboardJS('.clip');
});
</script>
{{ end }}

View File

@ -0,0 +1,19 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ partial "title" . }}">
<title>{{ partial "title" . }} | {{ .Site.Title -}}</title>
<link rel="shortcut icon" type="image/png" href="/static/media/logo.png">
<link rel="apple-touch-icon" href="/static/media/logo192.png" />
<link rel="apple-touch-icon" sizes="512x512" href="/static/media/logo512.png" />
<link rel="stylesheet" href="/docs/main.min.css" media="screen">
<link rel="stylesheet" href="/docs/custom.css" media="screen">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ "<!--" | safeHTML -}}
Made with Geekdoc theme https://github.com/xoxys/hugo-geekdoc
{{- "-->" | safeHTML }}

View File

@ -0,0 +1,42 @@
{{ $current := .current }}
{{ template "menu-file" dict "sect" .source "current" $current "site" $current.Site }}
{{ define "menu-file" }}
{{ $current := .current }}
{{ $site := .site }}
<ul class="gdoc-nav__list">
{{ range sort (default (seq 0) .sect) "weight" }}
{{ $current.Scratch.Set "current" $current }}
{{ $current.Scratch.Set "site" $site }}
<li>
{{ $ref := default false .ref }}
{{ if $ref}}
{{ $site := $current.Scratch.Get "site" }}
{{ $this := $site.GetPage .ref }}
{{ $current := $current.Scratch.Get "current" }}
{{ $icon := default false .icon }}
<span class="flex">
{{ if $icon }}<svg class="icon {{ .icon }}"><use xlink:href="#{{ .icon }}"></use></svg>{{ end }}
<a href="{{ if .external }}{{ .ref }}{{ else }}{{ relref $current .ref }}{{ end }}"
class="gdoc-nav__entry {{ if not .external }}{{ if eq $current $this }}is-active{{ end }}{{ end }}">
{{ .name }}
</a>
</span>
{{ else }}
<span class="flex gdoc-nav__item">
{{ .name }}
</span>
{{ end }}
{{ $sub := default false .sub }}
{{ if $sub }}
{{ template "menu-file" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}

View File

@ -0,0 +1,32 @@
{{ $current := . }}
{{ template "tree-nav" dict "sect" .Site.Home.Sections "current" $current }}
<!-- templates -->
{{ define "tree-nav" }}
{{ $current := .current }}
<ul class="gdoc-nav__list">
{{ range .sect.GroupBy "Weight" }}
{{ range .ByTitle }}
{{ if not .Params.geekdocHidden }}
<li>
{{ if or .Content .Params.geekdocFlatSection }}
<span class="flex">
<a href="{{ .RelPermalink }}" class="gdoc-nav__entry {{ if eq $current . }}is-active{{ end }}">
{{ partial "title" . }}
</a>
</span>
{{ else }}
<span class="flex gdoc-nav__item">{{ partial "title" . }}</span>
{{ end }}
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{ if and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
{{ template "tree-nav" dict "sect" .Pages "current" $current}}
{{ end }}
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
{{ end }}

View File

@ -0,0 +1,28 @@
<nav>
{{ partial "search" . }}
{{ $root := "/docs/" }}
<section class="gdoc-nav--main">
<ul class="gdoc-nav__list">
<li>
<span class="flex">
<a href="{{ $root }}" class="gdoc-nav__entry gdoc-nav__entry-root {{ if eq $root .RelPermalink }}is-active{{ end }}">
Welcome
</a>
</span>
</li>
</ul>
{{ if .Site.Params.GeekdocMenuBundle }}
{{ partial "menu-bundle" (dict "current" . "source" .Site.Data.menu.main.main) }}
{{ else }}
{{ partial "menu-filetree" . }}
{{ end }}
</section>
<section class="gdoc-nav--more">
{{ if .Site.Data.menu.more.more }}
<h2>More</h2>
{{ partial "menu-bundle" (dict "current" . "source" .Site.Data.menu.more.more) }}
{{ end }}
</section>
</nav>

View File

@ -0,0 +1,60 @@
{{ $current := . }}
{{ $site := .Site }}
{{ $current.Scratch.Set "prev" false }}
{{ $current.Scratch.Set "getNext" false }}
{{ $current.Scratch.Set "nextPage" false }}
{{ $current.Scratch.Set "prevPage" false }}
{{ template "menu_nextprev" dict "sect" $.Site.Data.menu.main.main "current" $current "site" $site }}
{{ define "menu_nextprev" }}
{{ $current := .current }}
{{ $site := .site }}
{{ range sort (default (seq 0) .sect) "weight" }}
{{ $current.Scratch.Set "current" $current }}
{{ $current.Scratch.Set "site" $site }}
{{ $ref := default false .ref }}
{{ if $ref}}
{{ $site := $current.Scratch.Get "site" }}
{{ $this := $site.GetPage .ref }}
{{ $current := $current.Scratch.Get "current" }}
{{ if $current.Scratch.Get "getNext" }}
{{ $current.Scratch.Set "nextPage" (dict "name" .name "this" $this) }}
{{ $current.Scratch.Set "getNext" false }}
{{ end }}
{{ if eq $current $this }}
{{ $current.Scratch.Set "prevPage" ($current.Scratch.Get "prev") }}
{{ $current.Scratch.Set "getNext" true }}
{{ end }}
{{ $current.Scratch.Set "prev" (dict "name" .name "this" $this) }}
{{ end }}
{{ $sub := default false .sub }}
{{ if $sub }}
{{ template "menu_nextprev" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
{{ end }}
{{ end }}
{{ end }}
<div class="gdoc-page__footer flex flex-wrap justify-between">
{{ $showPrevNext := (and (default true .Site.Params.GeekdocNextPrev) .Site.Params.GeekdocMenuBundle) }}
{{ if $showPrevNext }}
<span class="gdoc-page__nav">
{{ with ($current.Scratch.Get "prevPage") }}
<a class="gdoc-page__nav--prev flex align-center" href="{{.this.RelPermalink}}" title="{{ .name }}"> {{ .name }}</a>
{{ end }}
</span>
<span class="gdoc-page__nav">
{{ with ($current.Scratch.Get "nextPage") }}
<a class="gdoc-page__nav--next flex align-center" href="{{.this.RelPermalink}}" title="{{ .name }}">{{ .name }} </a>
{{ end }}
</span>
{{ end }}
</div>

View File

@ -0,0 +1,40 @@
{{ $geekdocRepo := default (default false .Site.Params.GeekdocRepo) .Page.Params.GeekdocRepo }}
{{ $geekdocEditPath := default (default false .Site.Params.GeekdocEditPath) .Page.Params.GeekdocEditPath }}
{{ if .File }}
{{ $.Scratch.Set "geekdocFilePath" (default .File.Path .Page.Params.geekdocFilePath) }}
{{ else }}
{{ $.Scratch.Set "geekdocFilePath" false }}
{{ end }}
{{ define "breadcrumb" }}
{{ $parent := .page.Parent }}
{{ if $parent }}
{{ $name := (partial "title" $parent) }}
{{ $value := (printf "%s / %s" $name .value) }}
{{ template "breadcrumb" dict "page" $parent "value" $value }}
{{ else }}
{{ .value | safeHTML }}
{{ end }}
{{ end }}
{{ $showBreadcrumb := (and (default true .Page.Params.GeekdocBreadcrumb) (default true .Site.Params.GeekdocBreadcrumb)) }}
{{ $showEdit := (and ($.Scratch.Get "geekdocFilePath") $geekdocRepo $geekdocEditPath) }}
<div class="gdoc-page__header flex flex-wrap justify-between{{ if not $showEdit }} hidden-mobile{{ end }}{{ if (and (not $showBreadcrumb) (not $showEdit)) }} hidden {{ end }}" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<span>
{{if $showBreadcrumb }}
<span class="breadcrumb">
<svg class="icon path"><use xlink:href="#path"></use></svg>
{{ $name := (partial "title" .) }}
{{ template "breadcrumb" dict "page" . "value" $name }}
</span>
{{ end }}
</span>
<span>
{{ if $showEdit }}
<svg class="icon code"><use xlink:href="#code"></use></svg>
<a href="{{ $geekdocRepo }}/{{ $geekdocEditPath }}/{{ $.Scratch.Get "geekdocFilePath" }}">
Edit this page
</a>
{{ end }}
</span>
</div>

View File

@ -0,0 +1,13 @@
{{ if default true .Site.Params.GeekdocSearch }}
<div class="gdoc-search">
<svg class="icon search"><use xlink:href="#search"></use></svg>
<input type="text" id="gdoc-search-input" class="gdoc-search__input" placeholder="Search..."
aria-label="Search" maxlength="64" />
<div class="gdoc-search__spinner spinner hidden"></div>
<div class="gdoc-search__list">
<ul id="gdoc-search-results">
</ul>
<div class="gdoc-search__arrow"></div>
</div>
</div>
{{ end }}

View File

@ -0,0 +1,21 @@
<footer class="gdoc-footer">
<div class="container flex flex-wrap justify-between">
<div>
{{ with .Site.Params.GeekdocLegalNotice }}
<span class="gdoc-footer__item">
<a href="{{ . | relURL }}" class="gdoc-footer__link">Legal Notice</a>
</span>
{{ end }}
{{ with .Site.Params.GeekdocPrivacyPolicy }}
<span class="gdoc-footer__item">
<a href="{{ . | relURL }}" class="gdoc-footer__link">Privacy Policy</a>
</span>
{{ end }}
</div>
<div>
<span>
Copyright © The Artifact Hub Authors
</span>
</div>
</div>
</footer>

View File

@ -0,0 +1,17 @@
<header class="gdoc-header">
<div class="container flex align-center justify-between">
{{ if .MenuEnabled }}
<label for="menu-control" class="gdoc-nav__control">
<svg class="icon menu"><use xlink:href="#menu"></use></svg>
<svg class="icon arrow-back"><use xlink:href="#arrow_back"></use></svg>
</label>
{{ end }}
<a class="gdoc-header__link" href="/">
<span class="gdoc-brand flex align-center">
<img class="gdoc-brand__img" src="{{ (default "brand.svg" .Root.Site.Params.GeekdocLogo) | relURL }}" alt="{{ .Root.Site.Title }}" width=20 height=20>
Artifact <span class="gdoc-brand__hub">HUB</span>
<span class="gdoc-brand__badge">BETA</span>
</span>
</a>
</div>
</header>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -0,0 +1,11 @@
{{ $title := "" }}
{{ if .Title }}
{{ $title = .Title }}
{{ else if and .IsSection .File }}
{{ $title = path.Base .File.Dir | humanize | title }}
{{ else if and .IsPage .File }}
{{ $title = .File.BaseFileName | humanize | title }}
{{ end }}
{{ return $title }}

View File

@ -0,0 +1,21 @@
{{ define "main" }}
{{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
{{ range sort .Paginator.Pages }}
<article class="gdoc-markdown gdoc-post">
<header>
<h1 class="gdoc-post__title">
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h1>
<div class="gdoc-post__date">{{ .Date.Format $dateFormat }}</div>
</header>
<div>
{{ .Summary }}
{{ if .Truncated }}
<a class="gdoc-post__readmore" title="Read full post" href="{{ .RelPermalink }}">
Read full post
</a>
{{ end }}
</div>
</article>
{{ end }}
{{ end }}

View File

@ -0,0 +1,12 @@
{{ define "main" }}
{{ $dateFormat := default "January 2, 2006" .Site.Params.GeekdocDateFormat }}
<article class="gdoc-markdown gdoc-post">
<header>
<h1 class="gdoc-post__title">{{ .Title }}</h1>
<div class="gdoc-post__date">{{ .Date.Format $dateFormat }}</div>
</header>
<div>
{{ partial "content" . }}
</div>
</article>
{{ end }}

View File

@ -0,0 +1,17 @@
{{ $ref := "" }}
{{ $target := "" }}
{{ with .Get "href" }}
{{ $ref = . }}
{{ $target = "_blank" }}
{{ end }}
{{ with .Get "relref" }}
{{ $ref = relref $ . }}
{{ end }}
<span class="gdoc-button{{ with .Get "class" }} {{ . }}{{ end }}">
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="gdoc-button__link">
{{ $.Inner }}
</a>
</span>

View File

@ -0,0 +1,7 @@
<div class="gdoc-columns flex flex-wrap">
{{ range split .Inner "<--->" }}
<div class="gdoc-columns__content gdoc-markdown--nested flex-even">
{{ . | markdownify }}
</div>
{{ end }}
</div>

View File

@ -0,0 +1,11 @@
{{ $id := substr (sha1 .Inner) 0 8 }}
<div class="gdoc-expand">
<label class="gdoc-expand__head flex justify-between" for="{{ $id }}-{{ .Ordinal }}">
<span>{{ default "Expand" (.Get 0) }}</span>
<span>{{ default "↕" (.Get 1) }}</span>
</label>
<input id="{{ $id }}-{{ .Ordinal }}" type="checkbox" class="gdoc-expand__control hidden" />
<div class="gdoc-markdown--nested gdoc-expand__content">
{{ .Inner | markdownify }}
</div>
</div>

View File

@ -0,0 +1,3 @@
<blockquote class="gdoc-hint {{ .Get 0 }}">
{{ .Inner | markdownify }}
</blockquote>

View File

@ -0,0 +1,10 @@
{{$file := .Get "file"}}
<div class="gdoc-include">
{{- if eq (.Get "markdown") "true" -}}
{{- $file | readFile | markdownify -}}
{{- else if (.Get "language") -}}
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
{{- else -}}
{{ $file | readFile | safeHTML }}
{{- end -}}
</div>

View File

@ -0,0 +1,16 @@
{{ if not (.Page.Scratch.Get "mermaid") }}
<!-- Include mermaid only first time -->
<script defer src="{{ "js/mermaid.min.js" | relURL }}"></script>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
mermaid.initialize({
flowchart: { useMaxWidth: true }
});
});
</script>
{{ .Page.Scratch.Set "mermaid" true }}
{{ end }}
<pre class="gdoc-mermaid mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
{{- .Inner -}}
</pre>

View File

@ -0,0 +1,12 @@
{{ if .Parent }}
{{ $name := .Get 0 }}
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
{{ if not (.Parent.Scratch.Get $group) }}
{{ .Parent.Scratch.Set $group slice }}
{{ end }}
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
{{ else }}
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
{{ end}}

View File

@ -0,0 +1,16 @@
{{ if .Inner }}{{ end }}
{{ $id := .Get 0 }}
{{ $group := printf "tabs-%s" $id }}
<div class="gdoc-tabs">
{{ range $index, $tab := .Scratch.Get $group }}
<input type="radio" class="gdoc-tabs__control hidden" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}"
{{ if not $index }}checked="checked" {{ end }} />
<label for="{{ printf "%s-%d" $group $index }}" class="gdoc-tabs__label">
{{ $tab.Name }}
</label>
<div class="gdoc-markdown--nested gdoc-tabs__content">
{{ .Content | markdownify }}
</div>
{{ end }}
</div>

View File

@ -0,0 +1,33 @@
{{ $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
{{ if $tocLevels }}
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">
{{ template "toc-tree" dict "sect" .Page.Pages }}
</div>
{{ end }}
<!-- templates -->
{{ define "toc-tree" }}
<ul>
{{ range .sect.GroupBy "Weight" }}
{{ range .ByTitle }}
{{ if not .Params.geekdocHidden }}
<li>
{{ if or .Content .Params.geekdocFlatSection }}
<span>
<a href="{{ .RelPermalink }}" class="gdoc-toc__entry">{{ partial "title" . }}</a>
</span>
{{ else }}
<span>{{ partial "title" . }}</span>
{{ end }}
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{ if and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
{{ template "toc-tree" dict "sect" .Pages }}
{{ end }}
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
{{ end }}

View File

@ -0,0 +1,5 @@
{{ $tocLevels := default (default 6 .Site.Params.GeekdocToC) .Page.Params.GeekdocToC }}
{{ if and $tocLevels .Page.TableOfContents }}
<div class="gdoc-toc gdoc-toc__level--{{$tocLevels}}">{{ .Page.TableOfContents }}<hr></div>
{{ end }}

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg stroke="#fff" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" class="mr-2" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path></svg>

After

Width:  |  Height:  |  Size: 389 B

View File

@ -0,0 +1,322 @@
/* You can add custom styles here. */
html {
--color-1-100: #f1f6fa;
--color-1-300: #b2cede;
--color-1-500: #659dbd;
--color-1-700: #39596c;
--color-1-900: #1c2c35;
--color-font: #38383f;
--body-bg: #f9f9f9;
--color-muted: #6c757d;
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 300;
src: local('Lato Light'), local('Lato-Light'), url('/static/fonts/Lato/lato-300.woff2') format('woff2'),
url('/static/fonts/Lato/lato-300.woff') format('woff');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 700;
src: local('Lato Bold'), local('Lato-Bold'), url('/static/fonts/Lato/lato-700.woff2') format('woff2'),
url('/static/fonts/Lato/lato-700.woff') format('woff');
}
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src: local('Lato Regular'), local('Lato-Regular'), url('/static/fonts/Lato/lato-regular.woff2') format('woff2'),
url('/static/fonts/Lato/lato-regular.woff') format('woff');
}
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 400;
src: local('Roboto Mono'), local('RobotoMono-Regular'),
url('/static/fonts/Roboto_Mono/roboto-mono-regular.woff2') format('woff2'),
url('/static/fonts/Roboto_Mono/roboto-mono-regular.woff') format('woff');
}
@font-face {
font-family: 'Archivo Black';
font-style: normal;
font-weight: 400;
src: local('Archivo Black Regular'), local('ArchivoBlack-Regular'),
url('/static/fonts/Archivo_Black/archivo-black-regular.woff2') format('woff2'),
url('/static/fonts/Archivo_Black/archivo-black-regular.woff') format('woff');
}
body {
background-color: var(--body-bg);
color: var(--color-font);
line-height: 1.5;
-webkit-font-smoothing: auto;
-moz-osx-font-smoothing: auto;
}
body, .gdoc-mermaid, .gdoc-header {
font-family: 'Lato', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
code {
font-family: 'Roboto Mono', 'Liberation Mono', 'Courier New', monospace;
}
.gdoc-header {
font-size: 1rem;
background: var(--color-1-500);
box-shadow: 0 8px 6px -6px rgba(0,0,0,.15);
border: 0;
}
.gdoc-brand {
font-size: 1.25rem;
letter-spacing: normal;
}
.gdoc-brand__img {
margin-right: .5rem;
position: relative;
top: -1px;
}
.gdoc-brand__hub {
font-family: 'Archivo Black', cursive;
margin-left: .5rem;
letter-spacing: normal;
}
.gdoc-brand__badge {
position: relative;
top: -10px;
margin-left: 8px;
background-color: var(--color-1-700);
font-size: .55rem;
border-radius: 10rem;
padding: 0.15rem 0.2rem;
font-weight: 700;
line-height: 1;
display: inline-block;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
align-items: center;
}
.gdoc-brand__badge-content {
position: relative;
bottom: -1px;
}
.gdoc-footer {
background-color: var(--color-1-900);
}
.gdoc-markdown pre {
overflow-x: auto;
border-radius: 3px;
padding: .5rem 1rem;
}
.gdoc-markdown *:not(pre) > code {
color: var(--color-1-700);
hyphens: none;
white-space: normal;
word-wrap: break-word;
background-color: #f6f8fa !important;
border: 1px solid rgba(28, 44, 53, 0.1) !important;
border-radius: 3px;
padding: 0 0.15rem;
}
.gdoc-markdown code {
background-color: transparent !important;
padding: 0;
font-size: 87.5%;
}
.gdoc-markdown pre {
color:#f8f8f2;
background-color:#272822;
tab-size: 4;
}
.gdoc-markdown table {
margin-top: 1.5rem;
}
.gdoc-page__footer a, .gdoc-page__footer a:visited, .gdoc-page__header a, .gdoc-page__header a:visited, .gdoc-markdown a, .gdoc-markdown a:visited, .gdoc-search .has-hits a, .gdoc-search .has-hits a:visited {
color: var(--color-1-500);
}
/* Menu */
.gdoc-nav {
flex: 0 0 20rem;
font-size: 1rem;
}
.gdoc-nav nav {
width: 20rem;
}
.gdoc-nav--main {
border-radius: .25rem;
background-color: #ffffff;
border: 1px solid rgba(0,0,0,.125);
box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
padding: 1rem 0;
}
.gdoc-nav__list ul {
padding-left: 0;
}
.gdoc-nav__list li {
margin: 0;
}
.gdoc-nav__list ul .gdoc-nav__entry, .gdoc-nav__list ul .gdoc-nav__entry:visited, .gdoc-nav__entry-root, .gdoc-nav__entry-root:visited {
color: var(--color-muted);
}
.gdoc-nav__entry {
padding: .5rem 1.15rem;
position: relative;
}
.gdoc-nav__list .gdoc-nav__list .gdoc-nav__list .gdoc-nav__entry {
padding-left: 2.3rem !important;
}
ul .gdoc-nav__item {
text-transform: uppercase;
font-weight: 700;
padding: .75rem 1.25rem .25rem 1.25rem;
}
ul ul .gdoc-nav__item, .gdoc-nav__entry-root {
text-transform: none;
font-weight: normal !important;
}
.gdoc-nav__list .gdoc-nav__entry:hover {
background-color: #f8f9fa;
text-decoration: none;
}
.gdoc-nav__entry.is-active {
background-color: #f8f9fa;
text-decoration: none;
}
.gdoc-nav__entry.is-active::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 3px;
background-color: var(--color-1-700);
}
.gdoc-markdown em {
color: var(--color-muted);
}
.gdoc-markdown h1, .gdoc-markdown h2, .gdoc-markdown h3, .gdoc-markdown h4, .gdoc-markdown h5, .gdoc-markdown h6 {
font-weight: 700;
color: var(--color-1-700);
margin-bottom: 1.5rem;
}
.gdoc-markdown h1, .gdoc-markdown h2 {
padding-bottom: .5rem;
border-bottom: 1px solid rgba(0,0,0,.125);
}
.gdoc-page__header {
padding-left: 0;
}
/* Search */
.gdoc-search__input {
background-color: #ffffff;
border-color: rgba(0,0,0,.125);
}
.gdoc-search {
margin-bottom: 1.5rem;
}
.gdoc-search__list {
position: absolute;
top: 100%;
left: 0;
right: -2rem;
z-index: 1000;
}
.gdoc-search .has-hits {
min-width: 10rem;
padding: .5rem 1rem;
margin: .125rem 0 0;
font-size: 1rem;
color: #212529;
text-align: left;
list-style: none;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0,0,0,.15);
border-radius: .25rem;
box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}
.gdoc-search__arrow {
position: absolute;
display: none;
width: 1rem;
height: .5rem;
margin: 0 .3rem;
top: calc(.2rem - 1px);
left: 1.25rem;
}
.gdoc-search__arrow::before, .gdoc-search__arrow::after {
position: absolute;
display: block;
content: "";
border-color: transparent;
border-style: solid;
border-width: 0 .5rem .5rem;
}
.gdoc-search__arrow::before {
top: 0;
border-bottom-color: rgba(0,0,0,.25);
}
.gdoc-search__arrow::after {
top: 1px;
border-bottom-color: #ffffff;
}
.has-hits + .gdoc-search__arrow {
display: block;
}
@media screen and (max-width: 39rem) {
.gdoc-nav {
margin-left: -20rem;
}
}
#menu-control:checked ~ main .gdoc-nav nav, #menu-control:checked ~ main .gdoc-page {
transform: translateX(20rem);
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,42 @@
/*
FlexSearch v0.6.30
Copyright 2019 Nextapps GmbH
Author: Thomas Wilkerling
Released under the Apache 2.0 Licence
https://github.com/nextapps-de/flexsearch
*/
'use strict';(function(K,R,w){let L;(L=w.define)&&L.amd?L([],function(){return R}):(L=w.modules)?L[K.toLowerCase()]=R:"object"===typeof exports?module.exports=R:w[K]=R})("FlexSearch",function ma(K){function w(a,c){const b=c?c.id:a&&a.id;this.id=b||0===b?b:na++;this.init(a,c);fa(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)});fa(this,"length",function(){return this.index.length})}function L(a,c,b,d){this.u!==this.g&&(this.o=this.o.concat(b),this.u++,
d&&this.o.length>=d&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(c,this.o),this.F&&this.F(this.o)));return this}function S(a){const c=B();for(const b in a)if(a.hasOwnProperty(b)){const d=a[b];F(d)?c[b]=d.slice(0):G(d)?c[b]=S(d):c[b]=d}return c}function W(a,c){const b=a.length,d=O(c),e=[];for(let f=0,h=0;f<b;f++){const g=a[f];if(d&&c(g)||!d&&!c[g])e[h++]=g}return e}function P(a,c,b,d,e,f,h,g,k,l){b=ha(b,h?0:e,g,f,c,k,l);let p;g&&(g=b.page,p=b.next,b=b.result);if(h)c=this.where(h,null,
e,b);else{c=b;b=this.l;e=c.length;f=Array(e);for(h=0;h<e;h++)f[h]=b[c[h]];c=f}b=c;d&&(O(d)||(M=d.split(":"),1<M.length?d=oa:(M=M[0],d=pa)),b.sort(d));b=T(g,p,b);this.cache&&this.j.set(a,b);return b}function fa(a,c,b){Object.defineProperty(a,c,{get:b})}function r(a){return new RegExp(a,"g")}function Q(a,c){for(let b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a}function V(a,c,b,d,e,f,h,g){if(c[b])return c[b];e=e?(g-(h||g/1.5))*f+(h||g/1.5)*e:f;c[b]=e;e>=h&&(a=a[g-(e+.5>>0)],a=a[b]||(a[b]=[]),
a[a.length]=d);return e}function ba(a,c){if(a){const b=Object.keys(a);for(let d=0,e=b.length;d<e;d++){const f=b[d],h=a[f];if(h)for(let g=0,k=h.length;g<k;g++)if(h[g]===c){1===k?delete a[f]:h.splice(g,1);break}else G(h[g])&&ba(h[g],c)}}}function ca(a){let c="",b="";var d="";for(let e=0;e<a.length;e++){const f=a[e];if(f!==b)if(e&&"h"===f){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===b||"e"===b||"i"===b||"o"===b||"u"===b||"y"===b)&&d||" "===b)c+=f}else c+=f;d=e===a.length-1?"":a[e+
1];b=f}return c}function qa(a,c){a=a.length-c.length;return 0>a?1:a?-1:0}function pa(a,c){a=a[M];c=c[M];return a<c?-1:a>c?1:0}function oa(a,c){const b=M.length;for(let d=0;d<b;d++)a=a[M[d]],c=c[M[d]];return a<c?-1:a>c?1:0}function T(a,c,b){return a?{page:a,next:c?""+c:null,result:b}:b}function ha(a,c,b,d,e,f,h){let g,k=[];if(!0===b){b="0";var l=""}else l=b&&b.split(":");const p=a.length;if(1<p){const y=B(),t=[];let v,x;var n=0,m;let I;var u=!0;let D,E=0,N,da,X,ea;l&&(2===l.length?(X=l,l=!1):l=ea=
parseInt(l[0],10));if(h){for(v=B();n<p;n++)if("not"===e[n])for(x=a[n],I=x.length,m=0;m<I;m++)v["@"+x[m]]=1;else da=n+1;if(C(da))return T(b,g,k);n=0}else N=J(e)&&e;let Y;for(;n<p;n++){const ra=n===(da||p)-1;if(!N||!n)if((m=N||e&&e[n])&&"and"!==m)if("or"===m)Y=!1;else continue;else Y=f=!0;x=a[n];if(I=x.length){if(u)if(D){var q=D.length;for(m=0;m<q;m++){u=D[m];var A="@"+u;h&&v[A]||(y[A]=1,f||(k[E++]=u))}D=null;u=!1}else{D=x;continue}A=!1;for(m=0;m<I;m++){q=x[m];var z="@"+q;const Z=f?y[z]||0:n;if(!(!Z&&
!d||h&&v[z]||!f&&y[z]))if(Z===n){if(ra){if(!ea||--ea<E)if(k[E++]=q,c&&E===c)return T(b,E+(l||0),k)}else y[z]=n+1;A=!0}else d&&(z=t[Z]||(t[Z]=[]),z[z.length]=q)}if(Y&&!A&&!d)break}else if(Y&&!d)return T(b,g,x)}if(D)if(n=D.length,h)for(m=l?parseInt(l,10):0;m<n;m++)a=D[m],v["@"+a]||(k[E++]=a);else k=D;if(d)for(E=k.length,X?(n=parseInt(X[0],10)+1,m=parseInt(X[1],10)+1):(n=t.length,m=0);n--;)if(q=t[n]){for(I=q.length;m<I;m++)if(d=q[m],!h||!v["@"+d])if(k[E++]=d,c&&E===c)return T(b,n+":"+m,k);m=0}}else!p||
e&&"not"===e[0]||(k=a[0],l&&(l=parseInt(l[0],10)));c&&(h=k.length,l&&l>h&&(l=0),l=l||0,g=l+c,g<h?k=k.slice(l,g):(g=0,l&&(k=k.slice(l))));return T(b,g,k)}function J(a){return"string"===typeof a}function F(a){return a.constructor===Array}function O(a){return"function"===typeof a}function G(a){return"object"===typeof a}function C(a){return"undefined"===typeof a}function ia(a){const c=Array(a);for(let b=0;b<a;b++)c[b]=B();return c}function B(){return Object.create(null)}function sa(){let a,c;self.onmessage=
function(b){if(b=b.data)if(b.search){const d=c.search(b.content,b.threshold?{limit:b.limit,threshold:b.threshold,where:b.where}:b.limit);self.postMessage({id:a,content:b.content,limit:b.limit,result:d})}else b.add?c.add(b.id,b.content):b.update?c.update(b.id,b.content):b.remove?c.remove(b.id):b.clear?c.clear():b.info?(b=c.info(),b.worker=a,console.log(b)):b.register&&(a=b.id,b.options.cache=!1,b.options.async=!1,b.options.worker=!1,c=(new Function(b.register.substring(b.register.indexOf("{")+1,b.register.lastIndexOf("}"))))(),
c=new c(b.options))}}function ta(a,c,b,d){a=K("flexsearch","id"+a,sa,function(f){(f=f.data)&&f.result&&d(f.id,f.content,f.result,f.limit,f.where,f.cursor,f.suggest)},c);const e=ma.toString();b.id=c;a.postMessage({register:e,options:b,id:c});return a}const H={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},ja={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1,
b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},aa=[];let na=0;const ka={},la={};w.create=function(a,c){return new w(a,c)};w.registerMatcher=function(a){for(const c in a)a.hasOwnProperty(c)&&aa.push(r(c),a[c]);return this};w.registerEncoder=function(a,c){U[a]=c.bind(U);return this};w.registerLanguage=function(a,c){ka[a]=c.filter;la[a]=c.stemmer;return this};w.encode=
function(a,c){return U[a](c)};w.prototype.init=function(a,c){this.v=[];if(c){var b=c.preset;a=c}else a||(a=H),b=a.preset;c={};J(a)?(c=ja[a],a={}):b&&(c=ja[b]);if(b=a.worker)if("undefined"===typeof Worker)a.worker=!1,this.m=null;else{var d=parseInt(b,10)||4;this.C=-1;this.u=0;this.o=[];this.F=null;this.m=Array(d);for(var e=0;e<d;e++)this.m[e]=ta(this.id,e,a,L.bind(this))}this.f=a.tokenize||c.f||this.f||H.f;this.split=C(b=a.split)?this.split||H.split:J(b)?r(b):b;this.D=a.rtl||this.D||H.D;this.async=
"undefined"===typeof Promise||C(b=a.async)?this.async||H.async:b;this.g=C(b=a.worker)?this.g||H.g:b;this.threshold=C(b=a.threshold)?c.threshold||this.threshold||H.threshold:b;this.b=C(b=a.resolution)?b=c.b||this.b||H.b:b;b<=this.threshold&&(this.b=this.threshold+1);this.depth="strict"!==this.f||C(b=a.depth)?c.depth||this.depth||H.depth:b;this.w=(b=C(b=a.encode)?c.encode||H.encode:b)&&U[b]&&U[b].bind(U)||(O(b)?b:this.w||!1);(b=a.matcher)&&this.addMatcher(b);if(b=(c=a.lang)||a.filter){J(b)&&(b=ka[b]);
if(F(b)){d=this.w;e=B();for(var f=0;f<b.length;f++){var h=d?d(b[f]):b[f];e[h]=1}b=e}this.filter=b}if(b=c||a.stemmer){var g;c=J(b)?la[b]:b;d=this.w;e=[];for(g in c)c.hasOwnProperty(g)&&(f=d?d(g):g,e.push(r(f+"($|\\W)"),d?d(c[g]):c[g]));this.stemmer=g=e}this.a=e=(b=a.doc)?S(b):this.a||H.a;this.i=ia(this.b-(this.threshold||0));this.h=B();this.c=B();if(e){this.l=B();a.doc=null;g=e.index={};c=e.keys=[];d=e.field;f=e.tag;h=e.store;F(e.id)||(e.id=e.id.split(":"));if(h){var k=B();if(J(h))k[h]=1;else if(F(h))for(let l=
0;l<h.length;l++)k[h[l]]=1;else G(h)&&(k=h);e.store=k}if(f){this.G=B();h=B();if(d)if(J(d))h[d]=a;else if(F(d))for(k=0;k<d.length;k++)h[d[k]]=a;else G(d)&&(h=d);F(f)||(e.tag=f=[f]);for(d=0;d<f.length;d++)this.G[f[d]]=B();this.I=f;d=h}if(d){let l;F(d)||(G(d)?(l=d,e.field=d=Object.keys(d)):e.field=d=[d]);for(e=0;e<d.length;e++)f=d[e],F(f)||(l&&(a=l[f]),c[e]=f,d[e]=f.split(":")),g[f]=new w(a)}a.doc=b}this.B=!0;this.j=(this.cache=b=C(b=a.cache)?this.cache||H.cache:b)?new ua(b):!1;return this};w.prototype.encode=
function(a){a&&(aa.length&&(a=Q(a,aa)),this.v.length&&(a=Q(a,this.v)),this.w&&(a=this.w(a)),this.stemmer&&(a=Q(a,this.stemmer)));return a};w.prototype.addMatcher=function(a){const c=this.v;for(const b in a)a.hasOwnProperty(b)&&c.push(r(b),a[b]);return this};w.prototype.add=function(a,c,b,d,e){if(this.a&&G(a))return this.A("add",a,c);if(c&&J(c)&&(a||0===a)){var f="@"+a;if(this.c[f]&&!d)return this.update(a,c);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:a,
content:c}),this.c[f]=""+this.C,b&&b(),this;if(!e){if(this.async&&"function"!==typeof importScripts){let t=this;f=new Promise(function(v){setTimeout(function(){t.add(a,c,null,d,!0);t=null;v()})});if(b)f.then(b);else return f;return this}if(b)return this.add(a,c,null,d,!0),b(),this}c=this.encode(c);if(!c.length)return this;b=this.f;e=O(b)?b(c):c.split(this.split);this.filter&&(e=W(e,this.filter));const n=B();n._ctx=B();const m=e.length,u=this.threshold,q=this.depth,A=this.b,z=this.i,y=this.D;for(let t=
0;t<m;t++){var h=e[t];if(h){var g=h.length,k=(y?t+1:m-t)/m,l="";switch(b){case "reverse":case "both":for(var p=g;--p;)l=h[p]+l,V(z,n,l,a,y?1:(g-p)/g,k,u,A-1);l="";case "forward":for(p=0;p<g;p++)l+=h[p],V(z,n,l,a,y?(p+1)/g:1,k,u,A-1);break;case "full":for(p=0;p<g;p++){const v=(y?p+1:g-p)/g;for(let x=g;x>p;x--)l=h.substring(p,x),V(z,n,l,a,v,k,u,A-1)}break;default:if(g=V(z,n,h,a,1,k,u,A-1),q&&1<m&&g>=u)for(g=n._ctx[h]||(n._ctx[h]=B()),h=this.h[h]||(this.h[h]=ia(A-(u||0))),k=t-q,l=t+q+1,0>k&&(k=0),l>
m&&(l=m);k<l;k++)k!==t&&V(h,g,e[k],a,0,A-(k<t?t-k:k-t),u,A-1)}}}this.c[f]=1;this.B=!1}return this};w.prototype.A=function(a,c,b){if(F(c)){var d=c.length;if(d--){for(var e=0;e<d;e++)this.A(a,c[e]);return this.A(a,c[d],b)}}else{var f=this.a.index,h=this.a.keys,g=this.a.tag;e=this.a.store;var k;var l=this.a.id;d=c;for(var p=0;p<l.length;p++)d=d[l[p]];if("remove"===a&&(delete this.l[d],l=h.length,l--)){for(c=0;c<l;c++)f[h[c]].remove(d);return f[h[l]].remove(d,b)}if(g){for(k=0;k<g.length;k++){var n=g[k];
var m=c;l=n.split(":");for(p=0;p<l.length;p++)m=m[l[p]];m="@"+m}k=this.G[n];k=k[m]||(k[m]=[])}l=this.a.field;for(let u=0,q=l.length;u<q;u++){n=l[u];g=c;for(m=0;m<n.length;m++)g=g[n[m]];n=f[h[u]];m="add"===a?n.add:n.update;u===q-1?m.call(n,d,g,b):m.call(n,d,g)}if(e){b=Object.keys(e);a=B();for(f=0;f<b.length;f++)if(h=b[f],e[h]){h=h.split(":");let u,q;for(l=0;l<h.length;l++)g=h[l],u=(u||c)[g],q=(q||a)[g]=u}c=a}k&&(k[k.length]=c);this.l[d]=c}return this};w.prototype.update=function(a,c,b){if(this.a&&
G(a))return this.A("update",a,c);this.c["@"+a]&&J(c)&&(this.remove(a),this.add(a,c,b,!0));return this};w.prototype.remove=function(a,c,b){if(this.a&&G(a))return this.A("remove",a,c);var d="@"+a;if(this.c[d]){if(this.g)return this.m[this.c[d]].postMessage({remove:!0,id:a}),delete this.c[d],c&&c(),this;if(!b){if(this.async&&"function"!==typeof importScripts){let e=this;d=new Promise(function(f){setTimeout(function(){e.remove(a,null,!0);e=null;f()})});if(c)d.then(c);else return d;return this}if(c)return this.remove(a,
null,!0),c(),this}for(c=0;c<this.b-(this.threshold||0);c++)ba(this.i[c],a);this.depth&&ba(this.h,a);delete this.c[d];this.B=!1}return this};let M;w.prototype.search=function(a,c,b,d){if(G(c)){if(F(c))for(var e=0;e<c.length;e++)c[e].query=a;else c.query=a;a=c;c=1E3}else c&&O(c)?(b=c,c=1E3):c||0===c||(c=1E3);if(this.g){this.F=b;this.u=0;this.o=[];for(var f=0;f<this.g;f++)this.m[f].postMessage({search:!0,limit:c,content:a})}else{var h=[],g=a;if(G(a)&&!F(a)){b||(b=a.callback)&&(g.callback=null);var k=
a.sort;var l=a.page;c=a.limit;f=a.threshold;var p=a.suggest;a=a.query}if(this.a){f=this.a.index;const y=g.where;var n=g.bool||"or",m=g.field;let t=n;let v,x;if(m)F(m)||(m=[m]);else if(F(g)){var u=g;m=[];t=[];for(var q=0;q<g.length;q++)d=g[q],e=d.bool||n,m[q]=d.field,t[q]=e,"not"===e?v=!0:"and"===e&&(x=!0)}else m=this.a.keys;n=m.length;for(q=0;q<n;q++)u&&(g=u[q]),l&&!J(g)&&(g.page=null,g.limit=0),h[q]=f[m[q]].search(g,0);if(b)return b(P.call(this,a,t,h,k,c,p,y,l,x,v));if(this.async){const I=this;return new Promise(function(D){Promise.all(h).then(function(E){D(P.call(I,
a,t,E,k,c,p,y,l,x,v))})})}return P.call(this,a,t,h,k,c,p,y,l,x,v)}f||(f=this.threshold||0);if(!d){if(this.async&&"function"!==typeof importScripts){let y=this;f=new Promise(function(t){setTimeout(function(){t(y.search(g,c,null,!0));y=null})});if(b)f.then(b);else return f;return this}if(b)return b(this.search(g,c,null,!0)),this}if(!a||!J(a))return h;g=a;if(this.cache)if(this.B){if(b=this.j.get(a))return b}else this.j.clear(),this.B=!0;g=this.encode(g);if(!g.length)return h;b=this.f;b=O(b)?b(g):g.split(this.split);
this.filter&&(b=W(b,this.filter));u=b.length;d=!0;e=[];var A=B(),z=0;1<u&&(this.depth&&"strict"===this.f?n=!0:b.sort(qa));if(!n||(q=this.h)){const y=this.b;for(;z<u;z++){let t=b[z];if(t){if(n){if(!m)if(q[t])m=t,A[t]=1;else if(!p)return h;if(p&&z===u-1&&!e.length)n=!1,t=m||t,A[t]=0;else if(!m)continue}if(!A[t]){const v=[];let x=!1,I=0;const D=n?q[m]:this.i;if(D){let E;for(let N=0;N<y-f;N++)if(E=D[N]&&D[N][t])v[I++]=E,x=!0}if(x)m=t,e[e.length]=1<I?v.concat.apply([],v):v[0];else if(!p){d=!1;break}A[t]=
1}}}}else d=!1;d&&(h=ha(e,c,l,p));this.cache&&this.j.set(a,h);return h}};w.prototype.find=function(a,c){return this.where(a,c,1)[0]||null};w.prototype.where=function(a,c,b,d){const e=this.l,f=[];let h=0;let g;var k;let l;if(G(a)){b||(b=c);var p=Object.keys(a);var n=p.length;g=!1;if(1===n&&"id"===p[0])return[e[a.id]];if((k=this.I)&&!d)for(var m=0;m<k.length;m++){var u=k[m],q=a[u];if(!C(q)){l=this.G[u]["@"+q];if(0===--n)return l;p.splice(p.indexOf(u),1);delete a[u];break}}k=Array(n);for(m=0;m<n;m++)k[m]=
p[m].split(":")}else{if(O(a)){c=d||Object.keys(e);b=c.length;for(p=0;p<b;p++)n=e[c[p]],a(n)&&(f[h++]=n);return f}if(C(c))return[e[a]];if("id"===a)return[e[c]];p=[a];n=1;k=[a.split(":")];g=!0}d=l||d||Object.keys(e);m=d.length;for(u=0;u<m;u++){q=l?d[u]:e[d[u]];let A=!0;for(let z=0;z<n;z++){g||(c=a[p[z]]);const y=k[z],t=y.length;let v=q;if(1<t)for(let x=0;x<t;x++)v=v[y[x]];else v=v[y[0]];if(v!==c){A=!1;break}}if(A&&(f[h++]=q,b&&h===b))break}return f};w.prototype.info=function(){if(this.g)for(let a=0;a<
this.g;a++)this.m[a].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:aa.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&"strict"===this.f}};w.prototype.clear=function(){return this.destroy().init()};w.prototype.destroy=function(){this.cache&&(this.j.clear(),this.j=null);this.i=this.h=this.c=null;if(this.a){const a=this.a.keys;for(let c=
0;c<a.length;c++)this.a.index[a[c]].destroy();this.a=this.l=null}return this};w.prototype.export=function(a){const c=!a||C(a.serialize)||a.serialize;if(this.a){const d=!a||C(a.doc)||a.doc;var b=!a||C(a.index)||a.index;a=[];let e=0;if(b)for(b=this.a.keys;e<b.length;e++){const f=this.a.index[b[e]];a[e]=[f.i,f.h,Object.keys(f.c)]}d&&(a[e]=this.l)}else a=[this.i,this.h,Object.keys(this.c)];c&&(a=JSON.stringify(a));return a};w.prototype.import=function(a,c){if(!c||C(c.serialize)||c.serialize)a=JSON.parse(a);
const b=B();if(this.a){var d=!c||C(c.doc)||c.doc,e=0;if(!c||C(c.index)||c.index){c=this.a.keys;const h=c.length;for(var f=a[0][2];e<f.length;e++)b[f[e]]=1;for(e=0;e<h;e++){f=this.a.index[c[e]];const g=a[e];g&&(f.i=g[0],f.h=g[1],f.c=b)}}d&&(this.l=G(d)?d:a[e])}else{d=a[2];for(e=0;e<d.length;e++)b[d[e]]=1;this.i=a[0];this.h=a[1];this.c=b}};const va=function(){const a=r("\\s+"),c=r("[^a-z0-9 ]"),b=[r("[-/]")," ",c,"",a," "];return function(d){return ca(Q(d.toLowerCase(),b))}}(),U={icase:function(a){return a.toLowerCase()},
simple:function(){const a=r("\\s+"),c=r("[^a-z0-9 ]"),b=r("[-/]"),d=r("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),e=r("[\u00e8\u00e9\u00ea\u00eb]"),f=r("[\u00ec\u00ed\u00ee\u00ef]"),h=r("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),g=r("[\u00f9\u00fa\u00fb\u00fc\u0171]"),k=r("[\u00fd\u0177\u00ff]"),l=r("\u00f1"),p=r("[\u00e7c]"),n=r("\u00df"),m=r(" & "),u=[d,"a",e,"e",f,"i",h,"o",g,"u",k,"y",l,"n",p,"k",n,"s",m," and ",b," ",c,"",a," "];return function(q){q=Q(q.toLowerCase(),u);return" "===q?"":q}}(),advanced:function(){const a=
r("ae"),c=r("ai"),b=r("ay"),d=r("ey"),e=r("oe"),f=r("ue"),h=r("ie"),g=r("sz"),k=r("zs"),l=r("ck"),p=r("cc"),n=r("sh"),m=r("th"),u=r("dt"),q=r("ph"),A=r("pf"),z=r("ou"),y=r("uo"),t=[a,"a",c,"ei",b,"ei",d,"ei",e,"o",f,"u",h,"i",g,"s",k,"s",n,"s",l,"k",p,"k",m,"t",u,"t",q,"f",A,"f",z,"o",y,"u"];return function(v,x){if(!v)return v;v=this.simple(v);2<v.length&&(v=Q(v,t));x||1<v.length&&(v=ca(v));return v}}(),extra:function(){const a=r("p"),c=r("z"),b=r("[cgq]"),d=r("n"),e=r("d"),f=r("[vw]"),h=r("[aeiouy]"),
g=[a,"b",c,"s",b,"k",d,"m",e,"t",f,"f",h,""];return function(k){if(!k)return k;k=this.advanced(k,!0);if(1<k.length){k=k.split(" ");for(let l=0;l<k.length;l++){const p=k[l];1<p.length&&(k[l]=p[0]+Q(p.substring(1),g))}k=k.join(" ");k=ca(k)}return k}}(),balance:va},ua=function(){function a(c){this.clear();this.H=!0!==c&&c}a.prototype.clear=function(){this.cache=B();this.count=B();this.index=B();this.s=[]};a.prototype.set=function(c,b){if(this.H&&C(this.cache[c])){let d=this.s.length;if(d===this.H){d--;
const e=this.s[d];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[c]=d;this.s[d]=c;this.count[c]=-1;this.cache[c]=b;this.get(c)}else this.cache[c]=b};a.prototype.get=function(c){const b=this.cache[c];if(this.H&&b){var d=++this.count[c];const f=this.index;let h=f[c];if(0<h){const g=this.s;for(var e=h;this.count[g[--h]]<=d&&-1!==h;);h++;if(h!==e){for(d=e;d>h;d--)e=g[d-1],g[d]=e,f[e]=d;g[h]=c;f[c]=h}}}return b};return a}();return w}(function(){const K={},R="undefined"!==typeof Blob&&
"undefined"!==typeof URL&&URL.createObjectURL;return function(w,L,S,W,P){S=R?URL.createObjectURL(new Blob(["("+S.toString()+")()"],{type:"text/javascript"})):w+".min.js";w+="-"+L;K[w]||(K[w]=[]);K[w][P]=new Worker(S);K[w][P].onmessage=W;return K[w][P]}}()),this);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,17 @@
---
name: "Geekdoc"
license: "MIT"
licenselink: "https://github.com/xoxys/hugo-geekdoc/blob/master/LICENSE"
description: "Hugo theme made for documentation."
homepage: "https://geekdocs.de"
tags:
- responsive
- clean
- documentation
- docs
features: []
min_version: "0.65"
author:
name: "Robert Kaussow"
homepage: "https://geeklabor.de"

8
scripts/prepare-docs.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
cat docs/www/headers/authorization docs/authorization.md > docs/www/content/topics/authorization.md
cat docs/www/headers/dev docs/dev.md > docs/www/content/topics/dev.md
cat docs/www/headers/repositories docs/repositories.md > docs/www/content/topics/repositories.md
cat docs/www/headers/security_report docs/security_report.md > docs/www/content/topics/security_report.md
cat docs/www/headers/helm_annotations docs/helm_annotations.md > docs/www/content/topics/annotations/helm.md
cat docs/www/headers/olm_annotations docs/olm_annotations.md > docs/www/content/topics/annotations/olm.md

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -176,7 +176,7 @@ export default function App() {
<div> <div>
<div className="h6 font-weight-bold text-uppercase">Project</div> <div className="h6 font-weight-bold text-uppercase">Project</div>
<div className="d-flex flex-column text-left"> <div className="d-flex flex-column text-left">
<ExternalLink className="text-muted mb-1" href="https://github.com/artifacthub/hub#getting-started"> <ExternalLink className="text-muted mb-1" href="/docs">
Getting started Getting started
</ExternalLink> </ExternalLink>
<ExternalLink className="text-muted mb-1" href="https://artifacthub.github.io/hub/api/"> <ExternalLink className="text-muted mb-1" href="https://artifacthub.github.io/hub/api/">

View File

@ -165,40 +165,28 @@ const RepositoryModal = (props: Props) => {
switch (selectedKind) { switch (selectedKind) {
case RepositoryKind.Helm: case RepositoryKind.Helm:
link = ( link = (
<ExternalLink <ExternalLink href="/docs/repositories#helm-charts-repositories" className="text-reset">
href="https://github.com/artifacthub/hub/blob/master/docs/repositories.md#helm-charts-repositories"
className="text-reset"
>
<u>Helm charts repositories</u> <u>Helm charts repositories</u>
</ExternalLink> </ExternalLink>
); );
break; break;
case RepositoryKind.OLM: case RepositoryKind.OLM:
link = ( link = (
<ExternalLink <ExternalLink href="/docs/repositories#olm-operators-repositories" className="text-reset">
href="https://github.com/artifacthub/hub/blob/master/docs/repositories.md#olm-operators-repositories"
className="text-reset"
>
<u>OLM operators repositories</u> <u>OLM operators repositories</u>
</ExternalLink> </ExternalLink>
); );
break; break;
case RepositoryKind.Falco: case RepositoryKind.Falco:
link = ( link = (
<ExternalLink <ExternalLink href="/docs/repositories#falco-rules-repositories" className="text-reset">
href="https://github.com/artifacthub/hub/blob/master/docs/repositories.md#falco-rules-repositories"
className="text-reset"
>
<u>Falco rules repositories</u> <u>Falco rules repositories</u>
</ExternalLink> </ExternalLink>
); );
break; break;
case RepositoryKind.OPA: case RepositoryKind.OPA:
link = ( link = (
<ExternalLink <ExternalLink href="/docs/repositories#opa-policies-repositories" className="text-reset">
href="https://github.com/artifacthub/hub/blob/master/docs/repositories.md#opa-policies-repositories"
className="text-reset"
>
<u>OPA policies repositories</u> <u>OPA policies repositories</u>
</ExternalLink> </ExternalLink>
); );
@ -209,10 +197,7 @@ const RepositoryModal = (props: Props) => {
<small className="text-muted text-break mt-1"> <small className="text-muted text-break mt-1">
<p className="mb-0"> <p className="mb-0">
For more information about the url format and the repository structure, please see the {link} section in the{' '} For more information about the url format and the repository structure, please see the {link} section in the{' '}
<ExternalLink <ExternalLink href="/docs/repositories" className="text-reset">
href="https://github.com/artifacthub/hub/blob/master/docs/repositories.md"
className="text-reset"
>
<u>repositories guide</u> <u>repositories guide</u>
</ExternalLink> </ExternalLink>
. .

View File

@ -245,7 +245,7 @@ exports[`Repository Modal - repositories section creates snapshot 1`] = `
For more information about the url format and the repository structure, please see the For more information about the url format and the repository structure, please see the
<a <a
class="link text-reset" class="link text-reset"
href="https://github.com/artifacthub/hub/blob/master/docs/repositories.md#helm-charts-repositories" href="/docs/repositories#helm-charts-repositories"
rel="noopener noreferrer" rel="noopener noreferrer"
role="button" role="button"
target="_blank" target="_blank"
@ -257,7 +257,7 @@ exports[`Repository Modal - repositories section creates snapshot 1`] = `
section in the section in the
<a <a
class="link text-reset" class="link text-reset"
href="https://github.com/artifacthub/hub/blob/master/docs/repositories.md" href="/docs/repositories"
rel="noopener noreferrer" rel="noopener noreferrer"
role="button" role="button"
target="_blank" target="_blank"

View File

@ -56,7 +56,7 @@ exports[`Authorization settings index creates snapshot 1`] = `
. Depending on your requirements, you can use a predefined policy and only supply a data file, or you can provide your custom policy for maximum flexibility. For more information please see the . Depending on your requirements, you can use a predefined policy and only supply a data file, or you can provide your custom policy for maximum flexibility. For more information please see the
<a <a
class="link text-reset link" class="link text-reset link"
href="https://github.com/artifacthub/hub/blob/master/docs/authorization.md" href="/docs/authorization"
rel="noopener noreferrer" rel="noopener noreferrer"
role="button" role="button"
target="_blank" target="_blank"
@ -112,7 +112,7 @@ exports[`Authorization settings index creates snapshot 2`] = `
. Depending on your requirements, you can use a predefined policy and only supply a data file, or you can provide your custom policy for maximum flexibility. For more information please see the . Depending on your requirements, you can use a predefined policy and only supply a data file, or you can provide your custom policy for maximum flexibility. For more information please see the
<a <a
class="link text-reset link" class="link text-reset link"
href="https://github.com/artifacthub/hub/blob/master/docs/authorization.md" href="/docs/authorization"
rel="noopener noreferrer" rel="noopener noreferrer"
role="button" role="button"
target="_blank" target="_blank"

View File

@ -406,10 +406,7 @@ const AuthorizationSection = (props: Props) => {
</ExternalLink> </ExternalLink>
. Depending on your requirements, you can use a predefined policy and only supply a data file, or you can . Depending on your requirements, you can use a predefined policy and only supply a data file, or you can
provide your custom policy for maximum flexibility. For more information please see the{' '} provide your custom policy for maximum flexibility. For more information please see the{' '}
<ExternalLink <ExternalLink href="/docs/authorization" className={`text-reset ${styles.link}`}>
href="https://github.com/artifacthub/hub/blob/master/docs/authorization.md"
className={`text-reset ${styles.link}`}
>
documentation documentation
</ExternalLink> </ExternalLink>
. .