Skip to content

Commit baa45ce

Browse files
committed
Update timeago.js dependency to 4.0.2, see #44
1 parent d4303ad commit baa45ce

File tree

7 files changed

+34
-9
lines changed

7 files changed

+34
-9
lines changed

Diff for: mkdocs_git_revision_date_localized_plugin/js/timeago.locales.min.js

-1
This file was deleted.

Diff for: mkdocs_git_revision_date_localized_plugin/js/timeago.min.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: mkdocs_git_revision_date_localized_plugin/js/timeago_mkdocs_material.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ if (
88
app.document$.subscribe(function() {
99
var nodes = document.querySelectorAll('.timeago');
1010
var locale = nodes[0].getAttribute('locale');
11-
timeago().render(nodes, locale);
11+
timeago.render(nodes, locale);
1212
})
1313
} else {
1414
var nodes = document.querySelectorAll('.timeago');
1515
var locale = nodes[0].getAttribute('locale');
16-
timeago().render(nodes, locale);
16+
timeago.render(nodes, locale);
1717
}

Diff for: mkdocs_git_revision_date_localized_plugin/plugin.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ def on_config(self, config: config_options.Config, **kwargs) -> dict:
9393
# Add pointers to support files for timeago.js
9494
if self.config.get("type") == "timeago":
9595
config["extra_javascript"] = ["js/timeago_mkdocs_material.js"] + config["extra_javascript"]
96-
config["extra_javascript"] = ["js/timeago.locales.min.js"] + config["extra_javascript"]
9796
config["extra_javascript"] = ["js/timeago.min.js"] + config["extra_javascript"]
9897
config["extra_css"] = ["css/timeago.css"] + config["extra_css"]
9998

@@ -148,10 +147,8 @@ def on_page_markdown(
148147
def on_post_build(self, config, **kwargs):
149148

150149
# Add timeago files:
151-
# Current version timeago.js: 2.0.2
152150
if self.config.get("type") == "timeago":
153-
files = ['js/timeago.min.js', 'js/timeago.locales.min.js',
154-
'js/timeago_mkdocs_material.js', 'css/timeago.css']
151+
files = ['js/timeago.min.js', 'js/timeago_mkdocs_material.js', 'css/timeago.css']
155152
for file in files:
156153
dest_file_path = os.path.join(config["site_dir"], file)
157154
src_file_path = os.path.join(HERE, file)

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="mkdocs-git-revision-date-localized-plugin",
8-
version="0.7.3",
8+
version="0.7.4",
99
description="Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file.",
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
site_name: test gitrevisiondatelocalized_plugin
2+
use_directory_urls: true
3+
4+
theme:
5+
name: 'material'
6+
7+
plugins:
8+
- search
9+
- git-revision-date-localized:
10+
type: timeago
11+
locale: de
12+
13+
14+
nav:
15+
- index.md
16+
- first_page.md
17+
- Subpage:
18+
- subpage.md
19+
- second_page.md
20+
- page_with_tag.md
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
site_name: test gitrevisiondatelocalized_plugin
2+
use_directory_urls: true
3+
4+
plugins:
5+
- search
6+
- git-revision-date-localized:
7+
type: timeago
8+
locale: de

0 commit comments

Comments
 (0)