feat(docsite): optional site_url and site_label link back to the main site

- site.yaml keys site_url and site_label, validated: http(s) URL with a host
  or a path starting with a single /; a label needs a URL
- docs:build and docs:serve flags --site-url and --site-label override them
  the way --base-url overrides base_url
- every page header, the 404 page included, links back with the explicit
  label, else the URL host, else Home; unset output is unchanged
- docs/console/utilities.md documents the keys and flags
This commit is contained in:
Jakub Zych
2026-10-01 16:09:40 +02:00
parent 7936234e8c
commit a494375db7
10 changed files with 207 additions and 10 deletions

View File

@@ -280,6 +280,23 @@ a { color: var(--c-primary); }
.wordmark-cms { color: var(--c-accent); }
/* Optional link back to the main site (site_url). */
.site-link {
display: inline-flex;
align-items: center;
gap: 4px;
margin-left: 8px;
color: var(--c-side-label);
font-size: 14px;
line-height: 1.5;
text-decoration: none;
transition: color var(--ease);
}
.site-link:hover { color: var(--c-accent); }
.site-link .icon { width: 16px; height: 16px; vertical-align: 0; }
.icon-button,
.theme-toggle,
.search-trigger {
@@ -892,6 +909,7 @@ html.js .copy-button:not([hidden]) { display: inline-flex; }
}
@media (max-width: 639.98px) {
.site-link-label { display: none; }
.pager { grid-template-columns: 1fr; }
.pager-next { grid-column: 1; }
.pager-empty { display: none; }