Use relative path for CSS (#16)

We should use a relative path for the CSS URL for sites that do not run from the root path (eg. https://example.com/mywebsite)
This commit is contained in:
Alice 2023-05-21 19:22:50 +01:00 committed by GitHub
parent 749aee44a0
commit bbea1befdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View file

@ -1,7 +1,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- This ensures your site looks right on mobile devices -->
<link rel="stylesheet" type="text/css" href="/css/readable.min.css?v=1.1.0">
<link rel="stylesheet" type="text/css" href="{{relURL "css/readable.min.css?v=v1.1.0"}}">
<meta name="description" content='{{ .Page.Description }}'>
{{ if .Site.Params.favicon }}
<link rel="shortcut icon" href="{{ relURL ($.Site.Params.favicon) }}" type="image/x-icon" /> <!-- Show a favicon for your site, if one is configured in the Params section of the config. -->