mkdocs-document-dates 2.3.3__tar.gz → 2.3.5__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.3.5}/PKG-INFO +8 -3
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/README.md +7 -2
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/__init__.py +0 -2
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/plugin.py +7 -4
- mkdocs_document_dates-2.3.5/mkdocs_document_dates/styles.py +42 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates.egg-info/PKG-INFO +8 -3
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/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.3.5}/LICENSE +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/hooks/pre-commit +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/hooks_installer.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/__init__.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ar.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/de.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/en.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/es.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/fr.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ja.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ko.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ru.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/zh.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/zh_tw.py +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates.egg-info/SOURCES.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates.egg-info/dependency_links.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates.egg-info/entry_points.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates.egg-info/requires.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates.egg-info/top_level.txt +0 -0
- {mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mkdocs-document-dates
|
3
|
-
Version: 2.3.
|
3
|
+
Version: 2.3.5
|
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
|
@@ -37,7 +37,8 @@ A MkDocs plugin for displaying <mark>accurate</mark> document creation and last
|
|
37
37
|
- Cross-platform support (Windows, macOS, Linux)
|
38
38
|
- Support for multiple time formats (date, datetime, timeago)
|
39
39
|
- Flexible display position (top or bottom)
|
40
|
-
- Support for
|
40
|
+
- Support for customizing display styles (CSS)
|
41
|
+
- Support for document exclusion mode
|
41
42
|
- Material Design icons, Elegant styling
|
42
43
|
- Lightweight with no extra dependencies
|
43
44
|
- Multi-language support
|
@@ -90,6 +91,10 @@ modified: 2025-02-23
|
|
90
91
|
- `created` can be replaced by any of the following fields: `created, date, creation_date, created_at, date_created`
|
91
92
|
- `modified` can be replaced by any of the following fields: `modified, updated, last_modified, updated_at, date_modified, last_update`
|
92
93
|
|
94
|
+
## Custom Display Styles (CSS)
|
95
|
+
|
96
|
+
Simply modify the code in the file `docs/assets/document_dates.css`
|
97
|
+
|
93
98
|
## Configuration Options
|
94
99
|
|
95
100
|
- **type** : Date type (default: `date` )
|
@@ -107,7 +112,7 @@ modified: 2025-02-23
|
|
107
112
|
- **exclude** : File exclusion list (default: [] )
|
108
113
|
- Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
|
109
114
|
|
110
|
-
##
|
115
|
+
## Tips
|
111
116
|
|
112
117
|
- 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
118
|
1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
|
@@ -14,7 +14,8 @@ A MkDocs plugin for displaying <mark>accurate</mark> document creation and last
|
|
14
14
|
- Cross-platform support (Windows, macOS, Linux)
|
15
15
|
- Support for multiple time formats (date, datetime, timeago)
|
16
16
|
- Flexible display position (top or bottom)
|
17
|
-
- Support for
|
17
|
+
- Support for customizing display styles (CSS)
|
18
|
+
- Support for document exclusion mode
|
18
19
|
- Material Design icons, Elegant styling
|
19
20
|
- Lightweight with no extra dependencies
|
20
21
|
- Multi-language support
|
@@ -67,6 +68,10 @@ modified: 2025-02-23
|
|
67
68
|
- `created` can be replaced by any of the following fields: `created, date, creation_date, created_at, date_created`
|
68
69
|
- `modified` can be replaced by any of the following fields: `modified, updated, last_modified, updated_at, date_modified, last_update`
|
69
70
|
|
71
|
+
## Custom Display Styles (CSS)
|
72
|
+
|
73
|
+
Simply modify the code in the file `docs/assets/document_dates.css`
|
74
|
+
|
70
75
|
## Configuration Options
|
71
76
|
|
72
77
|
- **type** : Date type (default: `date` )
|
@@ -84,7 +89,7 @@ modified: 2025-02-23
|
|
84
89
|
- **exclude** : File exclusion list (default: [] )
|
85
90
|
- Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
|
86
91
|
|
87
|
-
##
|
92
|
+
## Tips
|
88
93
|
|
89
94
|
- 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
95
|
1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
|
@@ -38,10 +38,11 @@ class DocumentDatesPlugin(BasePlugin):
|
|
38
38
|
|
39
39
|
# 添加自定义 CSS
|
40
40
|
css_file = Path(config['docs_dir']) / 'assets' / 'document_dates.css'
|
41
|
-
css_file.
|
42
|
-
|
41
|
+
if not css_file.exists():
|
42
|
+
css_file.parent.mkdir(parents=True, exist_ok=True)
|
43
|
+
css_file.write_text(self._get_css_content())
|
43
44
|
config['extra_css'].append('assets/document_dates.css')
|
44
|
-
|
45
|
+
|
45
46
|
return config
|
46
47
|
|
47
48
|
def _get_date_info(self, created, modified):
|
@@ -50,8 +51,10 @@ class DocumentDatesPlugin(BasePlugin):
|
|
50
51
|
locale = 'en'
|
51
52
|
t = self.translations[locale]
|
52
53
|
|
54
|
+
position_class = 'document-dates-top' if self.config['position'] == 'top' else 'document-dates-bottom'
|
55
|
+
|
53
56
|
return (
|
54
|
-
f"<div class='document-dates-plugin-wrapper'>"
|
57
|
+
f"<div class='document-dates-plugin-wrapper {position_class}'>"
|
55
58
|
f"<div class='document-dates-plugin'>"
|
56
59
|
f"<span title='{t['created_time']}: {created.strftime(self.config['date_format'])}'><span class='material-icons'>add_circle</span>"
|
57
60
|
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.3.5}/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.
|
3
|
+
Version: 2.3.5
|
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
|
@@ -37,7 +37,8 @@ A MkDocs plugin for displaying <mark>accurate</mark> document creation and last
|
|
37
37
|
- Cross-platform support (Windows, macOS, Linux)
|
38
38
|
- Support for multiple time formats (date, datetime, timeago)
|
39
39
|
- Flexible display position (top or bottom)
|
40
|
-
- Support for
|
40
|
+
- Support for customizing display styles (CSS)
|
41
|
+
- Support for document exclusion mode
|
41
42
|
- Material Design icons, Elegant styling
|
42
43
|
- Lightweight with no extra dependencies
|
43
44
|
- Multi-language support
|
@@ -90,6 +91,10 @@ modified: 2025-02-23
|
|
90
91
|
- `created` can be replaced by any of the following fields: `created, date, creation_date, created_at, date_created`
|
91
92
|
- `modified` can be replaced by any of the following fields: `modified, updated, last_modified, updated_at, date_modified, last_update`
|
92
93
|
|
94
|
+
## Custom Display Styles (CSS)
|
95
|
+
|
96
|
+
Simply modify the code in the file `docs/assets/document_dates.css`
|
97
|
+
|
93
98
|
## Configuration Options
|
94
99
|
|
95
100
|
- **type** : Date type (default: `date` )
|
@@ -107,7 +112,7 @@ modified: 2025-02-23
|
|
107
112
|
- **exclude** : File exclusion list (default: [] )
|
108
113
|
- Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
|
109
114
|
|
110
|
-
##
|
115
|
+
## Tips
|
111
116
|
|
112
117
|
- 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
118
|
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.3.5}/mkdocs_document_dates/hooks/pre-commit
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/hooks_installer.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/__init__.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ar.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/de.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/en.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/es.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/fr.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ja.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ko.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/ru.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/mkdocs_document_dates/lang/zh.py
RENAMED
File without changes
|
{mkdocs_document_dates-2.3.3 → mkdocs_document_dates-2.3.5}/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
|