-
Notifications
You must be signed in to change notification settings - Fork 266
Creating a PR: Building and previewing documents
You can build the understanding and technique documents locally.
The main spec is done separately (with Respec), this is only for the informative docs.
See https://github.com/w3c/wcag/tree/main/11ty#usage for full instructions on installation and running.
The short version:
- Install Node.js (preferably v20, the current LTS)
- Run
npm i
in the root of the repository - Run
npm start
for a local development server, ornpm run build
to generate all files under_site
This build process is now superseded by the Eleventy process above.
There are two methods of installing the appropriate software:
Firsly install Java.
Then install Apache Ant and make sure it works. Help page for MacOS
E.g. typing at the command-line:
# ant -version
Should show version info.
From the base WCAG directory (the one containing build.xml) type "ant -projecthelp" to get a list of commands you can run. E.g., ant understanding
generates the Understanding, and ant techniques
generates the Techniques. It will generate them into the "output" directory, plus some intermediate files a few other places.
You can type ant clean
to remove stray build files. It will overwrite a couple files from the repository; normally you shouldn't commit, instead type git reset --hard
after ant clean
.
That should cover most of what you might need to do with the generator.
If you have a PR for understanding or technique document, the best way to create a preview is:
-
Copy the branch name from the PR.
-
Go the main code page, and use the branch name to filter to the branch you need.
-
Navigated through the code files to find the correct file. E.g. Understanding > 2.2 > dragging-movements.html
-
Copy the URL of that page.
-
Go to https://raw.githack.com/ and put the URL into the top box.
-
Copy the URL from the "Use this URL for development" box.
-
Use that URL for the preview.