Skip to content

Broken default fallback URL in community-lists shortcode resulting in 404 links #182

Description

@bhuvan-somisetty

Problem

In layouts/_shortcodes/community-lists.md, line 2 configures the fallback URL for contribution guidelines when .Page.Params.contributingUrl is omitted from page front-matter:

{{ $contribUrl := .Page.Params.contributingUrl | default "docs/contribution-guidelines" -}}

However, docs/contribution-guidelines does not exist in the site repository. The actual contribution documentation page is located at content/en/docs/contributing.md (which renders to /docs/contributing/).


Root Cause

  1. Line 2 of layouts/_shortcodes/community-lists.md hardcodes "docs/contribution-guidelines" as the default fallback parameter.
  2. The site documentation structure uses /docs/contributing/ for contribution guidelines.
  3. If the contributingUrl front-matter parameter is omitted or removed from a page rendering the {{% community-lists %}} shortcode, the shortcode generates a link to /docs/contribution-guidelines/, which returns a 404 Not Found error.

Affected Components

  • layouts/_shortcodes/community-lists.md

Reproduction / Evidence

  1. Inspect layouts/_shortcodes/community-lists.md line 2 and line 23:
    {{ $contribUrl := .Page.Params.contributingUrl | default "docs/contribution-guidelines" -}}
    ...
    [{{ T "community_guideline" }}]({{ $contribUrl | relURL }}).
    
  2. Note that git ls-files content/en/docs/ contains content/en/docs/contributing.md (rendered at /docs/contributing/), while /docs/contribution-guidelines does not exist.

Acceptance Criteria

  • Update the default fallback URL in layouts/_shortcodes/community-lists.md from "docs/contribution-guidelines" to "/docs/contributing/".
  • Verify that community-lists renders valid, resolving links to the Contributing page even when contributingUrl is omitted from front matter.

Proposed Solution Direction

Update line 2 of layouts/_shortcodes/community-lists.md to fallback to "/docs/contributing/":

{{ $contribUrl := .Page.Params.contributingUrl | default "/docs/contributing/" -}}

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