Skip to content

feat(www): show board instructions from armbian.github.io on board pages - #70

Open
HeyMeco wants to merge 1 commit into
armbian:mainfrom
HeyMeco:feat/board-instructions-from-repo
Open

HeyMeco wants to merge 1 commit into
armbian:mainfrom
HeyMeco:feat/board-instructions-from-repo

Conversation

@HeyMeco

@HeyMeco HeyMeco commented Nov 25, 2026

Copy link
Copy Markdown
Member

Closes #67

Board pages now show the install instructions maintained in armbian.github.io/board-instructions instead of relying only on the CMS flash guide.

armbian-images.json already publishes a board_instructions URL per board (e.g. https://cache.armbian.com/board-instructions/rock-5b.md); the site was ignoring it.

Changes

  • schemas / api — parse board_instructions from the upstream feed and expose it on the board detail as instructions_url.
  • www
    • New lib/board-instructions.ts fetches the Markdown (only from cache.armbian.com, 5 s timeout, 1 h revalidate), renders it with marked, and runs it through the existing sanitizeCmsHtml. Any failure just omits the section.
    • sanitizeCmsHtml gains an opt-in externalLinksInNewTab option (target="_blank" rel="noopener noreferrer" on http(s) links).
    • The board page renders the instructions inline as a How to flash section after the downloads, with a GitHub link to the source file. The sidebar "How to flash" entry now scrolls to it.
    • The CMS flash guide modal is kept as a fallback for boards without repository instructions.
  • Adds marked@18.1.3 to @armbian/www.

No new translation keys — reuses board.flash_guide and board.github.

Screenshot

Board page with How to flash section

The screenshot was taken before a follow-up tweak that hides the backticks Tailwind Typography adds around inline code.

Testing

  • pnpm typecheck passes for all workspaces.
  • Rendered khadas-vim3.md from the CDN through the pipeline; <script>, javascript: links and event handlers are stripped.
  • Off-CDN URLs and missing files return no section.
  • Checked locally with ./manage.sh up (screenshot above). After deploying, run ./manage.sh sync if the API was started from a disk cache that predates instructions_url.

Board pages now render the Markdown install instructions published from
armbian/armbian.github.io/board-instructions (board_instructions in
armbian-images.json) instead of relying only on the CMS flash guide.

- schemas/api: carry board_instructions through as instructions_url
- www: fetch from cache.armbian.com (1h revalidate), render with marked,
  sanitize, and show inline as a "How to flash" section with a link to
  the source file on GitHub
- the CMS flash guide modal remains as a fallback for boards without
  repository instructions

Closes armbian#67
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fbf49412-e351-4852-8929-f420e9c29928
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Board_instructions are not being used

1 participant