Skip to content

Commit e233b60

Browse files
committed
Chore: Merge branch 'main' into mainframe
2 parents 03070ff + a8044d5 commit e233b60

File tree

18 files changed

+76
-88
lines changed

18 files changed

+76
-88
lines changed

.github/workflows/hugo-build-test.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{<banner "caution" "Under development">}}
2+
<br>
3+
This product on our example site is under development and changes are being added frequently.
4+
<br>
5+
Please reach out to <strong>#friends-of-the-docs</strong> on Slack to ask questions.
6+
{{</banner>}}

exampleSite/content/test-product/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ nd-content-type: landing-page
1313
# Intended for internal catalogue and search, case sensitive:
1414
# Agent, N4Azure, NIC, NIM, NGF, NAP-DOS, NAP-WAF, NGINX One, NGINX+, Solutions, Unit
1515
nd-product:
16+
cascade:
17+
nd-banner:
18+
enabled: true
19+
start-date: 2025-01-01
20+
md: /_banners/test-product-intro.md
1621
---
1722

1823
## About

exampleSite/content/test-product/call-out/call-out-param-types.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ The callout shortcode aims to support both, but **not** in the same shortcode in
1313
## The two callouts below using **unnamed** params
1414

1515
{{<call-out "" "Custom title" "fa fa-check-circle" "true">}}
16-
This callout uses the icon check-circle. **This should be an inline callout.**
16+
This callout uses the icon check-circle. **This should be an sideline callout.**
1717
{{</call-out>}}
1818

1919
{{<call-out "" "Custom title" "fa fa-check-circle" "false">}}
20-
This callout uses the icon check-circle. **This should be an sideline callout.**
20+
This callout uses the icon check-circle. **This should be an inline callout.**
2121
{{</call-out>}}
2222

2323
## The two callouts below using **named** params
2424
This should work exactly the same as the two callouts above
2525

26-
{{<call-out title="Custom title" icon="fa fa-check-circle" inline="true">}}
27-
This callout uses the icon check-circle. **This should be an inline callout.**
26+
{{<call-out title="Custom title" icon="fa fa-check-circle" sideline="true">}}
27+
This callout uses the icon check-circle. **This should be an sideline callout.**
2828
{{</call-out>}}
2929

30-
{{<call-out title="Custom title" icon="fa fa-check-circle" inline="asdas">}}
30+
{{<call-out title="Custom title" icon="fa fa-check-circle" sideline="true">}}
3131
This callout uses the icon check-circle. **This should be an sideline callout.**
3232
{{</call-out>}}

exampleSite/content/test-product/call-out/call-out-side.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ This assumes the callout text is shorter than the text in the callout.
4646
If the text in the paragraph is shorter than the callout, it's likely
4747
the content needs to be re-written.
4848

49-
{{<call-out "tip inline-callout" "Tip for Automated Reporting" >}}
49+
{{<call-out "tip" "Tip for Automated Reporting" >}}
5050
I am some call out text. Look at me go!
5151
{{</call-out>}}

layouts/partials/callout.html

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,48 @@
22
{{ $class := .class | default "" }}
33
{{ $title := .title | default "" }}
44
{{ $icon := .icon | default "" }}
5-
{{ $inlineParam := .inline | default "false" | lower }}
5+
{{ $sidelineParam := .sideline | default "false" | lower }}
66

7-
{{ if not (in (slice "true" "false") $inlineParam) }}
8-
{{ errorf "Invalid parameter 'inline'='%s' passed to blockquote partial from '%s'. Allowed values: true, false" $inlineParam .Page.Path }}
7+
{{ if not (in (slice "true" "false") $sidelineParam) }}
8+
{{ errorf "Invalid parameter 'sideline'='%s' passed to blockquote partial from '%s'. Allowed values: true, false" $sidelineParam .Page.Path }}
99
{{ end }}
1010

1111
{{/* Figure out inline/side and set class accordingly */}}
12-
{{ $inline := eq $inlineParam "true" }}
12+
{{ $sideline := eq $sidelineParam "true" }}
1313
{{ $sideOption := "side-callout" }}
1414
{{ $inlineOption := "inline-callout" }}
1515

