diff --git a/docs/zh/guide/deploy.md b/docs/zh/guide/deploy.md index 1aec31f2..8c67ba41 100644 --- a/docs/zh/guide/deploy.md +++ b/docs/zh/guide/deploy.md @@ -300,18 +300,24 @@ Cache-Control: max-age=31536000,immutable server { gzip on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + listen 80; server_name _; index index.html; + location / { # content location root /app; + # exact matches -> reverse clean urls -> folders -> not found try_files $uri $uri.html $uri/ =404; + # non existent pages error_page 404 /404.html; + # a folder without index.html raises 403 in this setup error_page 403 /404.html; + # adjust caching headers # files in the assets folder have hashes filenames location ~* ^/assets/ { diff --git a/docs/zh/guide/sitemap-generation.md b/docs/zh/guide/sitemap-generation.md index 1e572367..1d661250 100644 --- a/docs/zh/guide/sitemap-generation.md +++ b/docs/zh/guide/sitemap-generation.md @@ -23,7 +23,6 @@ export default { lastmodDateOnly: false } } - ``` 如果在配置中使用 `base`,则应将其追加到 `hostname` 选项中: @@ -42,7 +41,6 @@ export default { 在将 sitemap 写入 `sitemap.xml` 文件之前,可以使用 `sitemap.transformItems` 钩子来修改 sitemap。使用 sitemap 调用该钩子,应返回 sitemap 数组。例如: ```ts - export default { sitemap: { hostname: 'https://example.com',