From 2468f51ac3bc58459861f94cec38d366aa12e07c Mon Sep 17 00:00:00 2001 From: alienx5499 Date: Sat, 28 Feb 2026 17:25:43 +0530 Subject: [PATCH] fix(website): homepage API docs link and external link handling --- docs/.vuepress/theme/components/Home.vue | 19 ++++++++++++++++++- docs/README.md | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/.vuepress/theme/components/Home.vue b/docs/.vuepress/theme/components/Home.vue index 24f5686d..19407616 100644 --- a/docs/.vuepress/theme/components/Home.vue +++ b/docs/.vuepress/theme/components/Home.vue @@ -31,7 +31,14 @@

{{ feature.details }}

@@ -67,6 +74,16 @@ export default { text: this.data.actionText } } + }, + + methods: { + // only treat as external when link is clearly a full URL + // relative paths still use router link + isExternal(link) { + if (typeof link !== 'string') return false + const trimmed = link.trim() + return trimmed.startsWith('http://') || trimmed.startsWith('https://') + } } } diff --git a/docs/README.md b/docs/README.md index 4ee6e190..44b288da 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,7 +11,7 @@ features: details: Get your randomness or chain information directly by sending HTTP `GET` requests to the drand JSON HTTP API. actions: - text: API docs - link: /developer/http-api + link: https://docs.drand.love/dev-guide/developer/http-api - title: Client libraries details: Use drand client libraries to easily consume randomness from your applications, over HTTP, gRPC or libp2p PubSub. actions: