mkdocs-document-dates 2.3.3__tar.gz → 2.4.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.3.3 → mkdocs_document_dates-2.4.0}/PKG-INFO +3 -4
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/README.md +2 -3
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/__init__.py +0 -2
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/plugin.py +5 -3
- mkdocs_document_dates-2.4.0/mkdocs_document_dates/styles.py +42 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates.egg-info/PKG-INFO +3 -4
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/setup.py +1 -1
- mkdocs_document_dates-2.3.3/mkdocs_document_dates/styles.py +0 -27
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/LICENSE +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/hooks/pre-commit +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/hooks_installer.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/__init__.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ar.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/de.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/en.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/es.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/fr.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ja.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ko.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ru.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/zh.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/zh_tw.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates.egg-info/SOURCES.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates.egg-info/dependency_links.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates.egg-info/entry_points.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates.egg-info/requires.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates.egg-info/top_level.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mkdocs-document-dates
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.4.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
|
@@ -31,13 +31,12 @@ A MkDocs plugin for displaying <mark>accurate</mark> document creation and last
|
|
31
31
|
|
32
32
|
## Features
|
33
33
|
|
34
|
-
- Automatically displays document creation and last modification times
|
35
34
|
- **No Git dependency**, uses filesystem timestamps directly
|
36
35
|
- Supports manual date specification in `Front Matter`
|
37
36
|
- Cross-platform support (Windows, macOS, Linux)
|
38
37
|
- Support for multiple time formats (date, datetime, timeago)
|
39
38
|
- Flexible display position (top or bottom)
|
40
|
-
- Support for document exclusion
|
39
|
+
- Support for document exclusion mode
|
41
40
|
- Material Design icons, Elegant styling
|
42
41
|
- Lightweight with no extra dependencies
|
43
42
|
- Multi-language support
|
@@ -107,7 +106,7 @@ modified: 2025-02-23
|
|
107
106
|
- **exclude** : File exclusion list (default: [] )
|
108
107
|
- Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
|
109
108
|
|
110
|
-
##
|
109
|
+
## Tips
|
111
110
|
|
112
111
|
- It still works when using CI/CD build systems (e.g. Github Actions), used a cache file `.dates_cache.json` to solve this problem:
|
113
112
|
1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
|
@@ -8,13 +8,12 @@ A MkDocs plugin for displaying <mark>accurate</mark> document creation and last
|
|
8
8
|
|
9
9
|
## Features
|
10
10
|
|
11
|
-
- Automatically displays document creation and last modification times
|
12
11
|
- **No Git dependency**, uses filesystem timestamps directly
|
13
12
|
- Supports manual date specification in `Front Matter`
|
14
13
|
- Cross-platform support (Windows, macOS, Linux)
|
15
14
|
- Support for multiple time formats (date, datetime, timeago)
|
16
15
|
- Flexible display position (top or bottom)
|
17
|
-
- Support for document exclusion
|
16
|
+
- Support for document exclusion mode
|
18
17
|
- Material Design icons, Elegant styling
|
19
18
|
- Lightweight with no extra dependencies
|
20
19
|
- Multi-language support
|
@@ -84,7 +83,7 @@ modified: 2025-02-23
|
|
84
83
|
- **exclude** : File exclusion list (default: [] )
|
85
84
|
- Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
|
86
85
|
|
87
|
-
##
|
86
|
+
## Tips
|
88
87
|
|
89
88
|
- It still works when using CI/CD build systems (e.g. Github Actions), used a cache file `.dates_cache.json` to solve this problem:
|
90
89
|
1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
|
@@ -36,12 +36,12 @@ class DocumentDatesPlugin(BasePlugin):
|
|
36
36
|
if material_icons_url not in config['extra_css']:
|
37
37
|
config['extra_css'].append(material_icons_url)
|
38
38
|
|
39
|
-
#
|
39
|
+
# 添加默认 CSS
|
40
40
|
css_file = Path(config['docs_dir']) / 'assets' / 'document_dates.css'
|
41
41
|
css_file.parent.mkdir(parents=True, exist_ok=True)
|
42
42
|
css_file.write_text(self._get_css_content())
|
43
43
|
config['extra_css'].append('assets/document_dates.css')
|
44
|
-
|
44
|
+
|
45
45
|
return config
|
46
46
|
|
47
47
|
def _get_date_info(self, created, modified):
|
@@ -50,8 +50,10 @@ class DocumentDatesPlugin(BasePlugin):
|
|
50
50
|
locale = 'en'
|
51
51
|
t = self.translations[locale]
|
52
52
|
|
53
|
+
position_class = 'document-dates-top' if self.config['position'] == 'top' else 'document-dates-bottom'
|
54
|
+
|
53
55
|
return (
|
54
|
-
f"<div class='document-dates-plugin-wrapper'>"
|
56
|
+
f"<div class='document-dates-plugin-wrapper {position_class}'>"
|
55
57
|
f"<div class='document-dates-plugin'>"
|
56
58
|
f"<span title='{t['created_time']}: {created.strftime(self.config['date_format'])}'><span class='material-icons'>add_circle</span>"
|
57
59
|
f"{self._get_formatted_date(created)}</span>"
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
DOCUMENT_DATES_CSS = """
|
3
|
+
.document-dates-plugin {
|
4
|
+
color: #8e8e8e;
|
5
|
+
font-size: 0.75rem;
|
6
|
+
padding: 0.2rem 0;
|
7
|
+
opacity: 0.7;
|
8
|
+
display: flex;
|
9
|
+
gap: 1.5rem;
|
10
|
+
align-items: center;
|
11
|
+
margin-bottom: 0.3rem;
|
12
|
+
}
|
13
|
+
.document-dates-plugin span {
|
14
|
+
display: inline-flex;
|
15
|
+
align-items: center;
|
16
|
+
gap: 0.3rem;
|
17
|
+
}
|
18
|
+
.document-dates-plugin .material-icons {
|
19
|
+
font-size: 0.9rem;
|
20
|
+
opacity: 0.7;
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
/* top position style */
|
25
|
+
.document-dates-plugin-wrapper.document-dates-top {
|
26
|
+
margin-top: -1.2rem;
|
27
|
+
padding-bottom: 0.3rem;
|
28
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.07);
|
29
|
+
}
|
30
|
+
/* bottom position style */
|
31
|
+
.document-dates-plugin-wrapper.document-dates-bottom {
|
32
|
+
margin: 1rem 0;
|
33
|
+
padding-bottom: 0.3rem;
|
34
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.07);
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
/* Hide the footnote divider immediately following the date information with the CSS adjacent sibling selector */
|
39
|
+
.document-dates-plugin-wrapper + .footnote hr {
|
40
|
+
display: none;
|
41
|
+
}
|
42
|
+
"""
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/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: 2.
|
3
|
+
Version: 2.4.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
|
@@ -31,13 +31,12 @@ A MkDocs plugin for displaying <mark>accurate</mark> document creation and last
|
|
31
31
|
|
32
32
|
## Features
|
33
33
|
|
34
|
-
- Automatically displays document creation and last modification times
|
35
34
|
- **No Git dependency**, uses filesystem timestamps directly
|
36
35
|
- Supports manual date specification in `Front Matter`
|
37
36
|
- Cross-platform support (Windows, macOS, Linux)
|
38
37
|
- Support for multiple time formats (date, datetime, timeago)
|
39
38
|
- Flexible display position (top or bottom)
|
40
|
-
- Support for document exclusion
|
39
|
+
- Support for document exclusion mode
|
41
40
|
- Material Design icons, Elegant styling
|
42
41
|
- Lightweight with no extra dependencies
|
43
42
|
- Multi-language support
|
@@ -107,7 +106,7 @@ modified: 2025-02-23
|
|
107
106
|
- **exclude** : File exclusion list (default: [] )
|
108
107
|
- Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
|
109
108
|
|
110
|
-
##
|
109
|
+
## Tips
|
111
110
|
|
112
111
|
- It still works when using CI/CD build systems (e.g. Github Actions), used a cache file `.dates_cache.json` to solve this problem:
|
113
112
|
1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
|
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
DOCUMENT_DATES_CSS = """
|
3
|
-
.document-dates-plugin {
|
4
|
-
color: #8e8e8e;
|
5
|
-
font-size: 0.75rem;
|
6
|
-
padding: 0.2rem 0;
|
7
|
-
opacity: 0.8;
|
8
|
-
display: flex;
|
9
|
-
gap: 1.5rem;
|
10
|
-
align-items: center;
|
11
|
-
margin-bottom: 0.3rem;
|
12
|
-
}
|
13
|
-
.document-dates-plugin span {
|
14
|
-
display: inline-flex;
|
15
|
-
align-items: center;
|
16
|
-
gap: 0.3rem;
|
17
|
-
}
|
18
|
-
.document-dates-plugin .material-icons {
|
19
|
-
font-size: 0.9rem;
|
20
|
-
opacity: 0.7;
|
21
|
-
}
|
22
|
-
.document-dates-plugin-wrapper {
|
23
|
-
margin: 0.3rem 0 1rem 0;
|
24
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.07);
|
25
|
-
padding-bottom: 0.5rem;
|
26
|
-
}
|
27
|
-
"""
|
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/hooks/pre-commit
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/hooks_installer.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/__init__.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ar.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/de.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/en.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/es.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/fr.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ja.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ko.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/ru.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.0}/mkdocs_document_dates/lang/zh.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.4.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
|