🔧 tweak MkDocs configuration

This commit is contained in:
Niels Lohmann 2021-11-06 22:36:25 +01:00
parent 0b263259e2
commit 5a5073dd2b
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
6 changed files with 20 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# Overview
# Binary Formats
Though JSON is a ubiquitous data format, it is not a very compact format suitable for data exchange, for instance over a network. Hence, the library supports

View File

@ -1,4 +1,4 @@
# Overview
# Element Access
There are many ways elements in a JSON value can be accessed:

View File

@ -1,4 +1,4 @@
# Overview
# Parsing
!!! note

View File

@ -1,4 +1,4 @@
# Overview
# Types
This page gives an overview how JSON values are stored and how this can be configured.

View File

@ -20,10 +20,13 @@ theme:
accent: indigo
font:
text: Roboto
code: Roboto Mono
code: JetBrains Mono
features:
- tabs
- instant
- navigation.instant
- navigation.tracking
- navigation.tabs
- navigation.indexes
- navigation.top
nav:
- Home:
@ -70,7 +73,7 @@ nav:
- integration/cmake.md
- integration/package_managers.md
- integration/pkg-config.md
- API:
- API Documentation:
- basic_json:
- 'Overview': api/basic_json/index.md
- '(Constructor)': api/basic_json/basic_json.md
@ -239,10 +242,13 @@ extra:
link: https://www.xing.com/profile/Niels_Lohmann
- icon: fontawesome/brands/paypal
link: https://www.paypal.me/nlohmann
generator: false
# Extensions
markdown_extensions:
- abbr
- admonition
- attr_list
- def_list
- codehilite:
guess_lang: false
@ -274,7 +280,8 @@ markdown_extensions:
plugins:
- search:
separator: '[\s\-\.]+'
separator: '[\s\-\.]'
lang: en
- minify:
minify_html: true

View File

@ -41,6 +41,10 @@ def check_structure():
for lineno, line in enumerate(file_content.readlines()):
line = line.strip()
# Overview pages should have a better title
if line == '# Overview':
print(f'{file}:{lineno+1}: Error: overview pages should have a better title!')
# lines longer than 160 characters are bad (unless they are tables)
if len(line) > 160 and '|' not in line:
print(f'{file}:{lineno+1}: Error: line is too long ({len(line)} vs. 160 chars)!')