Skip to content

Commit

Permalink
fix(docs): fix routing /3
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed May 13, 2024
1 parent 0887941 commit 306422f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 16 additions & 2 deletions docs/.helm/templates/20-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ spec:
http:
paths:
- path: /docs/{{ $versionURLNormalized }}/
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: {{ $.Chart.Name }}-{{ $versionDNSNormalized }}
port:
name: http
- path: /documentation/{{ $versionURLNormalized }}/
pathType: ImplementationSpecific
backend:
service:
name: {{ $.Chart.Name }}-{{ $versionDNSNormalized }}
Expand All @@ -61,7 +68,14 @@ spec:
http:
paths:
- path: /docs/{{ $versionURLNormalized }}/
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: {{ $.Chart.Name }}-{{ $versionDNSNormalized }}
port:
name: http
- path: /documentation/{{ $versionURLNormalized }}/
pathType: ImplementationSpecific
backend:
service:
name: {{ $.Chart.Name }}-{{ $versionDNSNormalized }}
Expand Down
4 changes: 3 additions & 1 deletion docs/.helm/templates/_rewrites.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ rewrite ^/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/docs/?$
rewrite ^/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/docs/(?<tail>.+) /docs/$ver/$tail redirect;

rewrite ^/documentation\.html$ /docs/ redirect;
rewrite ^/documentation/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)$ /docs/$ver/ redirect;
rewrite ^/documentation/?$ /docs/ redirect;
rewrite ^/documentation/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/?$ /docs/$ver/ redirect;
rewrite ^/documentation/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/index\.html$ /docs/$ver/ redirect;
rewrite ^/documentation/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/(?<tail>.+) /docs/$ver/$tail redirect;
rewrite ^/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/documentation\.html$ /docs/$ver/ redirect;
rewrite ^/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/documentation/?$ /docs/$ver/ redirect;
rewrite ^/(?<ver>v\d+(?:\.\d+(?:\.\d+(?:[^/]+)?)?)?|latest)/documentation/(?<tail>.+) /docs/$ver/$tail redirect;
Expand Down

0 comments on commit 306422f

Please sign in to comment.