Browse Source

Switch to more accessible header permalink anchors in documentation.

Dan Helfman 2 years ago
parent
commit
97fad15009
2 changed files with 9 additions and 2 deletions
  1. 1 2
      .eleventy.js
  2. 8 0
      docs/_includes/index.css

+ 1 - 2
.eleventy.js

@@ -23,8 +23,7 @@ module.exports = function(eleventyConfig) {
         }
     };
     let markdownItAnchorOptions = {
-        permalink: true,
-        permalinkClass: "direct-link"
+        permalink: markdownItAnchor.permalink.headerLink()
     };
 
     eleventyConfig.setLibrary(

+ 8 - 0
docs/_includes/index.css

@@ -530,3 +530,11 @@ main .elv-toc + h1 .direct-link {
 		display: none ;
 	}
 }
+
+.header-anchor {
+    text-decoration: none;
+}
+
+.header-anchor:hover::after {
+    content: " 🔗";
+}