From 303ca82fb925ab9a0e0aa8bf68a2caa402afe0aa Mon Sep 17 00:00:00 2001
From: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Date: Fri, 26 Jan 2024 01:02:19 +1300
Subject: [PATCH] docs(fix): New external link icon workaround for
mkdocs-material 9.5.5 (#3823)
This is the easiest to maintain workaround now available. Upstream continues to reject the value such a feature for accessibility.
---
docs/content/assets/css/customizations.css | 8 ++++++--
docs/mkdocs.yml | 4 ++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/docs/content/assets/css/customizations.css b/docs/content/assets/css/customizations.css
index 49ede009..320da152 100644
--- a/docs/content/assets/css/customizations.css
+++ b/docs/content/assets/css/customizations.css
@@ -16,12 +16,16 @@ If you want to append instead, switch `::before` to `::after`.
src: url('../fonts/external-link.woff') format('woff');
}
-/* Matches the two nav link classes that start with `http` `href` values, regular docs pages use relative URLs instead. */
-.md-tabs__link[href^="http"]::before, .md-nav__link[href^="http"]::before {
+/*
+ Since mkdocs-material 9.5.5 broke support in our docs from DMS v13.3.1, we now use our own class name,
+ which has been included for the two external nav links in mkdocs.yml via workaround (insert HTML).
+*/
+.icon-external-link::before {
display: inline-block; /* treat similar to text */
font-family: 'external-link';
content:'\0041'; /* represents "A" which our font renders as an icon instead of the "A" glyph */
font-size: 80%; /* icon is a little too big by default, scale it down */
+ margin-right: 4px;
}
/* ============================================================================================================= */
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index 0d34b407..15d2c3b2 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -173,5 +173,5 @@ nav:
- 'General Information': contributing/general.md
- 'Tests': contributing/tests.md
- 'Issues and Pull Requests': contributing/issues-and-pull-requests.md
- - 'DockerHub': https://hub.docker.com/r/mailserver/docker-mailserver/
- - 'GHCR': https://github.com/docker-mailserver/docker-mailserver/pkgs/container/docker-mailserver
+ - 'DockerHub': https://hub.docker.com/r/mailserver/docker-mailserver/
+ - 'GHCR': https://github.com/docker-mailserver/docker-mailserver/pkgs/container/docker-mailserver