You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/reference/default-theme-last-updated.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,27 @@
2
2
3
3
The update time of the last content will be displayed in the lower right corner of the page. To enable it, add `lastUpdated` options to your config.
4
4
5
-
::: tip
6
-
You need to commit the markdown file to see the updated time.
5
+
::: info
6
+
VitePress displays the "last updated" time using the timestamp of the most recent Git commit for each file. To enable this, the Markdown file must be committed to Git.
7
+
8
+
Internally, VitePress runs `git log -1 --pretty="%ai"` on each file to retrieve its timestamp. If all pages show the same update time, it's likely due to shallow cloning (common in CI environments), which limits Git history.
9
+
10
+
To fix this in **GitHub Actions**, use the following in your workflow:
11
+
12
+
```yaml{4}
13
+
- name: Checkout
14
+
uses: actions/checkout@v4
15
+
with:
16
+
fetch-depth: 0
17
+
```
18
+
19
+
Other CI/CD platforms have similar settings.
20
+
21
+
If such options aren't available, you can prepend the `docs:build` command in your `package.json` with a manual fetch:
|`--outDir <dir>`| Directorio de salida relativo a **cwd** (por defecto: `<root>/.vitepress/dist`) (`string`) |
46
-
|`--minify [minifier]`| Habilitar/desabilitar la minificación, o especifica un minero para usar (por defecto: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) |
47
46
|`--assetsInlineLimit <number>`| Limitar los bytes para alinear los activos en base 64 (por defecto: `4096`) (`number`) |
Copy file name to clipboardExpand all lines: docs/fa/reference/cli.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,6 @@ vitepress build [root]
43
43
|`--base <path>`| مسیر پایه عمومی (پیشفرض: `/`) (`string`) |
44
44
|`--target <target>`| هدف ترنسپایل (پیشفرض: `"modules"`) (`string`) |
45
45
|`--outDir <dir>`| دایرکتوری خروجی نسبت به **cwd** (پیشفرض: `<root>/.vitepress/dist`) (`string`) |
46
-
|`--minify [minifier]`| فعال یا غیرفعال کردن فشردهسازی، یا تعیین فشردهسازی برای استفاده (پیشفرض: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) |
47
46
|`--assetsInlineLimit <number>`| آستانه تبدیل پایه ۶۴ استاتیک به بایت (پیشفرض: `4096`) (`number`) |
0 commit comments