File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ [show-if-param-content ] {
2+ background-color : rgb (231 , 248 , 255 );
3+ }
Original file line number Diff line number Diff line change 3636@import "/components/textContent.css" ;
3737@import "/components/aside.css" ;
3838@import "/components/refItem.css" ;
39+ @import "/components/showIfParam.css" ;
Original file line number Diff line number Diff line change 1+ {{/*
2+ Shortcode: showIfParam
3+ Description: Shows content conditionally based on a URL parameter value.
4+
5+ Usage:
6+ {{% showIfParam "paramName" "expectedValue" %}}
7+ Content to show when paramName=expectedValue
8+ {{% /showIfParam %}}
9+
10+ Parameters:
11+ - paramName: The URL parameter to check (required)
12+ - expectedValue: The value to match against (optional, defaults to "true")
13+
14+ Example:
15+ {{% showIfParam "feature" "beta" %}}
16+ This content will only show when URL has ?feature=beta
17+ {{% /showIfParam %}}
18+ */}}
19+
120{{ $param := .Get 0 }}
221{{ $value := .Get 1 | default "true" }}
322{{ $content := .Inner | markdownify }}
You can’t perform that action at this time.
0 commit comments