Add Decap CMS for governance team content editing#1191
Open
hummusonrails wants to merge 1 commit into
Open
Conversation
git-backed decap cms so the governance team can edit docs through a browser without touching git. adds the branded admin ui, content collections schema mapped to the docs folders, and github oauth via vercel serverless functions. cms publishes to main through the editorial workflow. oauth client id and secret are supplied as vercel env vars (see .env.example).
|
@hummusonrails is attempting to deploy a commit to the Arbitrum Foundation Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a git-backed Decap CMS layer so the Arbitrum governance team can edit the governance docs through a browser, without touching git. This is the same CMS the governance team has been testing on a staging fork over the past several weeks and has fully approved; this PR moves it into the canonical docs repo.
CMS edits publish to
mainvia Decap's editorial workflow and deploy through the existing Vercel pipeline.What's included
static/admin/index.html— branded Decap CMS v3 entry point (loaded from CDN); injectsbase_urlfrom the current origin at runtimestatic/admin/config.yml— content schema: 5 collections mapped to thedocs/folders;repo: ArbitrumFoundation/docs,branch: main,publish_mode: editorial_workflowapi/auth.js,api/callback.js— GitHub OAuth handshake as Vercel serverless functions (the OAuth token is JSON-escaped to prevent XSS)static/img/AF_vertical_stack.png— Arbitrum Foundation logo shown on the CMS loginvercel.json— adds afunctionsblock for theapi/functions; the existing build and redirect config is unchanged.env.example,.gitignore(adds.vercel)Publish model
The governance team are prose editors, not a technical team. With
editorial_workflowandbranch: main, an editor drafts a change, marks it ready, and hits Publish, which merges the edit tomainand triggers the normal Vercel deploy. No git knowledge required on their side.Required setup before the CMS works (not in this PR)
https://docs.arbitrum.foundation, authorization callbackhttps://docs.arbitrum.foundation/api/callback.GITHUB_OAUTH_CLIENT_ID,GITHUB_OAUTH_CLIENT_SECRET.public_repo(sufficient since this repo is public). Each editor authenticates as themselves, so commits are attributed to the individual editor.Notes for reviewers
vercel.json: only thefunctionsblock was added. The build is intentionally left to the existing project configuration / framework auto-detection, so this PR does not change how the site builds. If the docs project relies on explicit build settings, adjust as needed./admin/config.ymlfetch; production is unaffected. Disable protection only if you want the CMS to work on previews too./admin/route is markednoindex.Verification (after merge + setup above)
https://docs.arbitrum.foundation/admin/loads and GitHub login succeedsmainand deploysTest plan
GITHUB_OAUTH_CLIENT_ID/GITHUB_OAUTH_CLIENT_SECRETset on the Vercel docs project/admin/loads and login works on productionmainand deploys correctly