mkdocs-document-dates 2.1.0__tar.gz → 2.2.0__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-2.1.0 → mkdocs_document_dates-2.2.0}/PKG-INFO +3 -3
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/README.md +2 -2
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/plugin.py +4 -4
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates.egg-info/PKG-INFO +3 -3
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/setup.py +1 -1
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/LICENSE +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/__init__.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/hooks/pre-commit +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/hooks_installer.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/__init__.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ar.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/de.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/en.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/es.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/fr.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ja.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ko.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ru.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/zh.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/zh_tw.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/styles.py +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates.egg-info/SOURCES.txt +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates.egg-info/dependency_links.txt +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates.egg-info/entry_points.txt +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates.egg-info/requires.txt +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates.egg-info/top_level.txt +0 -0
- {mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: mkdocs-document-dates
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.2.0
|
4
4
|
Summary: A MkDocs plugin for displaying accurate document creation and last modification dates.
|
5
5
|
Home-page: https://github.com/jaywhj/mkdocs-document-dates
|
6
6
|
Author: Aaron Wang
|
@@ -112,10 +112,10 @@ modified: 2023-12-31
|
|
112
112
|
- Linux: Uses modification time as creation time due to system limitations, if you need the exact creation time, you can manually specify it in Front Matter
|
113
113
|
- It still works when using CI/CD build systems (e.g. Github Actions)
|
114
114
|
- Used a cache file `.dates_cache.json` to solve this problem
|
115
|
-
- You can configure it like this:
|
115
|
+
- You can configure it like this:
|
116
116
|
```
|
117
117
|
...
|
118
118
|
|
119
|
-
- run: pip install
|
119
|
+
- run: pip install mkdocs-document-dates
|
120
120
|
- run: mkdocs gh-deploy --force
|
121
121
|
```
|
@@ -90,10 +90,10 @@ modified: 2023-12-31
|
|
90
90
|
- Linux: Uses modification time as creation time due to system limitations, if you need the exact creation time, you can manually specify it in Front Matter
|
91
91
|
- It still works when using CI/CD build systems (e.g. Github Actions)
|
92
92
|
- Used a cache file `.dates_cache.json` to solve this problem
|
93
|
-
- You can configure it like this:
|
93
|
+
- You can configure it like this:
|
94
94
|
```
|
95
95
|
...
|
96
96
|
|
97
|
-
- run: pip install
|
97
|
+
- run: pip install mkdocs-document-dates
|
98
98
|
- run: mkdocs gh-deploy --force
|
99
99
|
```
|
@@ -85,7 +85,7 @@ class DocumentDatesPlugin(BasePlugin):
|
|
85
85
|
return markdown
|
86
86
|
|
87
87
|
# 获取文件时间
|
88
|
-
created, modified = self._get_file_dates(file_path)
|
88
|
+
created, modified = self._get_file_dates(file_path, config) # 传入 config
|
89
89
|
|
90
90
|
# 处理 front matter 中的时间
|
91
91
|
created, modified = self._process_meta_dates(page.meta, created, modified)
|
@@ -151,11 +151,11 @@ class DocumentDatesPlugin(BasePlugin):
|
|
151
151
|
except (ValueError, TypeError):
|
152
152
|
return default_date
|
153
153
|
|
154
|
-
def _get_file_dates(self, file_path):
|
154
|
+
def _get_file_dates(self, file_path, config): # 添加 config 参数
|
155
155
|
"""获取文件的创建时间和修改时间"""
|
156
156
|
try:
|
157
|
-
#
|
158
|
-
docs_dir = Path(
|
157
|
+
# 从传入的 config 中获取 docs_dir
|
158
|
+
docs_dir = Path(config['docs_dir'])
|
159
159
|
rel_path = str(Path(file_path).relative_to(docs_dir))
|
160
160
|
|
161
161
|
# 尝试从缓存文件读取时间信息
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: mkdocs-document-dates
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.2.0
|
4
4
|
Summary: A MkDocs plugin for displaying accurate document creation and last modification dates.
|
5
5
|
Home-page: https://github.com/jaywhj/mkdocs-document-dates
|
6
6
|
Author: Aaron Wang
|
@@ -112,10 +112,10 @@ modified: 2023-12-31
|
|
112
112
|
- Linux: Uses modification time as creation time due to system limitations, if you need the exact creation time, you can manually specify it in Front Matter
|
113
113
|
- It still works when using CI/CD build systems (e.g. Github Actions)
|
114
114
|
- Used a cache file `.dates_cache.json` to solve this problem
|
115
|
-
- You can configure it like this:
|
115
|
+
- You can configure it like this:
|
116
116
|
```
|
117
117
|
...
|
118
118
|
|
119
|
-
- run: pip install
|
119
|
+
- run: pip install mkdocs-document-dates
|
120
120
|
- run: mkdocs gh-deploy --force
|
121
121
|
```
|
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/__init__.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/hooks/pre-commit
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/hooks_installer.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/__init__.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ar.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/de.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/en.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/es.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/fr.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ja.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ko.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/ru.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/zh.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.1.0 → mkdocs_document_dates-2.2.0}/mkdocs_document_dates/lang/zh_tw.py
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
|