|
|
|
@@ -21,15 +21,63 @@ from mkdocs.contrib.search import SearchPlugin
|
|
|
|
|
|
|
|
|
|
class TechDocsCore(BasePlugin):
|
|
|
|
|
def on_config(self, config):
|
|
|
|
|
# Theme
|
|
|
|
|
config['theme'] = Theme(name="material")
|
|
|
|
|
# Theme
|
|
|
|
|
config['theme'] = Theme(name="material")
|
|
|
|
|
|
|
|
|
|
# Plugins
|
|
|
|
|
del config['plugins']['techdocs-core']
|
|
|
|
|
# Plugins
|
|
|
|
|
del config['plugins']['techdocs-core']
|
|
|
|
|
|
|
|
|
|
search_plugin = SearchPlugin()
|
|
|
|
|
search_plugin.load_config({})
|
|
|
|
|
config['plugins']['search'] = search_plugin
|
|
|
|
|
search_plugin = SearchPlugin()
|
|
|
|
|
search_plugin.load_config({})
|
|
|
|
|
config['plugins']['search'] = search_plugin
|
|
|
|
|
|
|
|
|
|
return config
|
|
|
|
|
# Markdown Extensions
|
|
|
|
|
print(config)
|
|
|
|
|
config['markdown_extensions'].append('admonition')
|
|
|
|
|
config['markdown_extensions'].append('abbr')
|
|
|
|
|
config['markdown_extensions'].append('attr_list')
|
|
|
|
|
config['markdown_extensions'].append('def_list')
|
|
|
|
|
config['markdown_extensions'].append('codehilite')
|
|
|
|
|
config['mdx_configs']['codehilite'] = {
|
|
|
|
|
'linenums': True,
|
|
|
|
|
'guess_lang': False,
|
|
|
|
|
'pygments_style': 'friendly',
|
|
|
|
|
}
|
|
|
|
|
config['markdown_extensions'].append('toc')
|
|
|
|
|
config['mdx_configs']['toc'] = {
|
|
|
|
|
'permalink': True,
|
|
|
|
|
}
|
|
|
|
|
config['markdown_extensions'].append('footnotes')
|
|
|
|
|
config['markdown_extensions'].append('markdown.extensions.tables')
|
|
|
|
|
config['markdown_extensions'].append('markdown_inline_graphviz')
|
|
|
|
|
config['markdown_extensions'].append('plantuml_markdown')
|
|
|
|
|
config['markdown_extensions'].append('markdown_katex')
|
|
|
|
|
config['mdx_configs']['markdown_katex'] = {
|
|
|
|
|
'no_inline_svg': True,
|
|
|
|
|
'insert_fonts_css': True,
|
|
|
|
|
}
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.betterem')
|
|
|
|
|
config['mdx_configs']['pymdownx.betterem'] = {
|
|
|
|
|
'smart_enable': 'all',
|
|
|
|
|
}
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.caret')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.critic')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.details')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.emoji')
|
|
|
|
|
config['mdx_configs']['pymdownx.emoji'] = {
|
|
|
|
|
'emoji_generator': '!!python/name:pymdownx.emoji.to_svg',
|
|
|
|
|
}
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.inlinehilite')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.magiclink')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.mark')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.smartsymbols')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.superfences')
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.tasklist')
|
|
|
|
|
config['mdx_configs']['pymdownx.tasklist'] = {
|
|
|
|
|
'custom_checkbox': True,
|
|
|
|
|
}
|
|
|
|
|
config['markdown_extensions'].append('pymdownx.tilde')
|
|
|
|
|
print(config)
|
|
|
|
|
|
|
|
|
|
return config
|
|
|
|
|
|
|
|
|
|