mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 14:21:18 +00:00
Fix for docs redirects (#2895)
* Fixing redirects Signed-off-by: jonasrosland <jrosland@vmware.com> * Fix netlify config Signed-off-by: jonasrosland <jrosland@vmware.com> * Add previous redirects Signed-off-by: jonasrosland <jrosland@vmware.com> * Change netlify publish path Signed-off-by: jonasrosland <jrosland@vmware.com> * Add new redirect for restic Signed-off-by: jonasrosland <jrosland@vmware.com>
This commit is contained in:
@@ -88,7 +88,7 @@ enableGitInfo: true
|
||||
permalinks:
|
||||
posts: "/blog/:slug/"
|
||||
outputs:
|
||||
home: ["HTML"]
|
||||
home: [ "HTML", "REDIRECTS" ]
|
||||
section: ["HTML"]
|
||||
page: ["HTML"]
|
||||
taxonomy: ["HTML"]
|
||||
@@ -104,3 +104,11 @@ markup:
|
||||
noClasses: true
|
||||
style: monokai
|
||||
tabWidth: 4
|
||||
|
||||
mediaTypes:
|
||||
"text/netlify":
|
||||
delimiter: ""
|
||||
outputFormats:
|
||||
REDIRECTS:
|
||||
mediaType: "text/netlify"
|
||||
baseName: "_redirects"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
{{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $styles := resources.Get "styles.scss" | toCSS $options | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink | relURL }}" integrity="{{ $styles.Data.Integrity }}">
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}">
|
||||
{{ block "title" . }}<title>{{ .Site.Title }} {{ .Page.Title }}</title>{{ end }}
|
||||
</head>
|
||||
<body id="{{ .CurrentSection.Params.id }}">
|
||||
|
||||
@@ -14,11 +14,6 @@
|
||||
<title>{{ .Site.Title }} Docs - {{ .Title }}</title>
|
||||
{{ end }}
|
||||
|
||||
{{ if not (isset .CurrentSection.Params "version") }}
|
||||
{{ $latest_url := replace .Permalink "/docs" (printf "/docs/%s" .Site.Params.latest) | relURL }}
|
||||
<meta http-equiv="refresh" content="0; URL={{ $latest_url }}" />
|
||||
{{ end }}
|
||||
|
||||
<body id="docs">
|
||||
<div class="container-fluid site-outer-container">
|
||||
<div class="site-container">
|
||||
|
||||
14
site/layouts/index.redirects
Normal file
14
site/layouts/index.redirects
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ $versions := site.Params.versions }}
|
||||
{{ $latest := site.Params.latest }}
|
||||
/docs /docs/{{ $latest }} 301!
|
||||
/docs/latest /docs/{{ $latest }}
|
||||
/docs/latest/* /docs/{{ $latest }}/:splat
|
||||
/docs/troubleshooting /docs/{{ $latest }}/troubleshooting
|
||||
/docs/supported-providers /docs/{{ $latest }}/supported-providers
|
||||
/docs/zenhub /docs/{{ $latest }}/zenhub
|
||||
/docs/install-overview /docs/{{ $latest }}/basic-install
|
||||
/docs/start-contributing /docs/{{ $latest }}/start-contributing
|
||||
/docs/customize-installation /docs/{{ $latest }}/customize-installation
|
||||
/docs/faq /docs/{{ $latest }}/faq
|
||||
/docs/csi /docs/{{ $latest }}/csi
|
||||
/docs/restic /docs/{{ $latest }}/restic
|
||||
@@ -6,6 +6,6 @@
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
{{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $styles := resources.Get "styles.scss" | toCSS $options | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink | relURL }}" integrity="{{ $styles.Data.Integrity }}">
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}">
|
||||
{{/* TODO {% seo %}*/}}
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user