From a01ad31f1443fe18536555f56885c733aa3aa047 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 27 Sep 2021 15:31:49 +0300 Subject: [PATCH] docs: fix TOCs Make table of contents in the pages cleaner and more readable by dropping the main heading (H1 level) from TOCs. This was the original intention with the usage of "no_toc" kramdown magic, which was broken, however. The kramdown class magic needs to be specified on the line immediately following the headinds, otherwise it has no effect. We need to disable MD022 rule of mdlint as it does not understand this magic. (cherry picked from commit 819f333118258698a8a59a80a0ac975325138fe6) --- docs/advanced/architecture.md | 6 ++---- docs/advanced/customization-guide.md | 6 ++---- docs/advanced/developer-guide.md | 6 ++---- docs/advanced/e2e-configuration-reference.md | 6 ++---- docs/advanced/master-commandline-reference.md | 6 ++---- docs/advanced/worker-commandline-reference.md | 6 ++---- docs/advanced/worker-configuration-reference.md | 6 ++---- docs/get-started/deployment-and-usage.md | 6 ++---- docs/get-started/examples-and-demos.md | 6 ++---- docs/get-started/features.md | 6 ++---- docs/get-started/introduction.md | 6 ++---- docs/mdl-style.rb | 3 +++ 12 files changed, 25 insertions(+), 44 deletions(-) diff --git a/docs/advanced/architecture.md b/docs/advanced/architecture.md index ea25bbc97..194b13c20 100644 --- a/docs/advanced/architecture.md +++ b/docs/advanced/architecture.md @@ -6,12 +6,10 @@ published: false --- # Architecture - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/advanced/customization-guide.md b/docs/advanced/customization-guide.md index 59a88b3ee..f8a8a824f 100644 --- a/docs/advanced/customization-guide.md +++ b/docs/advanced/customization-guide.md @@ -6,12 +6,10 @@ published: false --- # Customization guide - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/advanced/developer-guide.md b/docs/advanced/developer-guide.md index 63a441181..38d36c9d0 100644 --- a/docs/advanced/developer-guide.md +++ b/docs/advanced/developer-guide.md @@ -5,12 +5,10 @@ sort: 1 --- # Developer guide - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/advanced/e2e-configuration-reference.md b/docs/advanced/e2e-configuration-reference.md index c7a858ad2..0244b6c45 100644 --- a/docs/advanced/e2e-configuration-reference.md +++ b/docs/advanced/e2e-configuration-reference.md @@ -6,12 +6,10 @@ published: false --- # Configuration file reference of end-to-end tests - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/advanced/master-commandline-reference.md b/docs/advanced/master-commandline-reference.md index a1aa8e876..c30cb2bb3 100644 --- a/docs/advanced/master-commandline-reference.md +++ b/docs/advanced/master-commandline-reference.md @@ -5,12 +5,10 @@ sort: 2 --- # Commandline flags of nfd-master - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/advanced/worker-commandline-reference.md b/docs/advanced/worker-commandline-reference.md index aac784e9a..1d60d4293 100644 --- a/docs/advanced/worker-commandline-reference.md +++ b/docs/advanced/worker-commandline-reference.md @@ -5,12 +5,10 @@ sort: 3 --- # Commandline flags of nfd-worker - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/advanced/worker-configuration-reference.md b/docs/advanced/worker-configuration-reference.md index 5df339e67..aa8daa52e 100644 --- a/docs/advanced/worker-configuration-reference.md +++ b/docs/advanced/worker-configuration-reference.md @@ -5,12 +5,10 @@ sort: 4 --- # Configuration file reference of nfd-worker - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} ***WORK IN PROGRESS.*** diff --git a/docs/get-started/deployment-and-usage.md b/docs/get-started/deployment-and-usage.md index ebbb70e69..aa947c86d 100644 --- a/docs/get-started/deployment-and-usage.md +++ b/docs/get-started/deployment-and-usage.md @@ -5,12 +5,10 @@ sort: 3 --- # Deployment and usage - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/get-started/examples-and-demos.md b/docs/get-started/examples-and-demos.md index 3826f8cb6..c1e8e75f0 100644 --- a/docs/get-started/examples-and-demos.md +++ b/docs/get-started/examples-and-demos.md @@ -5,12 +5,10 @@ sort: 5 --- # Examples and demos - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/get-started/features.md b/docs/get-started/features.md index 038e9e2aa..b0bf14197 100644 --- a/docs/get-started/features.md +++ b/docs/get-started/features.md @@ -5,12 +5,10 @@ sort: 4 --- # Feature discovery - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/get-started/introduction.md b/docs/get-started/introduction.md index edbe086dc..a3bde7ab6 100644 --- a/docs/get-started/introduction.md +++ b/docs/get-started/introduction.md @@ -5,12 +5,10 @@ sort: 1 --- # Introduction - -{: .no_toc } +{: .no_toc} ## Table of contents - -{: .no_toc .text-delta } +{: .no_toc .text-delta} 1. TOC {:toc} diff --git a/docs/mdl-style.rb b/docs/mdl-style.rb index 29ff31410..11d47d3a8 100644 --- a/docs/mdl-style.rb +++ b/docs/mdl-style.rb @@ -1,4 +1,7 @@ all +# Exclude MD022 - Headers should be surrounded by blank lines. The kramdown +# "class magic" (like {: .no_toc}) needs to be directly below the heading line. +exclude_rule 'MD022' # Exclude MD041 - First line in file should be a top level header exclude_rule 'MD041' rule 'MD013', :tables => false