Skip to content

Commit 1bbbd24

Browse files
committed
show-on-path shortcode
1 parent acda1c4 commit 1bbbd24

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

content/operate/rs/databases/active-active/develop/develop-for-aa.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,19 @@ execute them in script-replication mode.
9797

9898
## Eviction
9999

100-
The default policy for Active-Active databases is _noeviction_ mode. Redis Enterprise version 6.0.20 and later support all eviction policies for Active-Active databases, unless [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering" >}})(previously known as Redis on Flash) is enabled.
100+
{{< show-on-path filepath="/operate/rs/databases/active-active/develop/develop-for-aa" >}}
101+
102+
The default policy for Active-Active databases is _noeviction_ mode. Redis Enterprise version 6.0.20 and later support all eviction policies for Active-Active databases, unless [Auto Tiering]({{< relref "/operate/rs/databases/auto-tiering" >}}) (previously known as Redis on Flash) is enabled.
101103
For details, see [eviction for Active-Active databases]({{< relref "/operate/rs/databases/memory-performance/eviction-policy#active-active-database-eviction" >}}).
102104

105+
{{< /show-on-path >}}
106+
107+
{{< show-on-path filepath="/operate/rc/databases/active-active/develop/develop-for-aa" >}}
108+
109+
The default policy for Active-Active databases is _noeviction_ mode. All eviction policies are supported for Active-Active databases.
110+
For details, see [eviction for Active-Active databases]({{< relref "/operate/rc/databases/configuration/data-eviction-policies#active-active-replication-considerations" >}}).
111+
112+
{{< /show-on-path >}}
103113

104114
## Expiration
105115

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{/*
2+
Show-on-path shortcode that displays content only if the current page URL matches the specified filepath.
3+
4+
Usage:
5+
{{< show-on-path filepath="/path/to/page" >}}
6+
Content to show only on the specified path
7+
{{< /show-on-path >}}
8+
9+
Parameters:
10+
- filepath: The URL path to match against (required)
11+
*/}}
12+
13+
{{ $filepath := .Get "filepath" }}
14+
{{ $currentPath := .Page.RelPermalink }}
15+
16+
{{/* Remove trailing slash from both paths for consistent comparison */}}
17+
{{ $normalizedFilepath := cond (strings.HasSuffix $filepath "/") (substr $filepath 0 (sub (len $filepath) 1)) $filepath }}
18+
{{ $normalizedCurrentPath := cond (strings.HasSuffix $currentPath "/") (substr $currentPath 0 (sub (len $currentPath) 1)) $currentPath }}
19+
20+
{{/* Display content only if paths match */}}
21+
{{ if eq $normalizedCurrentPath $normalizedFilepath }}
22+
{{ .Inner | markdownify }}
23+
{{ end }}

0 commit comments

Comments
 (0)