chore: Update to mkdocs-simple v2.1.2 (#23)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
continuous-integration/drone Build is passing

Note the upstream refactor from mkdocs-simple v1 -> v2 was fairly large, so
  this is a rather larger update than most. And in fact one feature of
  mkdocs-semiliterate (universal markdown extraction) was incorporated into
  mkdocs-simple, so the initialization of this plugin is noticeably simplified
  as a result.

  Also updates mkdocs to 1.4.

Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Reviewed-on: #23
This commit is contained in:
Glen Whitney 2022-11-09 20:52:47 +00:00
parent 3b97489374
commit 4a4241a4e4
13 changed files with 218 additions and 147 deletions

View File

@ -86,7 +86,7 @@ steps:
# [repository site](https://code.studioinfinity.org/glen/mkdocs-semiliterate). # [repository site](https://code.studioinfinity.org/glen/mkdocs-semiliterate).
# Pull requests are welcome as well. If you're new to contributing to open-source # Pull requests are welcome as well. If you're new to contributing to open-source
# projects, `mkdocs-simple-plugin` has a very nice # projects, `mkdocs-simple-plugin` has a very nice
# [tutorial](https://athackst.github.io/mkdocs-simple-plugin/CONTRIBUTING/). # [tutorial](https://althack.dev/mkdocs-simple-plugin/v{! setup.cfg { extract: {start: 'mkdocs~=', stop: '(\d*\.\d*\.?\d*)'}, ensurelines: false} !}/CONTRIBUTING/).
# #
# ### Publishing # ### Publishing
# #

View File

@ -1,7 +1,8 @@
# ![Dreaming of integrated documentation](assets/icons8-ask-question-100.png) MkDocs semiliterate Plugin # ![Dreaming of integrated documentation](assets/icons8-ask-question-100.png) MkDocs semiliterate Plugin
This plugin for [MkDocs](http://mkdocs.org) is an extension of Allison Thackston's excellent [mkdocs-simple-plugin](https://athackst.github.io/mkdocs-simple-plugin). It allows you to include content from one file into another (via `{! ... !}` syntax), using exactly the same extraction specification that the `simple` plugin already uses for identifying documentation in source files. This plugin for [MkDocs](http://mkdocs.org) is an extension of Allison Thackston's excellent [mkdocs-simple-plugin](https://www.althack.dev/mkdocs-simple-plugin/). It allows you to include content from one file into another (via `{! ... !}` syntax), using exactly the same extraction specification that the `simple` plugin already uses for identifying documentation in source files.
<!-- repo: --><!-- site: The current version of mkdocs-semiliterate is {! setup.cfg { extract: {start: name}, terminate: '(\d*\.\d*\.\d*)', ensurelines: false} !}. --> <!-- repo: --><!-- site: The current version of mkdocs-semiliterate is {! setup.cfg { extract: {start: name}, terminate: '(\d*\.\d*\.\d*)', ensurelines: false} !}. -->
<!-- repo: --><!-- site: It is built on mkdocs-simple-plugin v{! setup.cfg { extract: {start: 'mkdocs~=', stop: '(\d*\.\d*\.?\d*)'}, ensurelines: false} !}. -->
## Rationale ## Rationale

View File

@ -8,6 +8,7 @@ plugins:
- semiliterate: - semiliterate:
merge_docs_dir: false merge_docs_dir: false
ignore_folders: [build, dist, tests, semiliterate] ignore_folders: [build, dist, tests, semiliterate]
ignore_hidden: false
include_extensions: [LICENSE, '.png'] include_extensions: [LICENSE, '.png']
extract_standard_markdown: extract_standard_markdown:
extract: extract:

View File

@ -1,4 +1,4 @@
""" md r""" md
## Usage ## Usage
Once this plugin is [installed](../README.md#installation), just replace Once this plugin is [installed](../README.md#installation), just replace
@ -6,14 +6,19 @@ the plugin name `simple` with `semiliterate` in your `mkdocs.yml` file.
It accepts all of the same parameters, so `mkdocs` will still work as before, It accepts all of the same parameters, so `mkdocs` will still work as before,
and you will have immediate access to all of the following extensions. and you will have immediate access to all of the following extensions.
(Note that this documentation assumes a familiarity with the (Note that this documentation assumes a familiarity with the
[usage](https://athackst.github.io/mkdocs-simple-plugin/mkdocs_simple_plugin/plugin/) [usage](https://althack.dev/mkdocs-simple-plugin/v{! ../setup.cfg {
extract: {start: 'mkdocs~=', stop: '(\d*\.\d*\.?\d*)'},
ensurelines: false
} !}/mkdocs_simple_plugin/plugin/)
of the `simple` plugin.) of the `simple` plugin.)
""" """
from mkdocs import utils from mkdocs import utils
from mkdocs.config import config_options from mkdocs.config import config_options
from mkdocs_simple_plugin.semiliterate import ( from mkdocs_simple_plugin.semiliterate import (
Semiliterate, LazyFile, ExtractionPattern, StreamExtract, get_line) Semiliterate, LazyFile, ExtractionPattern, StreamExtract,
get_line, get_match)
from mkdocs_simple_plugin.simple import Simple
from mkdocs_simple_plugin.plugin import SimplePlugin from mkdocs_simple_plugin.plugin import SimplePlugin
import os import os
@ -32,6 +37,15 @@ to replace_line method.
# except as marked: # except as marked:
def replace_line(self, line, ensure_line=True): def replace_line(self, line, ensure_line=True):
"""Apply the specified replacements to the line and return it.""" """Apply the specified replacements to the line and return it."""
# Process trimming
if self._trim:
line = line[self._trim:]
# Process inline content regex
if self._content:
match_object = get_match(self._content, line)
if match_object.lastindex:
return match_object[match_object.lastindex]
# Perform replace operations:
if not self.replace: if not self.replace:
return line return line
for item in self.replace: for item in self.replace:
@ -72,7 +86,7 @@ enclosed in single or double quotes. Note that FILENAME is interpreted relative
to the directory in which the file containing the `{! .. !}` expression to the directory in which the file containing the `{! .. !}` expression
resides. The YAML is interpreted exactly as the extraction options to a resides. The YAML is interpreted exactly as the extraction options to a
`semiliterate` item as `semiliterate` item as
[documented](https://athackst.github.io/mkdocs-simple-plugin/mkdocs_simple_plugin/plugin/index.html#semiliterate) [documented](https://althack.dev/mkdocs-simple-plugin/v{! ../setup.cfg { extract: {start: 'mkdocs~=', stop: '(\d*\.\d*\.?\d*)'}, ensurelines: false} !}/mkdocs_simple_plugin/plugin/index.html#semiliterate)
for the `simple` extension, subject to the extensions below. The text for the `simple` extension, subject to the extensions below. The text
extracted from FILENAME is interpolated at the current location in the file extracted from FILENAME is interpolated at the current location in the file
currently being written. Recursive inclusion is supported. currently being written. Recursive inclusion is supported.
@ -86,9 +100,7 @@ For an example that uses more of the extraction parameters, the current
version number of mkdocs-semiliterate is extracted into the version number of mkdocs-semiliterate is extracted into the
[Overview](../README.md) of this documentation via [Overview](../README.md) of this documentation via
` {! ../README.md extract: { start: 'repo:.*(\{!.*!\})', stop: '' } ` {! ../README.md extract: { start: 'repo:.*(\{!.*!\})', stop: 'repo' } !}`
terminate: Rationale
!}`
to take advantage of the beginning of the `setup.cfg` file: to take advantage of the beginning of the `setup.cfg` file:
``` ```
@ -270,19 +282,17 @@ anticipated by the `{%- block ... %}` directives placed by the theme writer.
self.wrote_something = True self.wrote_something = True
self.transcribe(remainder[body_match.end():]) self.transcribe(remainder[body_match.end():])
# ## The following has to be identical to StreamExtract.check_pattern # ## The following has to be identical to StreamExtract.try_extract_match
# ## except for the marked bit handling ensure_lines # ## except for the marked bit handling ensure_lines
def check_pattern(self, pattern, line, emit_last=True): def try_extract_match(
"""Check if pattern is contained in line. self,
match_object: re.Match,
emit_last: bool = True) -> bool:
"""Extract match into output.
If _pattern_ is not false-y and is contained in _line_, If _match_object_ is not false-y, returns true.
returns true (and if the _emit_last_ flag is true, If extract flag is true, emits the last group of the match if any.
emits the last group of the match if any). Otherwise,
check_pattern does nothing but return false.
""" """
if not pattern:
return False
match_object = pattern.search(line)
if not match_object: if not match_object:
return False return False
if match_object.lastindex and emit_last: if match_object.lastindex and emit_last:
@ -297,24 +307,6 @@ anticipated by the `{%- block ... %}` directives placed by the theme writer.
class SemiliteratePlugin(SimplePlugin): class SemiliteratePlugin(SimplePlugin):
r""" md An extension of the mkdocs-simple-plugin r""" md An extension of the mkdocs-simple-plugin
### Universal block-comment markdown
By default, `semiliterate` scans for block-comment markdown `/** md` ... `**/`
in all files with _any_ extension, as it's valid in so many disparate languages.
(As opposed to `simple`, which defaults to searching for such markdown in a
specific list of file types.)
"""
super_sdict = dict(SimplePlugin.config_scheme)
super_semi_dflt = super_sdict['semiliterate'].default
semi_dflt = [b if 'js' not in b['pattern'] else dict(b, pattern=r'\.')
for b in super_semi_dflt]
altered_config_scheme = dict(
super_sdict,
semiliterate=config_options.Type(list, default=semi_dflt)).items()
add_param_doc = r""" md
### Additional plugin parameters ### Additional plugin parameters
`semiliterate` adds a couple of new plugin parameters to further tailor its `semiliterate` adds a couple of new plugin parameters to further tailor its
@ -322,7 +314,7 @@ behavior as compared to `simple`. They are described in this section, with
default values in parentheses at the beginning of each entry. default values in parentheses at the beginning of each entry.
{! plugin.py extract: {! plugin.py extract:
start: '[*]altered_config_scheme' start: '[*]super_config_scheme'
replace: replace:
- ["\\('(.*)',\\s*$", '\1\n'] - ["\\('(.*)',\\s*$", '\1\n']
- ['config_options.Type.*?default=([^\)]*)', ': (\1)'] - ['config_options.Type.*?default=([^\)]*)', ': (\1)']
@ -334,9 +326,10 @@ terminate: '^\s*\)'
stop: '["]{3}' stop: '["]{3}'
!} !}
""" """
super_config_scheme = SimplePlugin.config_scheme
config_scheme = ( config_scheme = (
# Note documentation of each new parameter **follows** the parameter. # Note documentation of each new parameter **follows** the parameter.
*altered_config_scheme, *super_config_scheme,
('exclude_extensions', ('exclude_extensions',
config_options.Type(list, default=['.o'])), config_options.Type(list, default=['.o'])),
# Files whose name contains a string in this list will not be # Files whose name contains a string in this list will not be
@ -372,25 +365,6 @@ terminate: '^\s*\)'
) )
def on_config(self, config, **kwargs): def on_config(self, config, **kwargs):
# Since we have extensions in Demiliterate, suppress the semiliterate
# configuration until we handle it ourselves:
semi = self.config['semiliterate']
self.config['semiliterate'] = []
new_config = super().on_config(config, **kwargs)
self.config['semiliterate'] = semi
self.semiliterate = [Demiliterate(**item) for item in semi]
self.exclude_extensions = self.config['exclude_extensions']
dflt_enable = False
if not self.config['copy_standard_markdown']:
self.include_extensions = self.config['include_extensions']
dflt_enable = True
if self.config['extract_standard_markdown'].get('enable', dflt_enable):
ext_pat = '|'.join(re.escape(s) for s in utils.markdown_extensions)
self.semiliterate.append(
Demiliterate(
pattern=re.compile(f"^(.*(?:{ext_pat}))$"),
destination=r'\1',
**self.config['extract_standard_markdown']))
r""" md r""" md
### Adjusting the mkdocs theme ### Adjusting the mkdocs theme
@ -401,13 +375,17 @@ in the generated docs dir to the theme search path. (Note this means that
files in the corresponding subdirectory of your project will be copied into files in the corresponding subdirectory of your project will be copied into
the resulting doc site unless their names start with a '.') the resulting doc site unless their names start with a '.')
""" """
# Save the include extensions before SimplePlugin modifies them:
self.config['saved_includes'] = self.config['include_extensions']
new_config = super().on_config(config, **kwargs)
cfpath = os.path.dirname(config.config_file_path) cfpath = os.path.dirname(config.config_file_path)
self.custom_dir = None self.custom_dir = None
for themedir in config['theme'].dirs: for themedir in config['theme'].dirs:
common = os.path.commonpath([cfpath, themedir]) common = os.path.commonpath([cfpath, themedir])
if common == cfpath: if common == cfpath:
self.custom_dir = os.path.relpath(themedir, cfpath) self.custom_dir = os.path.relpath(themedir, cfpath)
newthemedir = os.path.join(self.build_docs_dir, self.custom_dir) newthemedir = os.path.join(
self.config['build_docs_dir'], self.custom_dir)
utils.log.debug( utils.log.debug(
'mkdocs-semiliterate: found theme.custom_dir = ' 'mkdocs-semiliterate: found theme.custom_dir = '
+ self.custom_dir + self.custom_dir
@ -427,17 +405,74 @@ the resulting doc site unless their names start with a '.')
+ f"from theme directory {self.custom_dir}") + f"from theme directory {self.custom_dir}")
files.remove(sources[path]) files.remove(sources[path])
def in_extensions(self, file): def on_pre_build(self, *, config):
"""Build documentation directory with files according to settings."""
semisimple = Semisimple(**self.config)
# Merge docs
if self.config["merge_docs_dir"]:
semisimple.merge_docs(self.orig_docs_dir)
# Copy all of the valid doc files into build_docs_dir
self.paths = semisimple.build_docs()
class Semisimple(Simple):
"""Mkdocs Semisimple Plugin"""
def __init__(self, semiliterate, exclude_extensions, saved_includes,
copy_standard_markdown, extract_standard_markdown,
extract_on_copy, **kwargs):
# Since we have extensions in Demiliterate, suppress the semiliterate
# configuration until we handle it ourselves:
super().__init__(semiliterate=[], **kwargs)
self.semiliterate = [Demiliterate(**item) for item in semiliterate]
self.exclude_extensions = exclude_extensions
self.extract_on_copy = extract_on_copy
dflt_enable = False
if not copy_standard_markdown:
self.copy_glob = set(saved_includes)
dflt_enable = True
if extract_standard_markdown.get('enable', dflt_enable):
ext_pat = '|'.join(re.escape(s) for s in utils.markdown_extensions)
self.semiliterate.append(
Demiliterate(
pattern=re.compile(f"^(.*(?:{ext_pat}))$"),
destination=r'\1',
**extract_standard_markdown))
def should_copy_file(self, file):
if any(ext in file for ext in self.exclude_extensions): if any(ext in file for ext in self.exclude_extensions):
return False return False
return super().in_extensions(file) return super().should_copy_file(file)
def extract_from(self, from_directory, name, to_directory): def try_extract(self, from_directory, name, to_directory):
if any(ext in name for ext in self.exclude_extensions): if any(ext in name for ext in self.exclude_extensions):
return False return False
if not self.config['extract_on_copy'] and self.in_extensions(name): if not self.extract_on_copy and self.should_copy_file(name):
return False return False
return super().extract_from(from_directory, name, to_directory) return super().try_extract(from_directory, name, to_directory)
# Had to override this because the simple version hardcoded that if a file
# was copied, it could not be extracted. So check carefully for changes in
# simple. Only the lines between # # START and # # END differ.
def build_docs(self) -> list:
"""Build the docs directory from workspace files."""
paths = []
files = self.get_files()
for file in files:
if not os.path.isfile(file):
continue
from_dir = os.path.dirname(file)
name = os.path.basename(file)
build_prefix = os.path.normpath(
os.path.join(self.build_dir, from_dir))
# # START
copied = self.try_copy_file(from_dir, name, build_prefix)
extracted = self.try_extract(from_dir, name, build_prefix)
if (copied or extracted):
paths.append(file)
# # END
return paths
class Demiliterate(Semiliterate): class Demiliterate(Semiliterate):
@ -483,7 +518,7 @@ semiliterate.ensurelines
Returns True if extraction was successful. Returns True if extraction was successful.
""" """
to_file = self.filenname_match(from_file) to_file = self.filename_match(from_file)
if not to_file: if not to_file:
return False return False
from_file_path = os.path.join(from_directory, from_file) from_file_path = os.path.join(from_directory, from_file)
@ -491,7 +526,9 @@ semiliterate.ensurelines
(destination_directory, to_file) = os.path.split(to_file_path) # ADDED (destination_directory, to_file) = os.path.split(to_file_path) # ADDED
try: try:
with open(from_file_path) as original_file: with open(from_file_path) as original_file:
utils.log.debug(f"mkdocs-semiliterate: Scanning {from_file}...") utils.log.debug(
f"mkdocs-semiliterate: In {from_directory}, "
+ f"scanning {from_file}...")
# extraction = StreamExtract( # extraction = StreamExtract(
extraction = StreamInclusion( extraction = StreamInclusion(
input_stream=original_file, input_stream=original_file,
@ -502,6 +539,9 @@ semiliterate.ensurelines
patterns=self.patterns, patterns=self.patterns,
**kwargs) **kwargs)
return extraction.extract() return extraction.extract()
except (UnicodeDecodeError) as error:
utils.log.info("mkdocs-semiliterate: skipping %s\n %s",
from_file_path, str(error))
except BaseException as error: except BaseException as error:
utils.log.error( utils.log.error(
f"mkdocs-semiliterate: could not build {from_file_path}:\n " f"mkdocs-semiliterate: could not build {from_file_path}:\n "

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = mkdocs-semiliterate name = mkdocs-semiliterate
version = 0.6.0 version = 0.7.0
description = Extension of mkdocs-simple-plugin adding easy content inclusion description = Extension of mkdocs-simple-plugin adding easy content inclusion
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown long_description_content_type = text/markdown
@ -24,8 +24,8 @@ license = Apache-2.0
[options] [options]
packages = mkdocs_semiliterate packages = mkdocs_semiliterate
install_requires = install_requires =
mkdocs~=1.3.1 mkdocs~=1.4
mkdocs-simple-plugin~=1.0 mkdocs-simple-plugin==2.1.2
[options.entry_points] [options.entry_points]
mkdocs.plugins = mkdocs.plugins =

View File

@ -215,7 +215,7 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
.admonition { .admonition, details {
padding: 15px; padding: 15px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid transparent; border: 1px solid transparent;
@ -223,29 +223,33 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
text-align: left; text-align: left;
} }
.admonition.note { /* csslint allow: adjoining-classes */ .admonition.note, details.note { /* csslint allow: adjoining-classes */
color: #3a87ad; color: #2e6b89;
background-color: #d9edf7; background-color: #e2f0f7;
border-color: #bce8f1; border-color: #bce8f1;
} }
.admonition.warning { /* csslint allow: adjoining-classes */ .admonition.warning, details.warning { /* csslint allow: adjoining-classes */
color: #c09853; color: #7a6032;
background-color: #fcf8e3; background-color: #fffae5;
border-color: #fbeed5; border-color: #fbeed5;
} }
.admonition.danger { /* csslint allow: adjoining-classes */ .admonition.danger, details.danger { /* csslint allow: adjoining-classes */
color: #b94a48; color: #7f3130;
background-color: #f2dede; background-color: #fde3e3;
border-color: #eed3d7; border-color: #eed3d7;
} }
.admonition-title { .admonition-title, summary {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.admonition>p:last-child, details>p:last-child {
margin-bottom: 0;
}
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
.navbar-collapse.show { /* csslint allow: adjoining-classes */ .navbar-collapse.show { /* csslint allow: adjoining-classes */
overflow-y: auto; overflow-y: auto;

View File

@ -215,7 +215,7 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
.admonition { .admonition, details {
padding: 15px; padding: 15px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid transparent; border: 1px solid transparent;
@ -223,29 +223,33 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
text-align: left; text-align: left;
} }
.admonition.note { /* csslint allow: adjoining-classes */ .admonition.note, details.note { /* csslint allow: adjoining-classes */
color: #3a87ad; color: #2e6b89;
background-color: #d9edf7; background-color: #e2f0f7;
border-color: #bce8f1; border-color: #bce8f1;
} }
.admonition.warning { /* csslint allow: adjoining-classes */ .admonition.warning, details.warning { /* csslint allow: adjoining-classes */
color: #c09853; color: #7a6032;
background-color: #fcf8e3; background-color: #fffae5;
border-color: #fbeed5; border-color: #fbeed5;
} }
.admonition.danger { /* csslint allow: adjoining-classes */ .admonition.danger, details.danger { /* csslint allow: adjoining-classes */
color: #b94a48; color: #7f3130;
background-color: #f2dede; background-color: #fde3e3;
border-color: #eed3d7; border-color: #eed3d7;
} }
.admonition-title { .admonition-title, summary {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.admonition>p:last-child, details>p:last-child {
margin-bottom: 0;
}
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
.navbar-collapse.show { /* csslint allow: adjoining-classes */ .navbar-collapse.show { /* csslint allow: adjoining-classes */
overflow-y: auto; overflow-y: auto;

View File

@ -215,7 +215,7 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
.admonition { .admonition, details {
padding: 15px; padding: 15px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid transparent; border: 1px solid transparent;
@ -223,29 +223,33 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
text-align: left; text-align: left;
} }
.admonition.note { /* csslint allow: adjoining-classes */ .admonition.note, details.note { /* csslint allow: adjoining-classes */
color: #3a87ad; color: #2e6b89;
background-color: #d9edf7; background-color: #e2f0f7;
border-color: #bce8f1; border-color: #bce8f1;
} }
.admonition.warning { /* csslint allow: adjoining-classes */ .admonition.warning, details.warning { /* csslint allow: adjoining-classes */
color: #c09853; color: #7a6032;
background-color: #fcf8e3; background-color: #fffae5;
border-color: #fbeed5; border-color: #fbeed5;
} }
.admonition.danger { /* csslint allow: adjoining-classes */ .admonition.danger, details.danger { /* csslint allow: adjoining-classes */
color: #b94a48; color: #7f3130;
background-color: #f2dede; background-color: #fde3e3;
border-color: #eed3d7; border-color: #eed3d7;
} }
.admonition-title { .admonition-title, summary {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.admonition>p:last-child, details>p:last-child {
margin-bottom: 0;
}
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
.navbar-collapse.show { /* csslint allow: adjoining-classes */ .navbar-collapse.show { /* csslint allow: adjoining-classes */
overflow-y: auto; overflow-y: auto;

View File

@ -215,7 +215,7 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
.admonition { .admonition, details {
padding: 15px; padding: 15px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid transparent; border: 1px solid transparent;
@ -223,29 +223,33 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
text-align: left; text-align: left;
} }
.admonition.note { /* csslint allow: adjoining-classes */ .admonition.note, details.note { /* csslint allow: adjoining-classes */
color: #3a87ad; color: #2e6b89;
background-color: #d9edf7; background-color: #e2f0f7;
border-color: #bce8f1; border-color: #bce8f1;
} }
.admonition.warning { /* csslint allow: adjoining-classes */ .admonition.warning, details.warning { /* csslint allow: adjoining-classes */
color: #c09853; color: #7a6032;
background-color: #fcf8e3; background-color: #fffae5;
border-color: #fbeed5; border-color: #fbeed5;
} }
.admonition.danger { /* csslint allow: adjoining-classes */ .admonition.danger, details.danger { /* csslint allow: adjoining-classes */
color: #b94a48; color: #7f3130;
background-color: #f2dede; background-color: #fde3e3;
border-color: #eed3d7; border-color: #eed3d7;
} }
.admonition-title { .admonition-title, summary {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.admonition>p:last-child, details>p:last-child {
margin-bottom: 0;
}
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
.navbar-collapse.show { /* csslint allow: adjoining-classes */ .navbar-collapse.show { /* csslint allow: adjoining-classes */
overflow-y: auto; overflow-y: auto;

View File

@ -215,7 +215,7 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
.admonition { .admonition, details {
padding: 15px; padding: 15px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid transparent; border: 1px solid transparent;
@ -223,29 +223,33 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
text-align: left; text-align: left;
} }
.admonition.note { /* csslint allow: adjoining-classes */ .admonition.note, details.note { /* csslint allow: adjoining-classes */
color: #3a87ad; color: #2e6b89;
background-color: #d9edf7; background-color: #e2f0f7;
border-color: #bce8f1; border-color: #bce8f1;
} }
.admonition.warning { /* csslint allow: adjoining-classes */ .admonition.warning, details.warning { /* csslint allow: adjoining-classes */
color: #c09853; color: #7a6032;
background-color: #fcf8e3; background-color: #fffae5;
border-color: #fbeed5; border-color: #fbeed5;
} }
.admonition.danger { /* csslint allow: adjoining-classes */ .admonition.danger, details.danger { /* csslint allow: adjoining-classes */
color: #b94a48; color: #7f3130;
background-color: #f2dede; background-color: #fde3e3;
border-color: #eed3d7; border-color: #eed3d7;
} }
.admonition-title { .admonition-title, summary {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.admonition>p:last-child, details>p:last-child {
margin-bottom: 0;
}
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
.navbar-collapse.show { /* csslint allow: adjoining-classes */ .navbar-collapse.show { /* csslint allow: adjoining-classes */
overflow-y: auto; overflow-y: auto;

View File

@ -215,7 +215,7 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
.admonition { .admonition, details {
padding: 15px; padding: 15px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid transparent; border: 1px solid transparent;
@ -223,29 +223,33 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
text-align: left; text-align: left;
} }
.admonition.note { /* csslint allow: adjoining-classes */ .admonition.note, details.note { /* csslint allow: adjoining-classes */
color: #3a87ad; color: #2e6b89;
background-color: #d9edf7; background-color: #e2f0f7;
border-color: #bce8f1; border-color: #bce8f1;
} }
.admonition.warning { /* csslint allow: adjoining-classes */ .admonition.warning, details.warning { /* csslint allow: adjoining-classes */
color: #c09853; color: #7a6032;
background-color: #fcf8e3; background-color: #fffae5;
border-color: #fbeed5; border-color: #fbeed5;
} }
.admonition.danger { /* csslint allow: adjoining-classes */ .admonition.danger, details.danger { /* csslint allow: adjoining-classes */
color: #b94a48; color: #7f3130;
background-color: #f2dede; background-color: #fde3e3;
border-color: #eed3d7; border-color: #eed3d7;
} }
.admonition-title { .admonition-title, summary {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.admonition>p:last-child, details>p:last-child {
margin-bottom: 0;
}
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
.navbar-collapse.show { /* csslint allow: adjoining-classes */ .navbar-collapse.show { /* csslint allow: adjoining-classes */
overflow-y: auto; overflow-y: auto;

View File

@ -215,7 +215,7 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
.admonition { .admonition, details {
padding: 15px; padding: 15px;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid transparent; border: 1px solid transparent;
@ -223,29 +223,33 @@ h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .head
text-align: left; text-align: left;
} }
.admonition.note { /* csslint allow: adjoining-classes */ .admonition.note, details.note { /* csslint allow: adjoining-classes */
color: #3a87ad; color: #2e6b89;
background-color: #d9edf7; background-color: #e2f0f7;
border-color: #bce8f1; border-color: #bce8f1;
} }
.admonition.warning { /* csslint allow: adjoining-classes */ .admonition.warning, details.warning { /* csslint allow: adjoining-classes */
color: #c09853; color: #7a6032;
background-color: #fcf8e3; background-color: #fffae5;
border-color: #fbeed5; border-color: #fbeed5;
} }
.admonition.danger { /* csslint allow: adjoining-classes */ .admonition.danger, details.danger { /* csslint allow: adjoining-classes */
color: #b94a48; color: #7f3130;
background-color: #f2dede; background-color: #fde3e3;
border-color: #eed3d7; border-color: #eed3d7;
} }
.admonition-title { .admonition-title, summary {
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
} }
.admonition>p:last-child, details>p:last-child {
margin-bottom: 0;
}
@media (max-width: 991.98px) { @media (max-width: 991.98px) {
.navbar-collapse.show { /* csslint allow: adjoining-classes */ .navbar-collapse.show { /* csslint allow: adjoining-classes */
overflow-y: auto; overflow-y: auto;

View File

@ -5,7 +5,8 @@ theme:
custom_dir: doc_theme/ custom_dir: doc_theme/
plugins: plugins:
- semiliterate: - semiliterate:
ignore_folders: [refsite, snippet] ignore_folders: [refsite]
ignore_hidden: false
merge_docs_dir: false merge_docs_dir: false
include_extensions: [] include_extensions: []
semiliterate: semiliterate: