Skip to content

Render every link on a catalog card, not just the first - #160

Open
dominicrume wants to merge 1 commit into
canton-network-devs:mainfrom
dominicrume:render-all-card-links
Open

Render every link on a catalog card, not just the first#160
dominicrume wants to merge 1 commit into
canton-network-devs:mainfrom
dominicrume:render-all-card-links

Conversation

@dominicrume

Copy link
Copy Markdown
Contributor

tools.json lets an entry declare several links, but the catalog template only ever emits links[0], on the card title. Everything after it is dropped.

19 of the 56 entries declare more than one link, so a tool whose package, demo or spec lives behind link two is listed on the hub with no way to reach it. Counting the rendered page today: 0 cards show more than one link, and 24 declared URLs never appear.

One file, 16 lines. A .card-links row after the description, using the existing --border and --muted tokens at the same font size and pill radius as .badge-devfund, so it matches the cards rather than introducing a new style.

Verified by regenerating the catalog from the current tools.json:

before after
cards 56 56
cards showing >1 link 0 19
declared links missing from the page 24 0

Cards with a single link render byte-identically to now, and a link with no label falls back to "Link" rather than emitting an empty anchor. llms.txt generation is untouched.

I noticed this after my own entry was merged in #156 — it declares five links and four of them were invisible — but the fix is the template, and it applies to eighteen other tools before it applies to mine.

tools.json lets an entry declare several links, but the card template only
ever emitted links[0], on the title. 19 of the 56 entries declare more than
one, so a tool whose package, demo or spec lives behind link two is listed
with no way to reach it.

Adds a .card-links row after the description using the existing border and
muted tokens, at the same size and radius as .badge-devfund. Cards with a
single link render exactly as before, and a link with no label falls back to
'Link' rather than emitting an empty anchor.
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