Commands
goodfellow dev, build, preview, index, update, due, nightly, content, blocks and import, and serving a site from a subfolder.
| Command | What it does |
|---|---|
goodfellow dev |
Serves the site, rendering each page from the files on disk, plus the admin panel at /admin, which saves to those files |
goodfellow build |
Writes one HTML file per page that's shown at the time (see Scheduled publishing) to dist/, builds the CSS and copies public/. Also writes sitemap.xml (without pages hidden from search engines), robots.txt and feeds of dated collections if the site's address is set, the admin panel if the config has a backend or demo, the JavaScript for Client Components, calendar files and month pages for collections of events, lists' later pages and pages for each choice, a page at each redirect's old address and _redirects for Cloudflare Pages, a copy of the site's Google Fonts in fonts/google/, which its pages load in place of Google's, plugins' admin frames, and what their build steps write, the content API in api/ unless the config turns it off, a search index if a page has a Search block, and goodfellow-build.json, which says what the site was built from and when what it shows by today's date next changes, for the nightly check. For a site in a subfolder, it says where search engines look for robots.txt (see Sites in a subfolder) |
goodfellow preview |
Serves dist/ the way a host would, including the "Page not found" page |
goodfellow index |
Writes the search index for a site built another way |
goodfellow update |
Updates Goodfellow, and blocks from its registry, if the site still builds with the update (see Keeping a site up to date) |
goodfellow due [--since <time>] |
Says whether a scheduled page or item has been shown or hidden since --since (an ISO time; the last hour without one), so the site needs building again. On GitHub Actions it also sets the step's due output to true or false, which the starters' hourly check reads; --output <file> adds it to a file instead, for a CI setup that reads it in its shell. It's also due the first check after the live site's goodfellow-build.json says what it shows by today's date changes |
goodfellow nightly [--mode <mode>] [--output <file>] |
Says whether tonight's build is needed: when the site has changed since the live site was built, something it shows by today's date has, or an update is available, reading the live site's goodfellow-build.json. --mode (or GOODFELLOW_NIGHTLY) is changed, the default, always or off. On GitHub Actions it sets the step's build and update outputs, or adds them to --output; see Rebuilding overnight |
goodfellow task [--out <file>] |
Runs one of a plugin's tasks for the admin panel, as the starters' task workflow and job do: the request comes in GOODFELLOW_TASK_REQUEST, GOODFELLOW_TASK_PLUGIN, GOODFELLOW_TASK_NAME, GOODFELLOW_TASK_INPUT and GOODFELLOW_TASK_KEY, and the answer, sealed to the request's key, goes to --out (default: goodfellow-task-result.json), even when the task fails. Secrets come from the environment and from GOODFELLOW_SECRETS, a JSON object, and the task gets only those its plugin declared |
goodfellow content link [folder] |
For a site whose content is in a repository of its own: links content/ and public/media/ to it, in folder (default: content-repository), so goodfellow dev reads and saves its files |
goodfellow content copy [folder] |
Copies them from it instead, as builds do |
goodfellow broker add [folder] --host <host> |
Writes the site's token broker's repository into folder (default: beside the site's, named after it with -signin), for github-pages (with --domain), gitlab-pages, cloudflare-pages or vercel |
goodfellow broker use <address> |
Signs editors in at the token broker from then on, once the site has rebuilt; goodfellow broker remove stops it |
goodfellow admin add <address> |
Names the admin panel's address of its own, such as admin.example.org, in goodfellow.config.tsx, for sites whose config the admin panel can't publish, such as those whose content is in a repository of its own |
goodfellow admin check |
Once the site has rebuilt with it, checks that the site's pages at the admin address leave it before running anything, then marks it checked, from which the admin panel opens only there; goodfellow admin remove stops using it |
goodfellow blocks add <item> |
Installs a shadcn registry item (button, @acme/hero, or an item's address) with shadcn's own CLI and makes a block of its component, with fields from its props, then typechecks and renders it and lists what it couldn't do (see Any shadcn component as a block). With --registry <folder>, writes the block into a block registry there instead; with --native <folder>, also makes its version for the Expo app in that folder, with shadcn-tamagui-codemod. Needs TypeScript 7 in the site |
goodfellow import wordpress <file or address> |
Brings a WordPress site's pages, posts, categories, tags, menus and media into the site, from its export file or its address (see Move from WordPress). --dry-run says what would come across and changes nothing |
goodfellow export wordpress [file] |
Writes the site as a WordPress export file, at file or in a file named after the site, which WordPress imports with Tools → Import → WordPress (see Move from WordPress) |
Next.js sites have the same update, due, nightly, task, content, blocks, admin, import and export commands as goodfellow-next update, goodfellow-next due, goodfellow-next nightly, goodfellow-next task, goodfellow-next content, goodfellow-next blocks, goodfellow-next admin, goodfellow-next import and goodfellow-next export, and goodfellow-next broker use and remove.
Options: --root <dir>, --out <dir>, --port <port>, --base <path>, for import, --dry-run, and for blocks add, --registry <folder> and --native <folder>.
Site checks
goodfellow build ends with what the site checks find, the same ones the admin panel runs when publishing: links to pages, items and media the site doesn't have are errors, and pages without a title or description, and theme colors text is hard to read on, are warnings. On GitHub Actions each also shows as an annotation on its file. They don't stop the build, so a link broken outside the admin panel, such as by deleting a file in the repository, never takes the site down; goodfellow build --strict fails the build when there are errors, for checking changes made in code before they're merged.
It then checks every built page for accessibility problems: the ones the admin panel warns about (images without a description, headings that skip a level, and links that don't say where they go), and the rules of axe-core, the checker browsers' developer tools use, each explained in plain words, such as a form field without a label or a frame without a title. Problems in the header and footer are listed once, not for every page. Automated checks find only some accessibility problems, so a build with none doesn't mean the site is accessible: try it with a keyboard and a screen reader too. Contrast is checked on the theme's colors, not on built pages, since that needs a browser.
Next.js sites get the checks of built pages from goodfellow-next finish; the checks of content files don't run in next build yet.
goodfellow dev uses port 4321, or the next free one if another program has it, and goodfellow preview uses 4322. Each prints its address when it starts.
Serving from a subfolder
Some hosts serve a site from a subfolder, such as /my-repo/ on GitHub Pages. The base path comes from --base, then the GOODFELLOW_BASE environment variable, then base in goodfellow.config.tsx. Every root-relative link and image in the built pages is adjusted to match, including links inside formatted and Markdown text.
The site's address (Site Settings → General) should be the full public address, subfolder included.