16-
{{ if $inline }}
16+
{{ if $sideline }}
1717
{{ $class = printf "%s %s" $class $sideOption }}
1818
{{ else }}
1919
{{ $class = printf "%s %s" $class $inlineOption }}
2020
{{ end }}
2121

2222
{{/* Render a different block, if "loud" callouts are used */}}
23+
{{ $type := (index (split $class " ") 0) | strings.FirstUpper }}
2324
{{ $specialTitles := slice "Caution" "Warning" "Deprecated" "Important" }}
2425
{{ $specialTitleIcons := dict
2526
"Caution" "alert-triangle"
2627
"Warning" "alert-octagon"
2728
"Deprecated" "alert-octagon"
2829
"Important" "arrow-right-circle"
2930
}}
30-
{{ $icon := index $specialTitleIcons $title | default "" }}
31+
{{ $icon := index $specialTitleIcons $type | default "" }}
3132

32-
{{ $isSpecialTitle := in $specialTitles $title }}
33+
{{ $isSpecialTitle := in $specialTitles $type }}
3334
{{ if $isSpecialTitle }}
34-
{{/* Loud callouts */}}
35+
{{/* Loud callouts */}}
36+
<blockquote class="{{ $class }}">
3537
<div>
36-
<blockquote class="{{ $class }}">
37-
<div>
38-
<div class="call-out-type">
39-
{{ partial "feather" (dict "context" . "icon" $icon) .}}
40-
{{ $title }}
41-
</div>
42-
<div class="callout-content">
43-
{{ .content | markdownify }}
44-
</div>
38+
<div class="call-out-type">
39+
{{ partial "feather" (dict "context" . "icon" $icon) .}}
40+
{{ $title }}
4541
</div>
46-
</blockquote>
47-
</div>
42+
<div class="callout-content">
43+
{{ .content | markdownify }}
44+
</div>
45+
</div>
46+
</blockquote>
4847

4948
{{ else }}
5049

layouts/partials/changelog-date.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Get the product name -->
2+
{{ $productUrl := .Page.Permalink }}
3+
{{ $baseUrl := .Site.BaseURL }}
4+
{{ $linkSplit := split (replace $productUrl $baseUrl "") "/" }}
5+
{{ $productName := index $linkSplit 0 }}
6+
<!-- Get the content -->
7+
{{ $changelogContent := readFile (printf "content/%s/changelog.md" $productName) }}
8+
{{ $maxNumLogs := 3 }}
9+
{{ $headings := first $maxNumLogs (findRE `(?m)^##\s(.+)$` $changelogContent) }}
10+
11+
<ul>
12+
{{ if gt (len $headings) 0 }}
13+
{{ range $headings }}
14+
{{ $title := replaceRE "^##\\s" "" . }}
15+
<li><a href="{{ absURL (print $productName "/changelog/#" (urlize $title)) }}">{{ $title }}</a></li>
16+
{{ end }}
17+
<li><a href="{{ absURL (print $productName "/changelog/")}}">Older...</a></li>
18+
{{ else }}
19+
<li><p>No changelog found...</p></li>
20+
{{ end }}
21+
</ul>

layouts/partials/coveo-atomic.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<atomic-layout-section section="facets">
2222
<atomic-facet field="f5_product" label="Show by product"></atomic-facet>
2323
<atomic-facet field="language" label="Show by language"></atomic-facet>
24+
<atomic-facet field="f5_document_type" label="Show by type"></atomic-facet>
2425
</atomic-layout-section>
2526

2627
<!-- Main Section -->

layouts/shortcodes/banner.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{{- $type := .Get 0 | default (.Get "type") | default "" -}}
22
{{- $title := .Get 1 | default (.Get "title") | default "" -}}
33
{{ partial "callout.html" (dict
4-
"class" $type
4+
"class" (printf "%s %s" $type "call-out")
55
"title" $title
66
"icon" "fa-solid fa-triangle-exclamation"
7-
"inline" true
7+
"sideline" true
8+
"type" ($type | strings.FirstUpper)
89
"content" .Inner
910
) }}

