diff options
author | Episteme Health Inc <ehi-git@epistemehealth.com> | 2020-12-30 06:43:44 +0300 |
---|---|---|
committer | Episteme Health Inc <ehi-git@epistemehealth.com> | 2020-12-30 06:43:44 +0300 |
commit | bd9cbabe8971032de4897d5df3d322b77f7ad8d9 (patch) | |
tree | 02c7292411eac5781f268683d685387699f3f88d | |
parent | d5e0c8e81904725920bd5c6868021d9d95e7a7f7 (diff) |
relative links HTML galleys
Making relative links for HTML galleys in case a website is hosted in a subfolder rather than root.
-rw-r--r-- | exampleSite/config.toml | 7 | ||||
-rw-r--r-- | exampleSite/content/article/1/assets/guide.html | 4 | ||||
-rw-r--r-- | layouts/home.htmlgalleyfonts.css (renamed from static/css/html-galley-fonts.css) | 8 |
3 files changed, 12 insertions, 7 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 64dc2a4..33a4007 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -140,6 +140,11 @@ theme = "health-science-journal" isPlainText = true mediaType = "text/css" path = "" + [outputFormats.htmlgalleyfonts] + baseName = "css/htmlgalleyfonts" + isPlainText = true + mediaType = "text/css" + path = "" [outputFormats.exportris] baseName = "export-citation" isPlainText = true @@ -162,7 +167,7 @@ theme = "health-science-journal" path = "" [outputs] - home = ["HTML", "customlens", "localfonts", "lensfonts"] + home = ["HTML", "customlens", "localfonts", "lensfonts", "htmlgalleyfonts"] page = ["html", "galleyPDF", "galleyXML", "galleyHTML", "exportris", "exportenw", "exportbib", "exportcsljson" ] [taxonomies] diff --git a/exampleSite/content/article/1/assets/guide.html b/exampleSite/content/article/1/assets/guide.html index b1bf936..0926e8b 100644 --- a/exampleSite/content/article/1/assets/guide.html +++ b/exampleSite/content/article/1/assets/guide.html @@ -1,8 +1,8 @@ <!doctype html> <html> <head> -<link rel="stylesheet" href="/css/html-galley-fonts.css" type="text/css"> -<link rel="stylesheet" href="/css/html-galley.css" type="text/css"> +<link rel="stylesheet" href="../../../../css/htmlgalleyfonts.css" type="text/css"> +<link rel="stylesheet" href="../../../../css/html-galley.css" type="text/css"> <title>Guide to using the Health Sciences Journal Theme</title> </head> <h1>Guide to using the Health Sciences Journal Theme</h1> diff --git a/static/css/html-galley-fonts.css b/layouts/home.htmlgalleyfonts.css index a560ecd..439fd53 100644 --- a/static/css/html-galley-fonts.css +++ b/layouts/home.htmlgalleyfonts.css @@ -4,7 +4,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(/fonts/PTSerif-cyrillic-ext.woff2) format('woff2'); + src: url({{ .Site.BaseURL }}/fonts/PTSerif-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } /* cyrillic */ @@ -13,7 +13,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(/fonts/PTSerif-cyrillic.woff2) format('woff2'); + src: url({{ .Site.BaseURL }}/fonts/PTSerif-cyrillic.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @@ -22,7 +22,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(/fonts/PTSerif-latin-ext.woff2) format('woff2'); + src: url({{ .Site.BaseURL }}/fonts/PTSerif-latin-ext.woff2) format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @@ -31,6 +31,6 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(/fonts/PTSerif-latin.woff2) format('woff2'); + src: url({{ .Site.BaseURL }}/fonts/PTSerif-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
\ No newline at end of file |