This repository hosts the code for https://docs.phcode.dev/ . Please contribute to this repo for helping the Phoenix/Brackets community.
CC BY License Copyright (c) 2022-present, core.ai
This website is built using Docusaurus 2, a modern static website generator.
$ npm install
$ npm run start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
$ npm run build
This command generates static content into the build directory and can be
served using any static contents hosting service.
Both npm run build and npm run buildLocal finish with npm run verify:links.
This JavaScript check scans the generated HTML for links to missing pages,
downloads, images, scripts, video files, captions, canonical pages, and redirect
destinations. It includes full https://docs.phcode.dev/... URLs and prints the
source HTML file and broken link before failing the build. Both CI workflows
run it through the build command, so a failure stops deployment.
The check uses the build files without contacting the live site. It checks
destination paths; Docusaurus and the tutorial checks handle section anchors.
External site availability and temporary server errors still need live monitoring.
Run npm run test:links to test the checker. After a direct
npm run docusaurus -- build, run npm run verify:links separately.
Before adding or changing a video, read the video contributor notes for the recording, article, watch-page, and metadata workflow.
Run these checks before releasing tutorial or blog-media changes. They use JavaScript and
require Node.js, Git, and the dependencies installed by npm ci.
npm run test:tutorials npm run package:tutorials npm run build npm run verify:tutorials
The checks cover tutorial links and anchors, image descriptions, video metadata
and captions, AI documentation indexes, and the contents of both practice ZIPs.
npm run build refreshes the API documentation from its source repository. If
the API files are already generated locally, npm run docusaurus -- build builds
the current checkout without refreshing them.
To preview the built site, run:
npm run serve -- --port 8208
The production workflow in .github/workflows/gh-pages-deploy.yml deploys reviewed
changes pushed to prod. It runs the tutorial checks before publishing to
gh-pages. Deployments run one at a time.
Video first-publication dates are assigned automatically during a deployment
build. The workflow restores tutorials/video-publications.json from the
previous deployment, assigns dates to new videos, and includes the resulting
manifest in the published site. Later releases preserve those original dates.
Local preview builds leave unpublished dates unset; no manual edit to the guide
is needed before release.
Keep tutorials/video-publications.json when restoring or moving the published
site. If an already published video has lost its recorded date, deployment stops
until the original date is restored. An unavailable deployment history also
stops the release. The final verify:tutorials -- --release check requires each
video's page metadata to match its saved publication date.