fix(home): Change to use RelPermalink

Permalink will generate a absolute link like
https://localhost:1313/css/main.min.css, which will make the browser
cannot find the file if you browse your resume in another machine
insteal of the one running `hugo server`.  Changing to use RelPermalink
will fix it, which will generate a relative link like /css/main.min.css.

Signed-off-by: Adam Tao <tcx4c70@gmail.com>
This commit is contained in:
Adam Tao 2022-02-13 20:29:02 +08:00
parent b45b6f224f
commit 3067775c1f

View file

@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{{ $style := resources.Get "css/main.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
<link href="https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap" rel="stylesheet">
{{ if .Site.Params.useFontAwesome }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
@ -13,7 +13,7 @@
{{ range .Site.Params.css }}
{{ $style := resources.Get (printf "css/%s" .) }}
{{ if $style }}
<link rel="stylesheet" href="{{ ($style | toCSS | minify | fingerprint).Permalink }}" />
<link rel="stylesheet" href="{{ ($style | toCSS | minify | fingerprint).RelPermalink }}" />
{{ end }}
{{ end }}
<title itemprop="name">{{ .Site.Title }}</title>