diff options
Diffstat (limited to 'landing/layouts/partials/dashboard-url.html')
| -rw-r--r-- | landing/layouts/partials/dashboard-url.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/landing/layouts/partials/dashboard-url.html b/landing/layouts/partials/dashboard-url.html new file mode 100644 index 0000000..62e5e5e --- /dev/null +++ b/landing/layouts/partials/dashboard-url.html @@ -0,0 +1,14 @@ +{{- /* + Returns the URL of the Tidy Index dashboard (the "API Key" app). + + Pulls from landing/data/urls.toml — the single source of truth for + cross-app URLs. Defaults to the dev URL, swaps to prod when the build + is running in the production environment (i.e. `hugo` or `hugo --minify`, + NOT `hugo server`). + + Usage: + <a href="{{ partial "dashboard-url.html" . }}">API Key</a> +*/ -}} +{{- $url := site.Data.urls.dashboard.dev -}} +{{- if hugo.IsProduction }}{{ $url = site.Data.urls.dashboard.prod }}{{ end -}} +{{- return $url -}} |
