mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
help: Serve help center build without relative links for zulip.com.
We have a copy of help center with relative links disabled which is reserved for root domains without an organisation on the root domain. Ideally, we should have some logic to determine whether we are on such a root domain or not. For practical short term purposes, since this type of documentation is mainly useful for zulip.com, we add an exception for zulip.com.
This commit is contained in:
committed by
Tim Abbott
parent
246fbf6d29
commit
7db29f29de
@@ -29,7 +29,8 @@ location /static/ {
|
||||
|
||||
# Serve help center generated by astro/starlight.
|
||||
location /help {
|
||||
alias /home/zulip/deployments/current/starlight_help/dist/;
|
||||
alias $help_alias;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
@@ -46,7 +47,8 @@ location /help {
|
||||
# These files are hashed and thus immutable; cache them aggressively.
|
||||
# https://github.com/withastro/docs/blob/53603ad048e8aedbca1aed77bac8eb00dcada79d/src/content/docs/en/guides/integrations-guide/node.mdx?plain=1#L304
|
||||
location /help/_astro/ {
|
||||
alias /home/zulip/deployments/current/starlight_help/dist/_astro/;
|
||||
set $help_cache_alias "${help_alias}_astro/";
|
||||
alias $help_cache_alias;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
|
||||
|
@@ -61,4 +61,9 @@ http {
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
|
||||
map $host $help_alias {
|
||||
zulip.com /home/zulip/deployments/current/starlight_help/dist_no_relative_links/;
|
||||
default /home/zulip/deployments/current/starlight_help/dist/;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user