Skip to content

feat(projects): overview rendering + View on GitHub button + optional assets/build-step - #38

Merged
baladithyab merged 2 commits into
mainfrom
feat/project-overview-and-build-step
May 28, 2026
Merged

baladithyab merged 2 commits into
mainfrom
feat/project-overview-and-build-step

Conversation

@baladithyab

Copy link
Copy Markdown
Owner

Summary

Three changes to /projects/[slug]:

  1. 'View on GitHub' button prominently in the header (was a small sidebar link)
  2. README rendering as an Overview section (request-time fetch from raw.githubusercontent.com, edge-cached, marked-rendered)
  3. Build-step support in the reusable workflow — manifests can declare build.script + build.aptPackages

Plus schema relaxation to support overview-only projects (no live demo, just a portfolio page).

Companion change

web-embed-workflows#3 (next PR) extends the reusable workflow with apt-install + build-script steps.

Tests

178 / 178 (was 163). +12 overview-lib tests, +3 schema-update tests.
🤖 Generated with the help of Claude

…al assets/build-step

Adds three things visitors asked for:

1. **'View on GitHub' button** prominently in the header of every
   project page. Was a small text link in the sidebar; now a real
   button with the GitHub octocat icon.

2. **Project overview** rendered above the embed (or in place of it
   for projects without a live demo). Pulled from the source repo's
   README.md (or whatever path 'overview.path' declares) at request
   time, rendered with marked, edge-cached for 5 minutes. Failure is
   non-fatal — broken README → inline notice + repo link.

3. **Build-step support** for the reusable workflow. Manifests can
   now declare 'build.script' (transforms source → upload-ready) and
   'build.aptPackages' (declarative apt install before the script).
   Use cases: optimize media (ffmpeg), compile WASM (emcc/cargo),
   convert notebooks to HTML (jupyter nbconvert), run TypeScript
   build, etc.

Schema breaking changes:
- 'assets' is now optional (was 'min(1)'). Empty assets renders an
  overview-only page. Tests updated.
- 'delivery' and 'build' are optional iff 'assets' is empty.
- 'overview' is a new optional manifest field; defaults to
  README.md / skipFirstHeading=true.

The normalized shape always sets overview to a NormalizedOverview
even when omitted, so UI code never has to check.

178 / 178 tests passing (was 163; +12 overview lib + +3 schema).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10c7509381

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

</a>
</header>
{overviewResult.ok ? (
<Fragment set:html={overviewResult.html} />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Sanitize README HTML before injection

When a discovered repo's README contains raw HTML, this injects it directly into the project page. The discovery job searches all public repos by topic:codeseys-embed (src/scripts/sync-project-manifests.ts builds the query without an owner filter), so a third-party repo with a valid manifest can supply README HTML such as event handlers/scripts that will execute on this site; sanitize or disable raw HTML before passing it to set:html.

Useful? React with 👍 / 👎.

Comment on lines +227 to +228
delivery: Delivery.optional(),
build: Build.optional(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require delivery metadata when assets exist

Making delivery and build independently optional lets a v2 manifest with non-empty assets but no delivery pass validation and get written into the content collection. In that scenario hasDemo is true, but the detail page gates ProjectViewer on entry.delivery, so the declared playable assets silently disappear instead of the manifest being rejected; add a refinement that only allows missing delivery/build when assets is omitted or empty.

Useful? React with 👍 / 👎.

@baladithyab
baladithyab merged commit e652cff into main May 28, 2026
3 checks passed
@baladithyab
baladithyab deleted the feat/project-overview-and-build-step branch May 28, 2026 04:38
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed

URL: https://1f0a88fd-codeseys-personal-website.codeseys.workers.dev
Commit: 49f01ca72647b163be54e359d4db3217a86662fd
Worker version: uploaded but not promoted (production at codeseys.io is unchanged)

Updated on every push to this PR.

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.

1 participant