File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 67
67
68
68
{{ $isExternal := hasPrefix $url "http" -}}
69
69
{{ if $isExternal -}}
70
- {{ if findRE "^https://opentelemetry.io/\\w" $url -}}
71
- {{ warnf "%s: use a local path, not an external URL, for the following reference to a site local page: %s"
72
- .Page.File.Path $url -}}
70
+ {{ $matches := findRESubmatch `^https?://(?:www\.)?opentelemetry.io(/?.*)$` $url -}}
71
+ {{ $otelIoPath := index (index $matches 0) 1 | default "/" -}}
72
+ {{ if $matches -}}
73
+ {{ warnf "%s: use a local path '%s' instead of external URL '%s' for reference to site-local page"
74
+ .Page.File.Path $otelIoPath $url -}}
73
75
{{ else if or
74
76
(findRE "^https://github.com/open-telemetry/opentelemetry-specification/(blob|tree)/main/specification/\\w" $url)
75
77
(findRE "^https://github.com/open-telemetry/opentelemetry-proto/(blob|tree)/main/docs/specification" $url)
You can’t perform that action at this time.
0 commit comments