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:
parent
78f3d151a2
commit
7b93fed496
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 %}
|
||||
{% endblock %}
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</body>
|
||||
|
@ -130,12 +130,27 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
|
||||
|
||||
# Add dependency tree as returned by pipdeptree
|
||||
f.writestr(
|
||||
os.path.join(archive_name, "dependencies.json"),
|
||||
os.path.join(archive_name, ".dependencies.json"),
|
||||
render_json_tree(PackageDAG.from_pkgs(
|
||||
get_installed_distributions(local_only = True)
|
||||
), 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
|
||||
for a in f.filelist:
|
||||
files.append("".join([
|
||||
|
@ -130,12 +130,27 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
|
||||
|
||||
# Add dependency tree as returned by pipdeptree
|
||||
f.writestr(
|
||||
os.path.join(archive_name, "dependencies.json"),
|
||||
os.path.join(archive_name, ".dependencies.json"),
|
||||
render_json_tree(PackageDAG.from_pkgs(
|
||||
get_installed_distributions(local_only = True)
|
||||
), 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
|
||||
for a in f.filelist:
|
||||
files.append("".join([
|
||||
|
Loading…
Reference in New Issue
Block a user