Merge pull request #6456 from influxdata/jts/sitemap-fix

Jts/sitemap fix
pull/6458/head
Jason Stirnaman 2025-10-09 12:21:41 -05:00 committed by GitHub
commit cea4016b35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -84,11 +84,15 @@ exports.handler = (event, context, callback) => {
'.txt': true,
'.woff': true,
'.woff2': true,
'.xml': true,
'.yaml': true,
'.yml': true,
'.zip': true,
};
// Remove multiple slashes from path
// permanentRedirect(/\/{2,}/.test(request.uri), request.uri.replace(/\/{2,}/, `/`));
// Remove index.html from path
permanentRedirect(
request.uri.endsWith('index.html'),
@ -143,7 +147,7 @@ exports.handler = (event, context, callback) => {
////////////// CLI InfluxQL link (catch before latest redirect) //////////////
permanentRedirect(
/\/influxdb\/latest\/query_language\/spec/.test(request.uri),
request.uri.replace(/latest/, 'v1')
request.uri.replace(/latest/, 'v1.8')
);
////////////////////////// Latest version redirects //////////////////////////

View File

@ -3,4 +3,5 @@ User-agent: *
{{- else }}{{ range where .Site.Pages ".Params.noindex" true }}
Disallow: {{ .RelPermalink }}
{{ end -}}
{{ end -}}
{{ end -}}
Sitemap: {{ .Site.BaseURL }}sitemap.xml