Skip to content

Commit adbf7d1

Browse files
authored
feat(plugin-git): prefer <time> tag with time (#404)
1 parent 163f643 commit adbf7d1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

plugins/development/plugin-git/src/client/components/GitChangelog.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,15 @@ export const GitChangelog = defineComponent({
6060
h(
6161
'span',
6262
{ 'class': 'vp-changelog-date', 'data-allow-mismatch': '' },
63-
[locale.value.timeOn, ' ', item.date],
63+
[
64+
locale.value.timeOn,
65+
' ',
66+
h(
67+
'time',
68+
{ datetime: new Date(item.time).toISOString() },
69+
item.date,
70+
),
71+
],
6472
),
6573
]),
6674
)
@@ -84,7 +92,7 @@ export const GitChangelog = defineComponent({
8492
h('span', { 'class': 'vp-changelog-date', 'data-allow-mismatch': '' }, [
8593
locale.value.timeOn || 'on',
8694
' ',
87-
item.date,
95+
h('time', { datetime: new Date(item.time).toISOString() }, item.date),
8896
]),
8997
])
9098

0 commit comments

Comments
 (0)