From 408837f312148cd0dd72c4accf72926c28863896 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 10 Jun 2019 16:35:36 +0200 Subject: [PATCH] Improved navigation with anchors Anchors are now offset above headings which results in the visible heading being just below the navbar. For now navigation by anchor only works with activated toc. A more comprehensive solution might come in the future. Signed-off-by: Jim Martens --- _assets/css/critical.scss | 7 +++++++ _config.yml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/_assets/css/critical.scss b/_assets/css/critical.scss index 6be1e70..3ecc94c 100644 --- a/_assets/css/critical.scss +++ b/_assets/css/critical.scss @@ -239,3 +239,10 @@ ul.list-unstyled li { color: #333; white-space: nowrap; } + +.anchor { + position: relative; + display: block; + top: -$navbarHeight; + visibility: hidden; +} diff --git a/_config.yml b/_config.yml index ac84d8b..4b8c36c 100644 --- a/_config.yml +++ b/_config.yml @@ -44,6 +44,8 @@ defaults: # Build settings markdown: kramdown +kramdown: + auto_ids: false include: - .htaccess exclude: