diff options
author | Adam Tao <tcx4c70@gmail.com> | 2022-02-13 15:29:02 +0300 |
---|---|---|
committer | Adam Tao <tcx4c70@gmail.com> | 2022-02-13 15:29:02 +0300 |
commit | 3067775c1f2f269473003439d7ab2135a466db04 (patch) | |
tree | 455a0140ed53860bdb905adc3b425b6a83d88d47 | |
parent | b45b6f224f7bdf80845a5949a97b757192bbebcc (diff) |
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>
-rw-r--r-- | layouts/home.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/home.html b/layouts/home.html index 10c4558..1236513 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -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> |