Skip to content

Automate FReD citation updates from upstream repository#607

Open
Copilot wants to merge 9 commits intomasterfrom
copilot/update-fred-citation
Open

Automate FReD citation updates from upstream repository#607
Copilot wants to merge 9 commits intomasterfrom
copilot/update-fred-citation

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

The FReD citation on the cite_us page was hardcoded and required manual updates. This implements automatic weekly refresh from the canonical source at forrtproject/FReD-data.

Changes

  • Python script (scripts/update_fred_citation.py): Fetches citation from upstream, saves as plain text to static/data/fred_citation.txt
  • Hugo template (layouts/shortcodes/cite-us.html): Loads citation from text file using readFile instead of hardcoded string; single variable definition eliminates duplication between HTML and JavaScript
  • Workflow (.github/workflows/data-processing.yml): New step runs weekly on Sundays or via manual dispatch; citation file committed to build-resources branch

The Hugo template now references the text file directly:

{{/* Load FReD citation from text file or use fallback */}}
{{ $fredCitation := "" }}
{{ $citationFile := "static/data/fred_citation.txt" }}
{{ if fileExists $citationFile }}
    {{ $fredCitation = readFile $citationFile }}
    {{ $fredCitation = trim $fredCitation " \n\r\t" }}
{{ else }}
    {{ $fredCitation = "Wallrich, L.*, & Röseler, L.*, ..." }}
{{ end }}

Both the displayed citation and the copy button use the same variable, ensuring consistency. The implementation uses plain text files for simplicity, avoiding unnecessary JSON parsing overhead.

Original prompt

This section details on the original issue you should resolve

<issue_title>Cite us: include current FReD citation</issue_title>
<issue_description>On the following page, the FReD citation should be regularly updated
https://forrt.org/about/cite_us/

based on this source:
https://raw.githubusercontent.com/forrtproject/FReD-data/refs/heads/main/output/citation.txt

Maybe we can add that to the data processing action and only run this part once a week or on manual runs</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 4, 2026 15:33
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Copilot AI changed the title [WIP] Add current FReD citation to citation page Automate FReD citation updates from upstream repository Feb 4, 2026
Copilot AI requested a review from LukasWallrich February 4, 2026 15:41
@LukasWallrich
Copy link
Contributor

@copilot this JSON approach looks very complicated. Can we not just deal with text itself?

Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot this JSON approach looks very complicated. Can we not just deal with text itself?

Simplified to use plain text files instead of JSON. The Python script now saves the citation directly as text to static/data/fred_citation.txt, and Hugo reads it with readFile. No JSON parsing needed.

Changed in commit 5c94cf5.

@github-actions github-actions bot added the cicd Relevant to GitHub workflows label Feb 4, 2026
@richarddushime richarddushime marked this pull request as ready for review February 4, 2026 16:34
@richarddushime richarddushime requested a review from a team as a code owner February 4, 2026 16:34
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

👍 All image files/references (if any) are in webp format, in line with our policy.

@LukasWallrich
Copy link
Contributor

LukasWallrich commented Feb 4, 2026

Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-02-06 13:44:09 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

@LukasWallrich
Copy link
Contributor

@richarddushime is this good to go?

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

✅ Spell Check Passed

No spelling issues found in this PR! 🎉

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

Labels

cicd Relevant to GitHub workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cite us: include current FReD citation

3 participants