From 1617b40dca2bab863d3ea9ef0b64505c5ba28ae0 Mon Sep 17 00:00:00 2001 From: Chris Johnston Date: Wed, 27 Feb 2019 23:33:57 -0800 Subject: [PATCH] Use a relative path for docs index page logo Changes the paths for the logo on the index page of the documentation to use relative links instead of absolute ones. The current absolute path is just fine as long as the site is not hosted under another directory. When opening files locally (without serving them in docfx) these images will fail to load. In addition, if these files are served under a directory that is not the root endpoint (like: `docs.com/stable/`) the images will also break. I tested these changes locally using these steps: - Build & serve docs: `docfx docs/docfx.json --serve` - Verify that logo shows up on index page using all 3 themes - Open `docs/_site/index.html` - Verify logo works on all 3 themes --- docs/_template/light-dark-theme/styles/dark.css | 2 +- docs/_template/light-dark-theme/styles/gray.css | 2 +- docs/_template/light-dark-theme/styles/light.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_template/light-dark-theme/styles/dark.css b/docs/_template/light-dark-theme/styles/dark.css index 8ae0049d1..54ad76c79 100644 --- a/docs/_template/light-dark-theme/styles/dark.css +++ b/docs/_template/light-dark-theme/styles/dark.css @@ -304,5 +304,5 @@ span.arrow-r{ } .logo-switcher { - background: url("/marketing/logo/SVG/Combinationmark White.svg") no-repeat; + background: url("../marketing/logo/SVG/Combinationmark White.svg") no-repeat; } diff --git a/docs/_template/light-dark-theme/styles/gray.css b/docs/_template/light-dark-theme/styles/gray.css index 32ff7d208..4cb658788 100644 --- a/docs/_template/light-dark-theme/styles/gray.css +++ b/docs/_template/light-dark-theme/styles/gray.css @@ -311,5 +311,5 @@ span.arrow-r{ } .logo-switcher { - background: url("/marketing/logo/SVG/Combinationmark White.svg") no-repeat; + background: url("../marketing/logo/SVG/Combinationmark White.svg") no-repeat; } diff --git a/docs/_template/light-dark-theme/styles/light.css b/docs/_template/light-dark-theme/styles/light.css index 71910e774..a2ba30788 100644 --- a/docs/_template/light-dark-theme/styles/light.css +++ b/docs/_template/light-dark-theme/styles/light.css @@ -113,5 +113,5 @@ span.arrow-r{ } .logo-switcher { - background: url("/marketing/logo/SVG/Combinationmark.svg") no-repeat; + background: url("../marketing/logo/SVG/Combinationmark.svg") no-repeat; }