Skip to content

refactor(content): extract content to dedicated repository - #324

Merged
babblebey merged 14 commits into
mainfrom
content-migrate
Nov 20, 2026
Merged

babblebey merged 14 commits into
mainfrom
content-migrate

Conversation

@babblebey

@babblebey babblebey commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Description

This pull request makes major improvements to how content is managed, indexed, and contributed to the jargons.dev platform. It restructures the documentation and environment configuration to reflect the move to a dedicated content repository, and significantly refactors the vector store update workflow for reliability and maintainability. Additionally, it introduces new code quality checks and updates code identifiers for clarity.

Content Management and Contribution Process:

  • Updated documentation (README.md, CONTRIBUTING.md) to clarify that all content (dictionary entries and learning resources) is now maintained in the separate jargonsdev/content repository, with the Jargons Editor and direct contributions both targeting that repo. The application repository is now focused on the website and platform code.
  • Changed .env.example to reference the new content repository for content collections and editor pull requests.

Vector Store Update Workflow Refactor:

  • Overhauled .github/workflows/update-vector-store.yml to:
    • Use a deployment manifest to reliably determine the deployed content SHA and source, ensuring only the correct content is indexed.
    • Track the last indexed content SHA using a repository variable, enabling incremental indexing and robust change detection (including handling of additions, deletions, renames, and content divergence).
    • Remove label-based gating in favor of manifest-based verification, and improve error handling and reporting throughout the workflow.
    • Add concurrency controls and correct permissions for GitHub Actions.

Developer Experience and Code Quality:

  • Added an actionlint job to the code quality workflow to lint GitHub Actions, catching workflow errors early.
  • Updated code identifier from PROJECT_REPO_DETAILS to CONTENT_REPO_DETAILS in constants.js for clarity and alignment with new content structure.

How we load Content from the Remote Repository

The content repository following jargonsdev/content#1 is the source of truth for jargons.dev learning content. Before Astro starts, dev/sync-content.js fetches the configured repository so the app can load dictionary entries through Astro’s content layer.

The sync runs automatically before npm run dev, npm run start, and npm run build. To run it manually:

node --env-file-if-exists=.env `sync-content.js`

On the first run, the script shallow-clones the configured branch into .content/. On later runs, it checks that the directory is the expected Git checkout and has no local changes, fetches the configured branch, and updates to its latest commit. It stops if the repository configuration is missing or invalid, the checkout has local changes, or the repository does not contain dictionary/.

Astro loads MDX entries from .content/dictionary/. The sync also writes public/content-revision.json with the repository, branch, and full commit SHA used for the build. This lets deployments and downstream automation identify the exact content revision they contain.

The .content/ checkout and generated revision manifest are build artifacts; so they have been added to git-ignored and should neither be directly edited nor committed. Content changes will hence be made in the content repository and merged through its normal contribution process.

A deployment hook will be configured on the content repository which triggers a vercel build and redeployment to fetch/build new content when a content change is pushed to the content repository. This was selected as preferred option having considered using action, in order to avoid adding the workflow scope to the OAuth app required to contribute via the Jargons Editor; this is because when whenever action files are modified the workflow permission is needed to simply sync forks remotely.

Related Issue

Screenshots/Screencasts

NA

Notes to Reviewer

  • BREAKING BEHAVIOUR for development and build. Drop the Environment Variable PUBLIC_PROJECT_REPO and PUBLIC_PROJECT_REPO_BRANCH_REF replacing it with the new ones below
    PUBLIC_CONTENT_REPO="<user>/content" # Should point to the remote content repo
    PUBLIC_CONTENT_REPO_BRANCH_REF="refs/heads/main" # the content repo default branch ref
  • Configure new webhook on content repository for push events with vercel deployment hook

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
jargons-dev Ready Ready Preview Nov 20, 2026 2:14pm UTC

@babblebey
babblebey merged commit 99b3a99 into main Nov 20, 2026
7 checks passed
@babblebey
babblebey deleted the content-migrate branch November 20, 2026 15:44

This branch was successfully deployed

1 active deployment
Preview — d01fe05a Deployed Nov 20, 2026 by vercel[bot]
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