Skip to content

Render README preview directly under README header on repo root view#112

Merged
rg4444 merged 1 commit into
mainfrom
codex/add-readme-preview-below-header-div
Feb 14, 2026
Merged

Render README preview directly under README header on repo root view#112
rg4444 merged 1 commit into
mainfrom
codex/add-readme-preview-below-header-div

Conversation

@rg4444
Copy link
Copy Markdown
Contributor

@rg4444 rg4444 commented Feb 14, 2026

Motivation

  • Improve the repository default (root) file-list view UX by showing the rendered README preview immediately below the README header (the title + edit button) instead of inside the generic table flow.
  • Reuse existing markup rendering styles so README preview appearance matches other rendered markup files.

Description

  • Added a conditional block in templates/repo/view_file.tmpl that, when .ReadmeInList and .IsMarkup are true, outputs the rendered README HTML directly below the header using the existing file-view markup {{.MarkupType}} wrapper and {{.FileContent}} for content.
  • Preserved the original table/segment rendering for all other cases by keeping the previous content in the else branch so non-README or non-markup behavior is unchanged.
  • Change touches only the repository file view template to alter placement of the README preview in the root listing.

Testing

  • Ran go test ./modules/markup/... and the markup-related tests completed successfully.
  • Attempted a Playwright-based visual screenshot to validate placement but the headless Chromium process crashed in this environment, so no screenshot artifact was produced.

Codex Task

@rg4444 rg4444 merged commit 73ed69a into main Feb 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant