diff --git a/README.md b/README.md index cb671915..63489d9d 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,12 @@ Project titles and banners link to a repository's HTTP(S) `homepage`, or its Git homepage is configured. Set that field to the project's public site, including its new subdomain. The consumer does not infer a site URL from an organization or repository name. +### Shared navigation + +`url-canonical` in `_config_theme.yml` is the main-site address used by the shared brand, navigation, and footer links. +Project pages keep their own `url` and `baseurl` for assets and database requests. Read the Docs project previews link +to the published main site; previews of the main site override `url-canonical` with their own version path. + ### CrowdIn Localization
diff --git a/_config_theme.yml b/_config_theme.yml index 8dbe3702..cc819da7 100644 --- a/_config_theme.yml +++ b/_config_theme.yml @@ -54,6 +54,7 @@ share-links-active: vk: false remove-ads: true # remove the "Powered by Beautiful Jekyll" text in the footer url-pretty: "app.LizardByte.dev" +url-canonical: "https://app.lizardbyte.dev" title-on-all-pages: true excerpt_length: 50 feed_show_excerpt: true diff --git a/_includes/footer-extra.html b/_includes/footer-extra.html index 714a1ef2..7b64806f 100644 --- a/_includes/footer-extra.html +++ b/_includes/footer-extra.html @@ -1,7 +1,7 @@ {% include open-in-new-window.html %} -Privacy +Privacy • -Terms +Terms • -Licenses +Licenses diff --git a/_includes/nav.html b/_includes/nav.html new file mode 100644 index 00000000..5ecf61d6 --- /dev/null +++ b/_includes/nav.html @@ -0,0 +1,95 @@ + + +{% include search.html %} diff --git a/_includes/shared-site-url.html b/_includes/shared-site-url.html new file mode 100644 index 00000000..a8c682b9 --- /dev/null +++ b/_includes/shared-site-url.html @@ -0,0 +1,13 @@ +{%- assign shared_path = include.path | default: '' -%} +{%- assign shared_first = shared_path | slice: 0, 1 -%} +{%- assign shared_prefix = shared_path | slice: 0, 2 -%} +{%- if shared_path contains ':' or shared_prefix == '//' or shared_first == '#' -%} + {{- shared_path | escape -}} +{%- else -%} + {%- assign shared_base = site.url-canonical | default: site.root_baseurl | default: '' -%} + {%- assign shared_last = shared_base | slice: -1, 1 -%} + {%- if shared_first == '/' -%} + {%- assign shared_path = shared_path | remove_first: '/' -%} + {%- endif -%} + {{- shared_base | escape -}}{%- unless shared_last == '/' -%}/{%- endunless -%}{{- shared_path | escape -}} +{%- endif -%} diff --git a/_includes/support.html b/_includes/support.html index 2f215057..5e6e2268 100644 --- a/_includes/support.html +++ b/_includes/support.html @@ -13,7 +13,7 @@