Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add note for head attrs and base config (close #1412) #1419

Merged
merged 7 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

You will need to set this if you plan to deploy your site under a sub path. It should always start and end with a slash. For example, if you plan to deploy your site to GitHub pages at `https://foo.github.io/bar/`, then you should set `base` to `"/bar/"`.

The `base` is automatically prepended to all the URLs that start with `/` in other options, so you only need to specify it once.
The `base` is automatically prepended to the URLs that start with `/` in other options, so you only need to specify it once. (Except for attrs of [head](#head))

Notice that `base` should be an absolute URL pathname starting and ending with `/` .

Expand Down Expand Up @@ -92,6 +92,8 @@

This can be specified in different locales.

Notice that if the `attrValue` is a pathname, it will be kept as-is without prepending [base](#base) automatically, so remember to prepend it manually if needed.

- Example:

To add a custom favicon:
Expand Down
4 changes: 3 additions & 1 deletion docs/zh/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

如果你想让你的网站部署到一个子路径下,你将需要设置它。它的值应当总是以斜杠开始,并以斜杠结束。举例来说,如果你想将你的网站部署到 `https://foo.github.io/bar/`,那么 `base` 应该被设置成 `"/bar/"`。

`base` 将会作为前缀自动地插入到所有以 `/` 开始的其他选项的链接中,所以你只需要指定一次。
`base` 将会作为前缀自动地插入到以 `/` 开始的其他选项的链接中,所以你只需要指定一次。([head](#head) 中的属性除外)

需要注意的是, `base` 应该是一个以 `/` 开始和结束的绝对路径名。

Expand Down Expand Up @@ -91,6 +91,8 @@

它可以设置在不同语言的 locales 中。

需要注意的是,如果 `attrValue` 是一个 pathname ,它不会被自动添加 [base](#base) 前缀,所以如果需要的话请记得手动添加前缀。

- 示例:

增加一个自定义的 favicon :
Expand Down