Skip to content

Commit

Permalink
Enable docs taxonomies
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Mar 26, 2023
1 parent 0b52cc6 commit 64ddbab
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ baseURL: "https://icons.getbootstrap.com"
enableInlineShortcodes: true
enableRobotsTXT: true
metaDataFormat: "yaml"
disableKinds: ["404", "taxonomy", "term", "RSS"]
disableKinds: ["404", "RSS"]

publishDir: "_site"

Expand Down
22 changes: 22 additions & 0 deletions docs/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "head" . }}
</head>
<body class="d-flex flex-column min-vh-100">
{{ partialCached "skippy" . }}
{{ partialCached "navbar" . }}

<main class="my-auto p-5" id="content">
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</main>

{{- partialCached "scripts" . "default" }}
</body>
</html>
23 changes: 23 additions & 0 deletions docs/layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "head" . }}
</head>
<body class="d-flex flex-column min-vh-100">
{{ partialCached "skippy" . }}
{{ partialCached "navbar" . }}

<main class="my-auto p-5" id="content">
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</main>

{{- partialCached "footer" . }}
{{- partialCached "scripts" . "default" }}
</body>
</html>
23 changes: 23 additions & 0 deletions docs/layouts/_default/terms.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "head" . }}
</head>
<body class="d-flex flex-column min-vh-100">
{{ partialCached "skippy" . }}
{{ partialCached "navbar" . }}

<main class="my-auto p-5" id="content">
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</main>

{{- partialCached "footer" . }}
{{- partialCached "scripts" . "default" }}
</body>
</html>
Empty file removed docs/layouts/icons/list.html
Empty file.
19 changes: 17 additions & 2 deletions docs/layouts/icons/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,23 @@ <h1>{{ .Title }}</h1>

{{ if or .Params.tags .Params.categories -}}
<ul class="list-unstyled mb-3 mb-md-0">
{{ with .Params.tags }}<li><strong>Tags:</strong> {{ delimit . ", " }}</li>{{ end }}
{{ with .Params.categories }}<li><strong>Category:</strong> {{ delimit . ", " }}</li>{{ end }}
{{ with (.GetTerms "tags") -}}
<li>
<strong>Tags:</strong>
{{ range $index, $taxonomy := . -}}
{{- if gt $index 0 }}, {{ end -}}
<a href="{{ $taxonomy.Permalink }}">{{ $taxonomy.LinkTitle }}</a>
{{- end }}
</li>
{{ end -}}
{{ with (.GetTerms "categories") -}}
<li>
<strong>Category:</strong>
{{ range $index, $taxonomy := . -}}
<a href="{{ $taxonomy.Permalink }}">{{ $taxonomy.LinkTitle }}</a>
{{- end }}
</li>
{{- end }}
</ul>
{{- end }}
</div>
Expand Down

0 comments on commit 64ddbab

Please sign in to comment.