This subdirectory contains ES Modules re-implementing pieces of the XSLT-based build process using Eleventy.
Make sure you have Node.js installed. This has primarily been tested with v20, the current LTS at time of writing.
If you use fnm or nvm to manage multiple Node.js versions,
you can switch to the recommended version by typing fnm use
or nvm use
(with no additional arguments) while in the repository directory.
Otherwise, you can download an installer from nodejs.org.
First, run npm i
in the root directory of the repository to install dependencies.
Common tasks:
npm run build
runs a one-time buildnpm start
runs a local server with hot-reloading to preview changes as you make them:
Maintenance tasks (for working with Eleventy config and supporting files under this subdirectory):
npm run check
checks for TypeScript errorsnpm run fmt
formats all TypeScript files
Usage context: publish-w3c
script only
Indicates top-level path of W3C CVS checkout, for WAI site updates (via publish-w3c
script).
Default: ../../../w3ccvs
(same as in Ant/XSLT build process)
Usage context: Local development, debugging
Prints more log messages that are typically noisy and uninteresting, but may be useful if you're not seeing what you expect in the output files.
Default: Unset (set to any non-empty value to enable)
Usage context: currently this should not be changed, pending future improvements to 21
support
Indicates WCAG version being built, in XY
format (i.e. no .
).
Influences base URLs for links to guidelines, techniques, and understanding pages.
Default: 22
Usage context: should not need to be set manually except in specific testing scenarios
Influences base URLs for links to guidelines, techniques, and understanding pages. Typically set by specific npm scripts or CI processes.
Note that setting WCAG_MODE
to any non-empty value (even one not listed below) will also result
in page footers referencing last modified times based on git, rather than the local filesystem.
Possible values:
- Unset (default) - Sets base URLs appropriate for local testing
editors
- Sets base URLs appropriate forgh-pages
publishing; used by deploy actionpublication
- Sets base URLs appropriate for WAI site publishing; used bypublish-w3c
script
Usage context: Automatically set during GitHub workflows; should not need to be set manually
Influences base URLs for links to guidelines, techniques, and understanding pages,
when WCAG_MODE=editors
is also set.
Default: w3c/wcag
- The main configuration can be found in top-level
eleventy.config.ts
- Build commands are defined in top-level
package.json
underscripts
, and can be run vianpm run <name>
- If you see files named
*.11tydata.*
, these contribute data to the Eleventy build (see Template and Directory Data files under Sources of Data)