Skip to content

Commit

Permalink
fix commiter can not display
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
samzong authored Nov 19, 2024
1 parent b8bc9e9 commit bd3d767
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 60 deletions.
110 changes: 110 additions & 0 deletions docs/zh/theme/overrides/partials/source-file.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{#-
This file was automatically generated - do not edit
-#}
{% macro render_updated(date) %}
<span class="md-source-file__fact">
<span class="md-icon" title="{{ lang.t('source.file.date.updated') }}">
{% include ".icons/material/clock-edit-outline.svg" %}
</span>
{{ date }}
</span>
{% endmacro %}
{% macro render_created(date) %}
<span class="md-source-file__fact">
<span class="md-icon" title="{{ lang.t('source.file.date.created') }}">
{% include ".icons/material/clock-plus-outline.svg" %}
</span>
{{ date }}
</span>
{% endmacro %}
{% macro render_authors(authors) %}
{% set git_authors = config.plugins.get("git-authors") %}
<span class="md-source-file__fact">
<span class="md-icon" title="{{ lang.t('source.file.contributors') }}">
{% if authors | length == 1 %}
{% include ".icons/material/account.svg" %}
{% else %}
{% include ".icons/material/account-group.svg" %}
{% endif %}
</span>
<nav>
{% for author in authors %}
{%- if git_authors.config.show_email_address %}
<a href="mailto:{{ author.email }}">
{{- author.name -}}
</a>
{%- else -%}
{{- author.name -}}
{% endif -%}
{%- if loop.revindex > 1 %}, {% endif -%}
{% endfor %}
</nav>
</span>
{% endmacro %}
{% macro render_committers_github(title) %}
<span class="md-icon" title="{{ lang.t('source.file.contributors') }}">
{% include ".icons/material/github.svg" %}
</span>
<span>{{ title }}</span>
{% endmacro %}
{% macro render_committers_gitlab(title) %}
<span class="md-icon" title="{{ lang.t('source.file.contributors') }}">
{% include ".icons/material/gitlab.svg" %}
</span>
<span>{{ title }}</span>
{% endmacro %}
{% macro render_committers(authors) %}
<span class="md-source-file__fact">
{% if committers_source == "gitlab" %}
{{ render_committers_gitlab("GitLab") }}
{% else %}
{{ render_committers_github("GitHub") }}
{% endif %}
<nav>
{% for author in authors[:4] %}
<a href="{{ author.url }}" class="md-author" title="@{{ author.login }}">
{% set separator = "&" if "?" in author.avatar else "?" %}
<img src="{{ author.avatar }}{{ separator }}size=72" alt="{{ author.name or 'GitHub user' }}">
</a>
{% endfor %}
{% set more = authors[4:] | length %}
{% if more > 0 %}
{% if page.edit_url %}
<a href="{{ page.edit_url | replace('edit', 'blob') }}" class="md-author md-author--more">
+{{ more }}
</a>
{% else %}
<span class="md-author md-author--more">
+{{ more }}
</span>
{% endif %}
{% endif %}
</nav>
</span>
{% endmacro %}
{% if page.meta %}
{% if page.meta.git_revision_date_localized %}
{% set updated = page.meta.git_revision_date_localized %}
{% elif page.meta.revision_date %}
{% set updated = page.meta.revision_date %}
{% endif %}
{% if page.meta.git_creation_date_localized %}
{% set created = page.meta.git_creation_date_localized %}
{% endif %}
{% endif %}
{% if updated or created or git_info or committers %}
<aside class="md-source-file">
{% if updated %}
{{ render_updated(updated) }}
{% endif %}
{% if created %}
{{ render_created(created) }}
{% endif %}
{% if git_info %}
{{ render_authors(git_info.get("page_authors")) }}
{% endif %}
{% if committers %}
{{ render_committers(committers) }}
{% endif %}
</aside>
{% endif %}
73 changes: 13 additions & 60 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,61 +1,14 @@
Babel==2.15.0
beautifulsoup4==4.12.3
bracex==2.4
CacheControl==0.14.0
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
csscompressor==0.9.5
EditorConfig==0.12.4
filelock==3.15.4
ghp-import==2.1.0
gitdb==4.0.11
GitPython==3.1.43
htmlmin2==0.1.13
idna==3.7
Jinja2==3.1.4
jsbeautifier==1.15.1
jsmin==3.0.1
Markdown==3.6
MarkupSafe==2.1.5
mergedeep==1.3.4
mkdocs==1.6.0
mkdocs-awesome-pages-plugin==2.9.3
mkdocs-get-deps==0.2.0
git+https://github.com/DaoCloud/mkdocs-material-insiders.git
mkdocs-git-revision-date-plugin
mkdocs-mermaid2-plugin
mkdocs-rss-plugin
mkdocs-minify-plugin
mkdocs-macros-plugin
mkdocs-git-committers-plugin-2
mkdocs-git-revision-date-localized-plugin==1.2.6
mkdocs-git-revision-date-plugin==0.3.2
mkdocs-macros-plugin==1.0.5
mkdocs-material==9.5.30
mkdocs-material-extensions==1.3.1
mkdocs-mermaid2-plugin==1.1.1
mkdocs-minify-plugin==0.8.0
mkdocs-print-site-plugin==2.5.0
mkdocs-redirects==1.2.1
mkdocs-rss-plugin==1.15.0
mkdocs-swagger-ui-tag==0.6.10
msgpack==1.0.8
natsort==8.4.0
packaging==24.1
paginate==0.5.6
pathspec==0.12.1
pip==24.0
platformdirs==4.2.2
Pygments==2.18.0
pymdown-extensions==10.9
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.1
pyyaml_env_tag==0.1
regex==2024.7.24
requests==2.32.3
setuptools==69.5.1
six==1.16.0
smmap==5.0.1
soupsieve==2.5
termcolor==2.4.0
urllib3==2.2.2
watchdog==4.0.1
wcmatch==8.5.2
wheel==0.43.0
mkdocs-git-revision-date-localized-plugin
mkdocs-awesome-pages-plugin
mkdocs-redirects
mkdocs-print-site-plugin
mkdocs-swagger-ui-tag
pyyaml
git+https://github.com/SAMZONG/mkdocs-with-pdf-support-material-v8.git

0 comments on commit bd3d767

Please sign in to comment.