summaryrefslogtreecommitdiffhomepage
path: root/themes/docsy/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/docsy/layouts')
-rw-r--r--themes/docsy/layouts/404.html8
-rw-r--r--themes/docsy/layouts/_default/list.rss.xml9
-rw-r--r--themes/docsy/layouts/docs/list.html18
-rw-r--r--themes/docsy/layouts/partials/community_links.html2
-rw-r--r--themes/docsy/layouts/partials/favicons.html4
-rw-r--r--themes/docsy/layouts/partials/footer.html4
-rw-r--r--themes/docsy/layouts/partials/head.html4
-rw-r--r--themes/docsy/layouts/partials/hooks/body-end.html3
-rw-r--r--themes/docsy/layouts/partials/hooks/head-end.html3
-rw-r--r--themes/docsy/layouts/partials/navbar-version-selector.html8
-rw-r--r--themes/docsy/layouts/partials/navbar.html13
-rw-r--r--themes/docsy/layouts/partials/page-meta-links.html12
-rw-r--r--themes/docsy/layouts/partials/scripts.html5
-rw-r--r--themes/docsy/layouts/partials/search-input.html2
-rw-r--r--themes/docsy/layouts/partials/section-index.html29
-rw-r--r--themes/docsy/layouts/shortcodes/alert.html5
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/cover.html3
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/lead.html5
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/section.html8
-rw-r--r--themes/docsy/layouts/shortcodes/pageinfo.html5
-rw-r--r--themes/docsy/layouts/shortcodes/swaggerui.html16
-rw-r--r--themes/docsy/layouts/swagger/baseof.html33
-rw-r--r--themes/docsy/layouts/swagger/list.html17
-rw-r--r--themes/docsy/layouts/swagger/single.html3
24 files changed, 188 insertions, 31 deletions
diff --git a/themes/docsy/layouts/404.html b/themes/docsy/layouts/404.html
new file mode 100644
index 000000000..f648800b5
--- /dev/null
+++ b/themes/docsy/layouts/404.html
@@ -0,0 +1,8 @@
+{{ define "main"}}
+ <main id="main">
+ <div>
+ <h1 id="title">Not found</h1>
+ <p>Oops! This page doesn't exist. Try going back to our <a href="{{ "/" | relURL }}">home page</a>.</p>
+ </div>
+ </main>
+{{ end }}
diff --git a/themes/docsy/layouts/_default/list.rss.xml b/themes/docsy/layouts/_default/list.rss.xml
index ae4f908ae..b74bc3579 100644
--- a/themes/docsy/layouts/_default/list.rss.xml
+++ b/themes/docsy/layouts/_default/list.rss.xml
@@ -2,18 +2,13 @@
<channel>
<title>{{ .Site.Title }} – {{ .Title }}</title>
<link>{{ .Permalink }}</link>
- <description>Recent Hugo news from gohugo.io</description>
+ <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
- <image>
- <url>{{ "img/hugo.png" | absURL }}</url>
- <title>GoHugo.io</title>
- <link>{{ .Permalink }}</link>
- </image>
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
@@ -45,4 +40,4 @@
</item>
{{ end }}
</channel>
-</rss> \ No newline at end of file
+</rss>
diff --git a/themes/docsy/layouts/docs/list.html b/themes/docsy/layouts/docs/list.html
index 00cb3ab91..712247801 100644
--- a/themes/docsy/layouts/docs/list.html
+++ b/themes/docsy/layouts/docs/list.html
@@ -1,3 +1,17 @@
{{ define "main" }}
-{{ .Render "content" }}
-{{ end }} \ No newline at end of file
+<div class="td-content">
+ <h1>{{ .Title }}</h1>
+ {{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
+ {{ .Content }}
+ {{ partial "section-index.html" . }}
+ {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
+ {{ partial "feedback.html" .Site.Params.ui.feedback }}
+ <br />
+ {{ end }}
+ {{ if (.Site.DisqusShortname) }}
+ <br />
+ {{ partial "disqus-comment.html" . }}
+ {{ end }}
+ <div class="text-muted mt-5 pt-3 border-top">{{ partial "page-meta-lastmod.html" . }}</div>
+</div>
+{{ end }}
diff --git a/themes/docsy/layouts/partials/community_links.html b/themes/docsy/layouts/partials/community_links.html
index c61c67e35..48d64584a 100644
--- a/themes/docsy/layouts/partials/community_links.html
+++ b/themes/docsy/layouts/partials/community_links.html
@@ -1,6 +1,6 @@
{{ $links := .Site.Params.links }}
-<section class="row td-box td-box--4 td-box--gradient td-box--height-auto">
+<section class="row td-box td-box--4 td-box--gradient td-box--height-auto linkbox">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<h2>Learn and Connect</h2>
<p>Using or want to use {{ .Site.Title }}? Find out more here:
diff --git a/themes/docsy/layouts/partials/favicons.html b/themes/docsy/layouts/partials/favicons.html
index 43e5c9032..43897755e 100644
--- a/themes/docsy/layouts/partials/favicons.html
+++ b/themes/docsy/layouts/partials/favicons.html
@@ -7,6 +7,6 @@
<link rel="icon" type="image/png" href="{{ "favicons/android-36x36.png" | relURL }}" sizes="36x36">
<link rel="icon" type="image/png" href="{{ "favicons/android-48x48.png" | relURL }}" sizes="48x48">
<link rel="icon" type="image/png" href="{{ "favicons/android-72x72.png" | relURL }}" sizes="72x72">
-<link rel="icon" type="image/png" href="{{ "favicons/android-96x196.png" | relURL }}" sizes="96x196">
+<link rel="icon" type="image/png" href="{{ "favicons/android-96x96.png" | relURL }}" sizes="96x96">
<link rel="icon" type="image/png" href="{{ "favicons/android-144x144.png" | relURL }}" sizes="144x144">
-<link rel="icon" type="image/png" href="{{ "favicons/android-192x192.png" | relURL }}"sizes="192x192">
+<link rel="icon" type="image/png" href="{{ "favicons/android-192x192.png" | relURL }}" sizes="192x192">
diff --git a/themes/docsy/layouts/partials/footer.html b/themes/docsy/layouts/partials/footer.html
index d05eeb48a..dfb1f64d7 100644
--- a/themes/docsy/layouts/partials/footer.html
+++ b/themes/docsy/layouts/partials/footer.html
@@ -18,7 +18,7 @@
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
{{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
- {{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}">{{ T "footer_privacy_policy" }}</a></small>{{ end }}
+ {{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}" target="_blank">{{ T "footer_privacy_policy" }}</a></small>{{ end }}
{{ if not .Site.Params.ui.footer_about_disable }}
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
{{ end }}
@@ -29,7 +29,7 @@
{{ define "footer-links-block" }}
<ul class="list-inline mb-0">
{{ range . }}
- <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}">
+ <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}">
<a class="text-white" target="_blank" href="{{ .url }}">
<i class="{{ .icon }}"></i>
</a>
diff --git a/themes/docsy/layouts/partials/head.html b/themes/docsy/layouts/partials/head.html
index cb0375720..303eb8b8f 100644
--- a/themes/docsy/layouts/partials/head.html
+++ b/themes/docsy/layouts/partials/head.html
@@ -1,6 +1,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-{{ .Hugo.Generator }}
+{{ hugo.Generator }}
{{ if eq (getenv "HUGO_ENV") "production" }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
@@ -23,4 +23,4 @@
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
-{{ partial "hooks/head-end.html" . }} \ No newline at end of file
+{{ partial "hooks/head-end.html" . }}
diff --git a/themes/docsy/layouts/partials/hooks/body-end.html b/themes/docsy/layouts/partials/hooks/body-end.html
index e69de29bb..3e09f7aa1 100644
--- a/themes/docsy/layouts/partials/hooks/body-end.html
+++ b/themes/docsy/layouts/partials/hooks/body-end.html
@@ -0,0 +1,3 @@
+{{ with .Site.Params.algolia_docsearch }}
+<!-- scripts for algolia docsearch -->
+{{ end }} \ No newline at end of file
diff --git a/themes/docsy/layouts/partials/hooks/head-end.html b/themes/docsy/layouts/partials/hooks/head-end.html
index e69de29bb..e25d67d4b 100644
--- a/themes/docsy/layouts/partials/hooks/head-end.html
+++ b/themes/docsy/layouts/partials/hooks/head-end.html
@@ -0,0 +1,3 @@
+{{ with .Site.Params.algolia_docsearch }}
+<!-- stylesheet for algolia docsearch -->
+{{ end }} \ No newline at end of file
diff --git a/themes/docsy/layouts/partials/navbar-version-selector.html b/themes/docsy/layouts/partials/navbar-version-selector.html
new file mode 100644
index 000000000..6ac1ef63e
--- /dev/null
+++ b/themes/docsy/layouts/partials/navbar-version-selector.html
@@ -0,0 +1,8 @@
+<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ {{ .Site.Params.version_menu }}
+</a>
+<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
+ {{ range .Site.Params.versions }}
+ <a class="dropdown-item" href="{{ .url }}">{{ .version }}</a>
+ {{ end }}
+</div>
diff --git a/themes/docsy/layouts/partials/navbar.html b/themes/docsy/layouts/partials/navbar.html
index 5ed33d097..284283b3c 100644
--- a/themes/docsy/layouts/partials/navbar.html
+++ b/themes/docsy/layouts/partials/navbar.html
@@ -1,7 +1,7 @@
{{ $cover := .HasShortcode "blocks/cover" }}
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark {{ if $cover}} td-navbar-cover {{ end }}flex-column flex-md-row td-navbar">
- <a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
- <span class="navbar-logo">{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }} {{ end }}</span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
+ <a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
+ <span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
@@ -12,7 +12,14 @@
{{ with .Page }}
{{ $active = or $active ( $.IsDescendant .) }}
{{ end }}
- <a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
+ {{ $url := urls.Parse .URL }}
+ {{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
+ <a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
+ </li>
+ {{ end }}
+ {{ if .Site.Params.versions }}
+ <li class="nav-item dropdown d-none d-lg-block">
+ {{ partial "navbar-version-selector.html" . }}
</li>
{{ end }}
{{ if (gt (len .Site.Home.Translations) 0) }}
diff --git a/themes/docsy/layouts/partials/page-meta-links.html b/themes/docsy/layouts/partials/page-meta-links.html
index 0f18b1e37..8e2650f81 100644
--- a/themes/docsy/layouts/partials/page-meta-links.html
+++ b/themes/docsy/layouts/partials/page-meta-links.html
@@ -1,14 +1,24 @@
{{ if .Path }}
{{ $gh_repo := ($.Param "github_repo") }}
+{{ $gh_subdir := ($.Param "github_subdir") }}
+{{ $gh_project_repo := ($.Param "github_project_repo") }}
{{ if $gh_repo }}
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
{{ $editURL := printf "%s/edit/master/content/%s" $gh_repo .Path }}
-{{ if .Site.IsMultiLingual }}
+{{ if and ($gh_subdir) (.Site.Language.Lang) }}
+{{ $editURL = printf "%s/edit/master/%s/content/%s/%s" $gh_repo $gh_subdir ($.Site.Language.Lang) $.Path }}
+{{ else if .Site.Language.Lang }}
{{ $editURL = printf "%s/edit/master/content/%s/%s" $gh_repo ($.Site.Language.Lang) .Path }}
+{{ else if $gh_subdir }}
+{{ $editURL = printf "%s/edit/master/%s/content/%s" $gh_repo $gh_subdir $.Path }}
{{ end }}
{{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (htmlEscape $.Title )}}
<a href="{{ $editURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
<a href="{{ $issuesURL }}" target="_blank"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
+{{ if $gh_project_repo }}
+{{ $project_issueURL := printf "%s/issues/new" $gh_project_repo }}
+<a href="{{ $project_issueURL }}" target="_blank"><i class="fas fa-tasks fa-fw"></i> {{ T "post_create_project_issue" }}</a>
+{{ end }}
</div>
{{ end }}
{{ end }}
diff --git a/themes/docsy/layouts/partials/scripts.html b/themes/docsy/layouts/partials/scripts.html
index 7267b3393..cc8dc071e 100644
--- a/themes/docsy/layouts/partials/scripts.html
+++ b/themes/docsy/layouts/partials/scripts.html
@@ -2,12 +2,13 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
{{ $jsBase := resources.Get "js/base.js" }}
+{{ $jsAnchor := resources.Get "js/anchor.js" }}
{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }}
-{{ $js := (slice $jsBase $jsSearch) | resources.Concat "js/main.js" }}
+{{ $js := (slice $jsBase $jsAnchor $jsSearch) | resources.Concat "js/main.js" }}
{{ if .Site.IsServer }}
<script src="{{ $js.RelPermalink }}"></script>
{{ else }}
{{ $js := $js | minify | fingerprint }}
-<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
+<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ partial "hooks/body-end.html" . }}
diff --git a/themes/docsy/layouts/partials/search-input.html b/themes/docsy/layouts/partials/search-input.html
index 883ca3c3a..ee82a6988 100644
--- a/themes/docsy/layouts/partials/search-input.html
+++ b/themes/docsy/layouts/partials/search-input.html
@@ -1,3 +1,3 @@
-{{ with .Site.Params.gcs_engine_id }}
+{{ with or .Site.Params.gcs_engine_id .Site.Params.algolia_docsearch }}
<input type="search" class="form-control td-search-input" placeholder="&#xf002 {{ T "ui_search" }}" aria-label="{{ T "ui_search" }}" autocomplete="off">
{{ end }} \ No newline at end of file
diff --git a/themes/docsy/layouts/partials/section-index.html b/themes/docsy/layouts/partials/section-index.html
new file mode 100644
index 000000000..be3cbcd9c
--- /dev/null
+++ b/themes/docsy/layouts/partials/section-index.html
@@ -0,0 +1,29 @@
+<div class="section-index">
+ {{ $pages := (where .Site.Pages "Section" .Section).ByWeight }}
+ {{ $parent := .Page }}
+ {{ if $parent.Params.no_list }}
+ {{/* If no_list is true we don't show a list of subpages */}}
+ {{ else if $parent.Params.simple_list }}
+ {{/* If simple_list is true we show a bulleted list of subpages */}}
+ <ul>
+ {{ range $pages }}
+ {{ if eq .Parent $parent }}
+ <li><a href="{{ .RelPermalink }}">{{- .Title -}}</a></li>
+ {{ end }}
+ {{ end }}
+ </ul>
+ {{ else }}
+ {{/* Otherwise we show a nice formatted list of subpages with page descriptions */}}
+ <hr class="panel-line">
+ {{ range $pages }}
+ {{ if eq .Parent $parent }}
+ <div class="entry">
+ <h5>
+ <a href="{{ .RelPermalink }}">{{- .Title -}}</a>
+ </h5>
+ <p>{{ .Description | markdownify }}</p>
+ </div>
+ {{ end }}
+ {{ end }}
+ {{ end }}
+</div>
diff --git a/themes/docsy/layouts/shortcodes/alert.html b/themes/docsy/layouts/shortcodes/alert.html
index a95d8b2f8..ff3b0b342 100644
--- a/themes/docsy/layouts/shortcodes/alert.html
+++ b/themes/docsy/layouts/shortcodes/alert.html
@@ -1,5 +1,6 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ $color := .Get "color" | default "primary" }}
<div class="alert alert-{{ $color }}" role="alert">
{{ with .Get "title" }}<h4 class="alert-heading">{{ . | safeHTML }}</h4>{{ end }}
-{{ .Inner }}
-</div> \ No newline at end of file
+{{ .Inner | markdownify }}
+</div>
diff --git a/themes/docsy/layouts/shortcodes/blocks/cover.html b/themes/docsy/layouts/shortcodes/blocks/cover.html
index b9afb0408..5e14d6dca 100644
--- a/themes/docsy/layouts/shortcodes/blocks/cover.html
+++ b/themes/docsy/layouts/shortcodes/blocks/cover.html
@@ -1,3 +1,4 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ $blockID := printf "td-cover-block-%d" .Ordinal }}
{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }}
{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }}
@@ -30,7 +31,7 @@
{{ with .Get "title" }}<h1 class="display-1 mt-0 mt-md-5 pb-4">{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}<img class="td-cover-logo" src="{{ $logo_image_resized.RelPermalink }}" alt="{{ $title | html }} Logo">{{ end }}{{ $title | html }}</h1>{{ end }}
{{ with .Get "subtitle" }}<p class="display-2 text-uppercase mb-0">{{ . | html }}</p>{{ end }}
<div class="pt-3 lead">
- {{ .Inner }}
+ {{ .Inner | markdownify}}
</div>
</div>
</div>
diff --git a/themes/docsy/layouts/shortcodes/blocks/lead.html b/themes/docsy/layouts/shortcodes/blocks/lead.html
index a0c302214..f57ebb155 100644
--- a/themes/docsy/layouts/shortcodes/blocks/lead.html
+++ b/themes/docsy/layouts/shortcodes/blocks/lead.html
@@ -1,3 +1,4 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ $col_id := .Get "color" | default .Ordinal }}
{{ $height := .Get "height" | default "auto" }}
{{/* Height can be one of: auto, min, med, max, full. */}}
@@ -5,7 +6,7 @@
<section class="row td-box td-box--{{ $col_id }} position-relative td-box--gradient td-box--height-{{ $height }}">
<div class="container text-center td-arrow-down">
<span class="h4 mb-0">
- {{ .Inner }}
+ {{ .Inner | markdownify }}
</span>
</div>
-</section> \ No newline at end of file
+</section>
diff --git a/themes/docsy/layouts/shortcodes/blocks/section.html b/themes/docsy/layouts/shortcodes/blocks/section.html
index bbd4e1723..d5897f648 100644
--- a/themes/docsy/layouts/shortcodes/blocks/section.html
+++ b/themes/docsy/layouts/shortcodes/blocks/section.html
@@ -1,10 +1,12 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ $col_id := .Get "color" | default .Ordinal }}
{{ $height := .Get "height" | default "auto" }}
+{{ $type := .Get "type" | default "" }}
<a id="td-block-{{ .Ordinal }}" class="td-offset-anchor"></a>
<section class="row td-box td-box--{{ $col_id }} td-box--gradient td-box--height-{{ $height }}">
<div class="col">
- <div class="row">
- {{ .Inner }}
+ <div class="row {{ $type }}">
+ {{ .Inner | markdownify}}
</div>
</div>
-</section> \ No newline at end of file
+</section>
diff --git a/themes/docsy/layouts/shortcodes/pageinfo.html b/themes/docsy/layouts/shortcodes/pageinfo.html
new file mode 100644
index 000000000..303f8c5fd
--- /dev/null
+++ b/themes/docsy/layouts/shortcodes/pageinfo.html
@@ -0,0 +1,5 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
+{{ $color := .Get "color" | default "primary" }}
+<div class="pageinfo pageinfo-{{ $color }}">
+{{ .Inner }}
+</div>
diff --git a/themes/docsy/layouts/shortcodes/swaggerui.html b/themes/docsy/layouts/shortcodes/swaggerui.html
new file mode 100644
index 000000000..f0d59a158
--- /dev/null
+++ b/themes/docsy/layouts/shortcodes/swaggerui.html
@@ -0,0 +1,16 @@
+{{ $original := .Get "src" }}
+<div id="ohpen_swagger_ui"></div>
+<script>
+window.onload = function() {
+ const ui = SwaggerUIBundle({
+ url: {{ $original }},
+ dom_id: '#ohpen_swagger_ui',
+ presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIStandalonePreset
+ ]
+ })
+
+ window.ui = ui
+}
+</script> \ No newline at end of file
diff --git a/themes/docsy/layouts/swagger/baseof.html b/themes/docsy/layouts/swagger/baseof.html
new file mode 100644
index 000000000..160ef0ca1
--- /dev/null
+++ b/themes/docsy/layouts/swagger/baseof.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html lang="{{ .Site.Language.Lang }}" class="no-js">
+ <head>
+ {{ partial "head.html" . }}
+ <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
+ <link rel="stylesheet" type="text/css" href="/css/swagger-ui.css">
+ </head>
+ <body class="td-{{ .Kind }}">
+ <header>
+ {{ partial "navbar.html" . }}
+ </header>
+ <div class="container-fluid td-outer">
+ <div class="td-main">
+ <div class="row flex-xl-nowrap">
+ <div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
+ {{ partial "sidebar.html" . }}
+ </div>
+ <div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
+ {{ partial "toc.html" . }}
+ </div>
+ <main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
+ {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
+ <script src="/js/swagger-ui-bundle.js"></script>
+ <script src="/js/swagger-ui-standalone-preset.js"></script>
+ {{ block "main" . }}{{ end }}
+ </main>
+ </div>
+ </div>
+ {{ partial "footer.html" . }}
+ </div>
+ {{ partial "scripts.html" . }}
+ </body>
+</html> \ No newline at end of file
diff --git a/themes/docsy/layouts/swagger/list.html b/themes/docsy/layouts/swagger/list.html
new file mode 100644
index 000000000..712247801
--- /dev/null
+++ b/themes/docsy/layouts/swagger/list.html
@@ -0,0 +1,17 @@
+{{ define "main" }}
+<div class="td-content">
+ <h1>{{ .Title }}</h1>
+ {{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
+ {{ .Content }}
+ {{ partial "section-index.html" . }}
+ {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
+ {{ partial "feedback.html" .Site.Params.ui.feedback }}
+ <br />
+ {{ end }}
+ {{ if (.Site.DisqusShortname) }}
+ <br />
+ {{ partial "disqus-comment.html" . }}
+ {{ end }}
+ <div class="text-muted mt-5 pt-3 border-top">{{ partial "page-meta-lastmod.html" . }}</div>
+</div>
+{{ end }}
diff --git a/themes/docsy/layouts/swagger/single.html b/themes/docsy/layouts/swagger/single.html
new file mode 100644
index 000000000..00cb3ab91
--- /dev/null
+++ b/themes/docsy/layouts/swagger/single.html
@@ -0,0 +1,3 @@
+{{ define "main" }}
+{{ .Render "content" }}
+{{ end }} \ No newline at end of file