Skip to content

Commit 8c4fae2

Browse files
Jan PalmaJan Palma
authored andcommitted
Added Tags to Docs Pages
1 parent 72c383e commit 8c4fae2

File tree

7 files changed

+100
-5
lines changed

7 files changed

+100
-5
lines changed

exampleSite/content/docs/getting-started.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: Getting Started
33
weight: 1
4+
tags:
5+
- Docs
6+
- Guide
47
next: /docs/guide
58
prev: /docs
69
---

exampleSite/content/docs/guide/configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Configuration
33
weight: 2
4+
tags:
5+
- Config
46
---
57

68
Hugo reads its configuration from `hugo.yaml` in the root of your Hugo site.

exampleSite/hugo.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ params:
167167
article:
168168
displayPagination: true
169169

170+
docs:
171+
displayTags: true
172+
170173
highlight:
171174
copy:
172175
enable: true

exampleSite/hugo_stats.json

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"htmlElements": {
33
"tags": [
44
"a",
5+
"annotation",
56
"article",
67
"aside",
78
"blockquote",
@@ -34,13 +35,31 @@
3435
"li",
3536
"link",
3637
"main",
38+
"math",
3739
"meta",
40+
"mfrac",
41+
"mi",
42+
"mn",
43+
"mo",
44+
"mover",
45+
"mpadded",
46+
"mphantom",
47+
"mrow",
48+
"mstyle",
49+
"msub",
50+
"msubsup",
51+
"msup",
52+
"mtable",
53+
"mtd",
54+
"mtext",
55+
"mtr",
3856
"nav",
3957
"ol",
4058
"p",
4159
"path",
4260
"pre",
4361
"script",
62+
"semantics",
4463
"span",
4564
"strong",
4665
"style",
@@ -64,14 +83,21 @@
6483
"[counter-reset:step]",
6584
"[hyphens:auto]",
6685
"[word-break:break-word]",
86+
"base",
6787
"chroma",
88+
"col-align-l",
89+
"col-align-r",
6890
"content",
6991
"copy-icon",
7092
"dataframe",
93+
"delimcenter",
94+
"delimsizing",
7195
"filename",
96+
"fix",
7297
"footnote-backref",
7398
"footnote-ref",
7499
"footnotes",
100+
"frac-line",
75101
"hamburger-menu",
76102
"hextra-badge",
77103
"hextra-card",
@@ -92,12 +118,16 @@
92118
"hextra-jupyter-code-cell",
93119
"hextra-jupyter-code-cell-outputs",
94120
"hextra-jupyter-code-cell-outputs-container",
121+
"hextra-max-footer-width",
122+
"hextra-max-navbar-width",
123+
"hextra-max-page-width",
95124
"hextra-pdf",
96125
"hextra-scrollbar",
97126
"hextra-sidebar-collapsible-button",
98127
"hextra-tabs-panel",
99128
"hextra-tabs-toggle",
100129
"hextra-toc",
130+
"hide-tail",
101131
"highlight",
102132
"hx:-mb-0.5",
103133
"hx:-ml-2",
@@ -391,6 +421,7 @@
391421
"hx:ltr:rotate-180",
392422
"hx:ltr:text-right",
393423
"hx:m-[11px]",
424+
"hx:max-h-(--menu-height)",
394425
"hx:max-h-64",
395426
"hx:max-h-[calc(100vh-var(--navbar-height)-env(safe-area-inset-bottom))]",
396427
"hx:max-h-[min(calc(50vh-11rem-env(safe-area-inset-bottom)),400px)]",
@@ -404,7 +435,6 @@
404435
"hx:max-w-[90rem]",
405436
"hx:max-w-[min(calc(100vw-2rem),calc(100%+20rem))]",
406437
"hx:max-w-none",
407-
"hx:max-w-screen-xl",
408438
"hx:max-xl:hidden",
409439
"hx:mb-10",
410440
"hx:mb-12",
@@ -578,6 +608,7 @@
578608
"hx:text-indigo-900",
579609
"hx:text-left",
580610
"hx:text-lg",
611+
"hx:text-none",
581612
"hx:text-orange-800",
582613
"hx:text-primary-800",
583614
"hx:text-red-900",
@@ -618,25 +649,66 @@
618649
"hx:z-20",
619650
"hx:z-[-1]",
620651
"icon",
652+
"inner",
653+
"katex",
654+
"katex-display",
655+
"katex-html",
656+
"katex-mathml",
621657
"language-options",
622658
"language-switcher",
659+
"large-op",
623660
"lntable",
624661
"lntd",
662+
"mathbf",
663+
"mathnormal",
664+
"mathrm",
665+
"mbin",
666+
"mclose",
625667
"mermaid",
668+
"mfrac",
669+
"minner",
670+
"mop",
671+
"mopen",
672+
"mord",
673+
"mrel",
674+
"mspace",
675+
"msupsub",
676+
"mtable",
677+
"mtight",
626678
"nav-container",
627679
"nav-container-blur",
628680
"next-error-h1",
629681
"not-prose",
682+
"nulldelimiter",
683+
"op-symbol",
630684
"open",
685+
"pstrut",
686+
"reset-size3",
687+
"reset-size6",
688+
"rlap",
631689
"search-input",
632690
"search-results",
633691
"search-wrapper",
634692
"sidebar-active-item",
635693
"sidebar-container",
694+
"size1",
695+
"size3",
696+
"sizing",
636697
"steps",
698+
"strut",
637699
"subheading-anchor",
638700
"success-icon",
639-
"theme-toggle"
701+
"svg-align",
702+
"text",
703+
"textrm",
704+
"theme-toggle",
705+
"vlist",
706+
"vlist-r",
707+
"vlist-s",
708+
"vlist-t",
709+
"vlist-t2",
710+
"x-arrow",
711+
"x-arrow-pad"
640712
],
641713
"ids": null
642714
}

