Skip to content

News: Add an optional "source_url" property to news article entriesΒ #7135

@leecalcote

Description

@leecalcote

Summary

Add an optional "original_url" (or similarly named) property to news article entries and update the news template so that, when present, the article page displays a link labeled "Originally published at" that points to the original article.

Background

We reprint external news articles pertaining to Layer5 and its projects and products on layer5.io/news. At the moment there is no standardized field to point back to the original source. Adding an optional property and rendering it in the UI will give proper attribution and allow readers to visit the original article.

Requirements

  • Add an optional field to the news article data model (e.g., source_url).
  • Update the news collection/template to read the new field.
  • When the field is present, display a visible link on the article page with the text: "Originally published at [Source Name or URL]".
  • The link should open in a new tab.
  • The feature must be optional and not affect articles that do not provide a source URL.
  • Include a short unit or visual test to verify the link is rendered only when the field exists.

Suggested tasks

  • Update news schema/frontmatter to include optional source_url.
  • Modify the news article template to conditionally render the attribution link (graphql).
  • Add or update one news item as an example to demonstrate the behavior.
  • Update the news_template.md to include an example and comment explaining the property.
  • Add a short note in CONTRIBUTING.md or the newsroom author guide about the new field and how to use it.

Acceptance criteria

  • news.md issue template has been updated.
  • Existing news pages with no source field remain unchanged.
  • A news page with original_url shows a single, clearly labeled "Originally published at" link that opens in a new tab.
  • The code change is documented in CONTRIBUTING or the content guide (where news authoring is described).

Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions