Skip to content

Fix homepage feature links (404s and wrong URL)#218

Open
alienx5499 wants to merge 1 commit intodrand:masterfrom
alienx5499:fix/homepage-feature-links
Open

Fix homepage feature links (404s and wrong URL)#218
alienx5499 wants to merge 1 commit intodrand:masterfrom
alienx5499:fix/homepage-feature-links

Conversation

@alienx5499
Copy link

Summary

Fixes broken behavior for the homepage feature buttons (API docs, Go, JS):

  1. 404 on API docs — The "API docs" link pointed to /developer/http-api, which does not exist on drand.love; developer docs live on docs.drand.love. The correct URL is https://docs.drand.love/dev-guide/developer/http-api.

  2. Wrong URL when clicking — Using <router-link :to="..."> with full https:// URLs made Vue Router treat them as paths, so clicks opened e.g. http://localhost:8082/https:/docs.drand.love/... instead of the real docs URL. External links now use a plain <a> so they open correctly.

What's wrong on live (https://drand.love/)

  • API docs → Points to https://drand.love/developer/http-api. That path doesn't host the real API docs (they're on docs.drand.love), so users get the wrong page or a 404.
  • Go / JS → Rendered as drand.love/https:/docs.drand.love/developer/clients/#go- (and same for JS). The site origin is prepended to the full URL, so the link is invalid and breaks in production as well as on localhost.

Screenshots

Before (live site)

API docs — docs.drand.love Page Not Found Go — drand.love 404 JS — drand.love 404
API docs Page Not Found Go 404 JS 404

Changes

  1. docs/README.md

    • API docs button: link: /developer/http-apilink: https://docs.drand.love/dev-guide/developer/http-api
    • Go and JS links unchanged (already valid: .../developer/clients/#go- and #javascript--typescript-).
  2. docs/.vuepress/theme/components/Home.vue

    • Feature action links that start with http:// or https:// now render as <a href="..." target="_blank" rel="noopener noreferrer"> instead of <router-link :to="...">, so external URLs open in a new tab and no longer get the current origin prepended (fixes the malformed URL in both dev and production).
    • Links that do not start with http:// or https:// (e.g. /about/, /loe/) still use <router-link> and behave as before. Only the three feature buttons are affected; the rest of the page (Learn more, Get involved, footer, nav, etc.) is unchanged and still uses VuePress's default link handling.

Checklist

  • API docs link points to valid docs.drand.love page
  • Go / JS links unchanged and valid
  • External links open in new tab and no longer get origin prepended
  • Relative links and rest of page (Learn more, Get involved, footer, nav) unchanged
  • Screenshot added above (before, from live site)

@alienx5499
Copy link
Author

@AnomalRoil @CluEleSsUK This PR fixes two production issues on drand.love:

  1. The homepage “API docs” button pointed to a non-existent path — it now links to the correct docs.drand.love HTTP API page.
  2. External links (Go & JS buttons) were using router-link, which caused incorrect URLs like drand.love/https:/docs.drand.love/.... These now use a standard <a target="_blank"> and open correctly.

Marking for visibility since this affects live users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant