mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added platform and runtime information to info plugin
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -246,7 +246,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% if page.meta and page.meta.ᴴₒᴴₒᴴₒ %}
|
{% if page.meta and page.meta.ᴴₒᴴₒᴴₒ %}
|
||||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/extra.744965a2.min.css' | url }}">
|
<link rel="stylesheet" href="{{ 'assets/stylesheets/extra.d6bc9295.min.css' | url }}">
|
||||||
<script src="{{ 'assets/javascripts/extra/bundle.cfb3feee.min.js' | url }}" defer></script>
|
<script src="{{ 'assets/javascripts/extra/bundle.cfb3feee.min.js' | url }}" defer></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -130,12 +130,27 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
|
|||||||
|
|
||||||
# Add dependency tree as returned by pipdeptree
|
# Add dependency tree as returned by pipdeptree
|
||||||
f.writestr(
|
f.writestr(
|
||||||
os.path.join(archive_name, "dependencies.json"),
|
os.path.join(archive_name, ".dependencies.json"),
|
||||||
render_json_tree(PackageDAG.from_pkgs(
|
render_json_tree(PackageDAG.from_pkgs(
|
||||||
get_installed_distributions(local_only = True)
|
get_installed_distributions(local_only = True)
|
||||||
), 2)
|
), 2)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add version information
|
||||||
|
mkdocs = get_distribution("mkdocs")
|
||||||
|
f.writestr(
|
||||||
|
os.path.join(archive_name, ".versions.log"),
|
||||||
|
"\n".join([
|
||||||
|
f"-----------------------------------",
|
||||||
|
f" Material for MkDocs: {version}",
|
||||||
|
f" MkDocs: {mkdocs.version}",
|
||||||
|
f"-----------------------------------",
|
||||||
|
f" Platform: {platform.system()}",
|
||||||
|
f" Python: {platform.python_version()}",
|
||||||
|
f"-----------------------------------"
|
||||||
|
])
|
||||||
|
)
|
||||||
|
|
||||||
# Retrieve list of processed files
|
# Retrieve list of processed files
|
||||||
for a in f.filelist:
|
for a in f.filelist:
|
||||||
files.append("".join([
|
files.append("".join([
|
||||||
|
|||||||
@@ -130,12 +130,27 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
|
|||||||
|
|
||||||
# Add dependency tree as returned by pipdeptree
|
# Add dependency tree as returned by pipdeptree
|
||||||
f.writestr(
|
f.writestr(
|
||||||
os.path.join(archive_name, "dependencies.json"),
|
os.path.join(archive_name, ".dependencies.json"),
|
||||||
render_json_tree(PackageDAG.from_pkgs(
|
render_json_tree(PackageDAG.from_pkgs(
|
||||||
get_installed_distributions(local_only = True)
|
get_installed_distributions(local_only = True)
|
||||||
), 2)
|
), 2)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add version information
|
||||||
|
mkdocs = get_distribution("mkdocs")
|
||||||
|
f.writestr(
|
||||||
|
os.path.join(archive_name, ".versions.log"),
|
||||||
|
"\n".join([
|
||||||
|
f"-----------------------------------",
|
||||||
|
f" Material for MkDocs: {version}",
|
||||||
|
f" MkDocs: {mkdocs.version}",
|
||||||
|
f"-----------------------------------",
|
||||||
|
f" Platform: {platform.system()}",
|
||||||
|
f" Python: {platform.python_version()}",
|
||||||
|
f"-----------------------------------"
|
||||||
|
])
|
||||||
|
)
|
||||||
|
|
||||||
# Retrieve list of processed files
|
# Retrieve list of processed files
|
||||||
for a in f.filelist:
|
for a in f.filelist:
|
||||||
files.append("".join([
|
files.append("".join([
|
||||||
|
|||||||
Reference in New Issue
Block a user