mkdocs-document-dates 3.8.8__tar.gz → 3.8.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mkdocs_document_dates-3.8.8/mkdocs_document_dates.egg-info → mkdocs_document_dates-3.8.9}/PKG-INFO +1 -1
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/plugin.py +5 -1
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9/mkdocs_document_dates.egg-info}/PKG-INFO +1 -1
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/pyproject.toml +1 -1
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/setup.py +1 -1
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/LICENSE +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/MANIFEST.in +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/README.md +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/__init__.py +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/cache_manager.py +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/hooks/pre-commit +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/hooks_installer.py +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/.DS_Store +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/config/config.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/config/config.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/core/core.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/core/core.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/core/default.config.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/core/md5.min.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/core/timeago.full.min.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/core/timeago.min.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/core/utils.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/fonts/material-icons.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/fonts/materialicons.woff2 +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/templates/recently_updated_detail.html +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/templates/recently_updated_grid.html +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/templates/recently_updated_group.html +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/templates/recently_updated_list.html +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/backdrop.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/light.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/material.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/popper.min.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/scale.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/shift-away.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/tippy.css +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/tippy/tippy.umd.min.js +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/utils.py +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates.egg-info/SOURCES.txt +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates.egg-info/dependency_links.txt +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates.egg-info/entry_points.txt +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates.egg-info/requires.txt +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates.egg-info/top_level.txt +0 -0
- {mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/setup.cfg +0 -0
{mkdocs_document_dates-3.8.8/mkdocs_document_dates.egg-info → mkdocs_document_dates-3.8.9}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocs-document-dates
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.9
|
|
4
4
|
Summary: A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents
|
|
5
5
|
Author-email: Aaron Wang <aaronwqt@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -9,6 +9,7 @@ from mkdocs.config import config_options
|
|
|
9
9
|
from mkdocs.structure.pages import Page
|
|
10
10
|
from mkdocs.utils import get_relative_url
|
|
11
11
|
from urllib.parse import urlparse
|
|
12
|
+
from babel.core import default_locale
|
|
12
13
|
from babel.dates import format_datetime
|
|
13
14
|
from .utils import compile_exclude_patterns, is_excluded, get_recently_updated_files, load_dates_and_authors, DEFAULT_WPM, DEFAULT_WPM_CJK
|
|
14
15
|
|
|
@@ -396,7 +397,9 @@ class DocumentDatesPlugin(BasePlugin):
|
|
|
396
397
|
|
|
397
398
|
|
|
398
399
|
def _formatting_date(self, date: datetime):
|
|
399
|
-
|
|
400
|
+
# 空配置表示自动检测系统 locale;若运行环境未设置 locale,则回退到英语。
|
|
401
|
+
locale = (self.config.get('locale') or '').strip()
|
|
402
|
+
locale = locale or default_locale('LC_TIME') or 'en'
|
|
400
403
|
|
|
401
404
|
# 兼容旧 strftime 配置,转换为 Babel/ICU 格式
|
|
402
405
|
date_format = (
|
|
@@ -444,6 +447,7 @@ class DocumentDatesPlugin(BasePlugin):
|
|
|
444
447
|
html_parts = []
|
|
445
448
|
position_class = 'document-dates-top' if self.config['position'] == 'top' else 'document-dates-bottom'
|
|
446
449
|
html_parts.append(f"<div class='document-dates-plugin-wrapper {position_class}'>")
|
|
450
|
+
# 前端 locale 留给浏览器语言回退逻辑;这里只传递用户显式配置。
|
|
447
451
|
html_parts.append(f"<div class='document-dates-plugin' locale='{self.config['locale']}'>")
|
|
448
452
|
|
|
449
453
|
def build_time_icon(time_obj: datetime, icon: str):
|
{mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9/mkdocs_document_dates.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocs-document-dates
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.9
|
|
4
4
|
Summary: A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents
|
|
5
5
|
Author-email: Aaron Wang <aaronwqt@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mkdocs-document-dates"
|
|
7
|
-
version = "3.8.
|
|
7
|
+
version = "3.8.9"
|
|
8
8
|
description = "A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents"
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
requires-python = ">=3.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/__init__.py
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/cache_manager.py
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/hooks/pre-commit
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/hooks_installer.py
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.8 → mkdocs_document_dates-3.8.9}/mkdocs_document_dates/static/.DS_Store
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|