Skip to content

Finish unifying link rendering across templates #577

@caugner

Description

@caugner

Context

A major link rendering unification landed in 2024-12-16 (commit e547623), centralizing most link rendering into render_internal_link(), render_link_from_page(), and render_link_via_page() in crates/rari-doc/src/html/links.rs.

Current state

Most templates and sidebar rendering use the unified functions. However, several templates still build links inline:

  • templ/templs/subpages_with_summaries.rs — internal links without badges
  • templ/templs/glossarydisambiguation.rs — internal links without badges
  • templ/templs/xsltref.rs — static localized HTML strings
  • templ/templs/links/rfc.rs — external IETF links
  • templ/templs/webext_all_examples.rs — external GitHub links
  • templ/templs/web_ext_examples.rs — external GitHub links
  • templ/templs/embeds/live_sample_link.rs — fragment-only links

Assessment

Some of these are reasonable exceptions (external URLs, fragment-only links, static HTML). The internal link cases (subpages_with_summaries, glossarydisambiguation) could potentially use the unified functions.

This is a low-priority cleanup — the current code works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions