diff --git a/.github/workflows/mkdoxy-build-test.yaml b/.github/workflows/mkdoxy-test-demos.yaml
similarity index 91%
rename from .github/workflows/mkdoxy-build-test.yaml
rename to .github/workflows/mkdoxy-test-demos.yaml
index e558ebd4..ddeeca2c 100644
--- a/.github/workflows/mkdoxy-build-test.yaml
+++ b/.github/workflows/mkdoxy-test-demos.yaml
@@ -1,10 +1,9 @@
-name: MkDoxy build all supported Python versions
+name: MkDoxy test build demos with all supported python versions
on: [push]
jobs:
build:
-
runs-on: ubuntu-latest
strategy:
# You can use PyPy versions in python-version.
@@ -25,7 +24,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install mkdocs-material
- pip install .
+ pip install .
sudo apt-get install doxygen
- name: Clone test repo
run: git clone https://github.com/JakubAndrysek/MkDoxy-demo.git demo
diff --git a/.github/workflows/mkdoxy-test-repo.yaml b/.github/workflows/mkdoxy-test-repo.yaml
new file mode 100644
index 00000000..ee05b627
--- /dev/null
+++ b/.github/workflows/mkdoxy-test-repo.yaml
@@ -0,0 +1,30 @@
+name: MkDoxy test build this doc with all supported python versions
+
+on: [push]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ # You can use PyPy versions in python-version.
+ matrix:
+ python-version: ["3.9", "3.10", "3.11"]
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ # You can test your matrix by printing the current Python version
+ - name: Display Python version
+ run: python -c "import sys; print(sys.version)"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install -r requirements.txt
+ pip install mkdocs-material
+ pip install .
+ sudo apt-get install doxygen
+ - name: Build docs
+ run: mkdocs build --clean --verbose
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index aa746abb..feb4a0f4 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,20 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -48,22 +60,22 @@
- {
+ "keyToString": {
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "git-widget-placeholder": "new-templates",
+ "last_opened_file_path": "/Users/kuba/Documents/git/kuba/mkdoxy/mkdoxy-base/mkdoxy-new-templates/docs",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "settings.editor.selected.configurable": "reference.settings.ide.settings.new.ui",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
@@ -78,7 +90,7 @@
-
+
@@ -278,7 +290,8 @@
-
+
+
1674630349699
@@ -420,7 +433,28 @@
1683242202337
-
+
+ 1686746284046
+
+
+
+ 1686746284046
+
+
+ 1686746715966
+
+
+
+ 1686746715966
+
+
+ 1686746897657
+
+
+
+ 1686746897657
+
+
@@ -456,14 +490,17 @@
-
+
+
+
+
file://$PROJECT_DIR$/mkdoxy/generatorAuto.py
- 239
+ 235
@@ -545,8 +582,8 @@
-
-
+
+
diff --git a/docs/snippets/other.md b/docs/snippets/files.md
similarity index 93%
rename from docs/snippets/other.md
rename to docs/snippets/files.md
index 1ed2d7ce..a62ee6bb 100644
--- a/docs/snippets/other.md
+++ b/docs/snippets/files.md
@@ -1,4 +1,4 @@
-# Snippets - Other
+# Snippets - Files
## `::: doxy..file.list`
diff --git a/docs/snippets/namespaces.md b/docs/snippets/namespaces.md
index 096b26eb..b5358c73 100644
--- a/docs/snippets/namespaces.md
+++ b/docs/snippets/namespaces.md
@@ -4,9 +4,9 @@
This tag generates a list of all namespaces in the project.
=== "Tag usage"
-```yaml
-::: doxy.animal.namespace.list
-```
+ ```yaml
+ ::: doxy.animal.namespace.list
+ ```
=== "Tag result"
::: doxy.animal.namespace.list
diff --git a/mkdocs.yml b/mkdocs.yml
index 370bed3b..f6760a7b 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -20,7 +20,6 @@ theme:
- navigation.tabs
- navigation.indexes
- navigation.top
-# - content.tabs.link
icon:
repo: fontawesome/brands/github
@@ -142,7 +141,7 @@ nav:
- "Links": "snippets/links.md"
- "Functions": "snippets/functions.md"
- "Namespaces": "snippets/namespaces.md"
- - "Other": "snippets/other.md"
+ - "Files": "snippets/files.md"
- MkDoxy API:
- "mkdoxyApi/index.md"
- "Links": "mkdoxyApi/links.md"
diff --git a/mkdoxy/generatorAuto.py b/mkdoxy/generatorAuto.py
index 0a2df655..c9905933 100644
--- a/mkdoxy/generatorAuto.py
+++ b/mkdoxy/generatorAuto.py
@@ -221,14 +221,10 @@ def _generate_recursive_files(self, output_summary: str, node: Node, level: int,
if node.kind.is_file() or node.kind.is_dir():
output_summary += str(
' ' * int(level +2 ) +generate_link(node.name, f'{node.refid}.md', end='')
- # ' ' * level + " * " + generate_link(node.name, f'{node.refid}.md')
)
if node.kind.is_file():
- if config["emojis_enabled"]:
- output_summary += f" [:octicons-file-code-16:]({node.refid}_source.md) \n"
- else:
- output_summary += f" [[source code]]({node.refid}_source.md) \n"
+ output_summary += f" [[source code]]({node.refid}_source.md) \n"
else:
output_summary += "\n"
diff --git a/mkdoxy/plugin.py b/mkdoxy/plugin.py
index ae177415..c171ab0e 100644
--- a/mkdoxy/plugin.py
+++ b/mkdoxy/plugin.py
@@ -37,7 +37,6 @@ class MkDoxy(BasePlugin):
('ignore-errors', config_options.Type(bool, default=False)),
('save-api', config_options.Type(str, default="")),
("enabled", config_options.Type(bool, default=True)),
- ("emojis-enabled", config_options.Type(bool, default=False)),
)
# Config options for each project
@@ -57,27 +56,13 @@ def is_enabled(self) -> bool:
"""
return self.config.get("enabled")
- def on_pre_build(self, config: base.Config):
- """! Checks if the required markdown extensions are enabled (example: pymdownx.emoji).
+ def on_files(self, files: files.Files, config: base.Config) -> files.Files:
+ """! Called after files have been gathered by MkDocs.
@details
- @param config (Config): The MkDocs config.
- """
- if not self.is_enabled():
- return
- check_enabled_markdown_extensions(config, self.config)
-
- def on_files(self, files: files.Files, config: base.Config) -> files.Files:
- """
- Run Doxygen if needed and parse XML to basic structure.
-
- The basic structure is parsed to recursive Nodes.
- Then prepare generator for future use (GeneratorAuto, SnippetGenerator)
- Generate full documentation if enabled.
- Appends the generated files to the MkDocs files.
- :param files: The MkDocs files.
- :param config: The MkDocs config.
- :return: The MkDocs files.
+ @param files: (Files) The files gathered by MkDocs.
+ @param config: (Config) The global configuration object.
+ @return: (Files) The files gathered by MkDocs.
"""
if not self.is_enabled():
return files
@@ -107,7 +92,6 @@ def tempDir(siteDir: str, tempDir:str, projectName: str) ->str:
# generate automatic documentation and append files in the list of files to be processed by mkdocs
self.defaultTemplateConfig: dict = {
- "emojis_enabled": self.config.get("emojis-enabled", False),
"indent_level": 0,
}
@@ -217,6 +201,8 @@ def on_page_markdown(
# def on_config(self, config):
# return config
#
+# def on_pre_build(self, config: base.Config):
+# return
# def on_post_build(self, config):
# return
#
diff --git a/mkdoxy/templates/member.jinja2 b/mkdoxy/templates/member.jinja2
index 74e7010e..3ca5be44 100644
--- a/mkdoxy/templates/member.jinja2
+++ b/mkdoxy/templates/member.jinja2
@@ -17,7 +17,7 @@ implements: True
{%- endfor %}
{% if node.is_file and node.has_programlisting -%}
-[Go to the source code of this file {% if config.emojis_enabled %}:octicons-file-code-16:{% endif %}]({{node.url_source}})
+[Go to the source code of this file]({{node.url_source}})
{%- endif %}
{{node.brief}}
diff --git a/mkdoxy/templates/programlisting.jinja2 b/mkdoxy/templates/programlisting.jinja2
index e715b4ec..eda7cd35 100644
--- a/mkdoxy/templates/programlisting.jinja2
+++ b/mkdoxy/templates/programlisting.jinja2
@@ -11,7 +11,7 @@ breadcrumbs: False
{{'**>**'|indent(1, true)}} [**{{child.name_long if node.is_group else child.name_short}}**]({{child.url}})
{%- endfor %}
-[Go to the documentation of this file {% if config.emojis_enabled %}:material-file-document:{% endif %}]({{node.url}})
+[Go to the documentation of this file]({{node.url}})
```{{ node.code_language }}
{{node.programlisting}}
diff --git a/mkdoxy/utils.py b/mkdoxy/utils.py
index 067e1873..34c6476b 100644
--- a/mkdoxy/utils.py
+++ b/mkdoxy/utils.py
@@ -112,7 +112,7 @@ def check_enabled_markdown_extensions(config: Config, mkdoxyConfig: Config) -> N
Checks if the required markdown extensions are enabled.
:param config: The MkDocs config.
"""
- enabled_extensions = config['markdown_extensions']
- if mkdoxyConfig.get("emojis-enabled", False):
- if 'pymdownx.emoji' not in enabled_extensions:
- log.warning("The 'pymdownx.emoji' extension is not enabled. Some emojis may not be rendered correctly. https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/#configuration")
\ No newline at end of file
+ # enabled_extensions = config['markdown_extensions']
+ # if mkdoxyConfig.get("emojis-enabled", False):
+ # if 'pymdownx.emoji' not in enabled_extensions:
+ # log.warning("The 'pymdownx.emoji' extension is not enabled. Some emojis may not be rendered correctly. https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/#configuration")
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 31dd9da0..df69b1fb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,9 +1,6 @@
mkdocs~=1.4.3
Jinja2~=3.1.2
-ruamel.yaml
-mkdocs-open-in-new-tab
+ruamel.yaml==0.17.32
+mkdocs-open-in-new-tab~=1.0.2
pathlib~=1.0.1
-mkdoxy~=1.0.6
-path~=16.6.0
-setuptools~=67.6.1
-Markdown~=3.3.7
\ No newline at end of file
+path~=16.6.0
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 3b52d111..f1380db4 100755
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ def requirements():
# https://pypi.org/project/mkdoxy/
setup(
name='mkdoxy',
- version='1.0.6',
+ version='1.1.0',
description='MkDoxy → MkDocs + Doxygen = easy documentation generator with code snippets',
long_description=readme(),
long_description_content_type='text/markdown',