layouts/_default/term.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{ if .Title }}<h1 class="hx:text-center hx:mt-2 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100">{{ .Title }}</h1>{{ end }}
99
<div class="hx:mb-16"></div>
1010
<div class="content">
11-
{{ .Content }}
11+
{{ .Content }}
1212
</div>
1313
<div>
1414
{{- range .Pages -}}
@@ -21,9 +21,16 @@ <h3>
2121
title="{{ .LinkTitle }}"
2222
>
2323
{{ .Title }}
24+
{{ if eq .Section "docs" }}
25+
<span class="hx:text-none hx:inline-flex hx:gap-1 hx:items-center hx:rounded-full hx:px-2 hx:leading-6 hx:text-[.65rem] hx:border hx:text-gray-600 hx:bg-gray-100 hx:dark:bg-neutral-800 hx:dark:text-neutral-200 hx:border-gray-200 hx:dark:border-neutral-700 ">
26+
Docs
27+
</span>
28+
{{ end }}
2429
</a>
30+
{{ if .Date }}
31+
<p class="hx:opacity-50 hx:text-sm hx:leading-7">{{ partial "utils/format-date" .Date }}</p>
32+
{{ end }}
2533
</h3>
26-
<p class="hx:opacity-50 hx:text-sm hx:leading-7">{{ partial "utils/format-date" .Date }}</p>
2734
</div>
2835
{{- end -}}
2936
</div>

layouts/blog/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h3><a style="color: inherit; text-decoration: none;" class="hx:block hx:font-se
1414
{{- if site.Params.blog.list.displayTags -}}
1515
{{ with .Params.tags }}
1616
<p class="hx:opacity-50 hx:text-sm hx:leading-7">
17-
{{- range . }}<a class="hx:inline-block hx:mr-2">#{{ . }}</a>{{ end -}}
17+
{{- range . }}<a class="hx:inline-block hx:mr-2" href='{{ "/tags/" | relLangURL }}{{ . | urlize }}'>#{{ . }}</a>{{ end -}}
1818
</p>
1919
{{ end -}}
2020
{{- end -}}

layouts/docs/single.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
<article class="hx:w-full hx:break-words hx:flex hx:min-h-[calc(100vh-var(--navbar-height))] hx:min-w-0 hx:justify-center hx:pb-8 hx:pr-[calc(env(safe-area-inset-right)-1.5rem)]">
66
<main class="hx:w-full hx:min-w-0 hx:max-w-6xl hx:px-6 hx:pt-4 hx:md:px-12">
77
{{ partial "breadcrumb.html" . }}
8+
{{- if site.Params.docs.displayTags -}}
9+
{{ with .Params.tags }}
10+
<p class="hx:opacity-50 hx:text-sm hx:leading-7 hx:pt-4">
11+
{{- range . }}<a class="hx:inline-block hx:mr-2" href='{{ "/tags/" | relLangURL }}{{ . | urlize }}'>#{{ . }}</a>{{ end -}}
12+
</p>
13+
{{ end -}}
14+
{{- end -}}
815
<div class="content">
916
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
17+
1018
{{ .Content }}
1119
</div>
1220
{{ partial "components/last-updated.html" . }}

0 commit comments

Comments
 (0)