From 75bdec14ee4bd7d2db752410cf1f10a29196a027 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 19 Apr 2020 20:44:14 +0200 Subject: [PATCH] _layouts/docs.html: remove baseURL and fix link-fixing script The base href caused browsers to produce incorrect URLs for anchor links on various pages, for example, pointing to: https://docs-test.docker.com/engine/reference/#foreground Instead of https://docs-test.docker.com/engine/reference/run/#foreground Also cleaning up and fixing the JavaScript workaround for links in include-files; - only fix up links in the main content, not in other parts of the page - don't fix up anchor links, absolute links, or links that don't contain `.md`: for those we can assume they were generated correctly, and if not, those are links that should be fixed in the markdown source, not fixed afterwards. - document the function for future readers. Signed-off-by: Sebastiaan van Stijn --- _layouts/docs.html | 71 +++++++++++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 19 deletions(-) diff --git a/_layouts/docs.html b/_layouts/docs.html index 526e148ea0..66bb2b2d14 100755 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -161,26 +161,59 @@ {% endif -%} {% endunless %} - {% if page.noratings != true %}