layouts/shortcodes/before-you-begin.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"class" "tip"
33
"title" "Before you begin:"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}
88
{{ warnf "'<before-you-begin></before-you-begin>' is being deprecated. Use generic 'call-out' shortcode instead."}}

layouts/shortcodes/call-out.html

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{{/*
22

33
Usage:
4-
{{<call-out title="Custom title" icon="fa fa-check-circle" inline="true">}}
5-
This callout uses the icon check-circle. **This should be an inline callout.**
4+
{{<call-out title="Custom title" icon="fa fa-check-circle" sideline="true">}}
5+
This callout uses the icon check-circle. **This should be an sideline callout.**
66
{{</call-out>}}
77

88
Backwards compatibility usage:
99
{{<call-out "warning" "Custom title" "fa fa-check-circle" "true">}}
10-
This callout uses the icon check-circle. **This should be an inline callout.**
10+
This callout uses the icon check-circle. **This should be an sideline callout.**
1111
{{</call-out>}}
1212

1313
Depends on `callout.html` partial.
@@ -19,27 +19,16 @@
1919
{{ $icon := .Get 2 | default (.Get "icon") | default "" }}
2020

2121
{{/* Handle different versions of booleans */}}
22-
{{ $inlineParam := (.Get 3) | default (.Get "inline") | default "false" | lower }}
22+
{{ $sidelineParam := (.Get 3) | default (.Get "sideline") | default "false" | lower }}
2323
{{- /* Validate the parameter strictly */ -}}
24-
{{ if not (in (slice "true" "false") $inlineParam) }}
25-
{{ warnf "The '<call-out>' Shortcode parameter 'inline' must be 'true' or 'false', but got: '%s'. This will now default to 'false'" $inlineParam}}
26-
{{ end }}
27-
28-
{{ $inline := eq $inlineParam "true" }}
29-
30-
{{ $sideOption := "side-callout" }}
31-
{{ $inlineOption := "inline-callout" }}
32-
33-
{{ if $inline }}
34-
{{ $class = printf "%s %s" $class $inlineOption }}
35-
{{ else }}
36-
{{ $class = printf "%s %s" $class $sideOption }}
24+
{{ if not (in (slice "true" "false") $sidelineParam) }}
25+
{{ warnf "The '<call-out>' Shortcode parameter 'sideline' must be 'true' or 'false', but got: '%s'. This will now default to 'false'" $sidelineParam}}
3726
{{ end }}
3827

3928
{{ partial "callout.html" (dict
40-
"class" $class
29+
"class" (printf "%s %s" $class "call-out")
4130
"title" $title
4231
"icon" $icon
43-
"inline" $inline
32+
"sideline" $sidelineParam
4433
"content" .Inner
4534
) }}

layouts/shortcodes/caution.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"class" "caution call-out"
33
"title" "Caution"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}

layouts/shortcodes/deprecated.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"class" "warning call-out"
33
"title" "Deprecated"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}

layouts/shortcodes/important.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"class" "important call-out"
33
"title" "Important"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}

layouts/shortcodes/note.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"class" "note"
33
"title" "Note:"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}
88
{{ warnf "'<note></note>' is being deprecated. Use generic 'call-out' shortcode instead."}}

layouts/shortcodes/see-also.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"class" "tip"
33
"title" "See Also:"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}
88
{{ warnf "'<see-also></see-also>' is being deprecated. Use generic 'call-out' shortcode instead."}}

layouts/shortcodes/tip.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"class" "tip"
33
"title" "Tip:"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}
88
{{ warnf "'<tip></tip>' is being deprecated. Use generic 'call-out' shortcode instead."}}

layouts/shortcodes/warning.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"class" "warning call-out"
33
"title" "Warning"
44
"icon" ""
5-
"inline" "false"
5+
"sideline" "false"
66
"content" .Inner
77
) }}

0 commit comments

Comments
 (0)