The pages project includes all the client-sided code (js/css) and configuration to run pages.adobe.com on helix.
The public website is up and running on:
The "inner CDN" or helix origin is at:
https://main--pages--adobe.hlx3.page/
First ensure that you have a somewhat recent version of NPM and Node.
Check your NPM version:
npm -v
Check your Node version:
node -v
If you can't run these commands, install NPM and Node.
If you need to update your existing NPM:
npm install -g npm@latest
If you need to update your existing version of Node, use NVM:
nvm install node
If you don't have NVM, install it with these instructions.
Some scripts depend on ES modules, if you encounter errors when running them, update Node.js.
Use your fresh NPM to install the Helix client.
npm install -g @adobe/helix-cli
or sudo npm install -g @adobe/helix-cli
(if you get permission errors.)
git clone https://github.com/adobe/pages
Switch into the /pages
directory of the repository:
cd pages
Run the command to start up Helix:
hlx up
This should automatically open http://localhost:3000/
in your browser. Changes to your local Github repo will show up there.
npm run lint
Note: Linting is also performed in a pre-commit hook
npm run test
./tools/run-compare.js
and ./tools/compare/
contain a script for comparing pages between the branch you're working on and the current "source-of-truth" branch/endpoint. The output is based on enabled plugins, any/all of:
- screenshot
- lighthouse
The pages compared come from ./tools/pagelist.js
, which may be more comparisons than needed for a change and should be edited according to the use case.
npm run compare
Used for bulk pushing changes via Admin API.
glob
- for selective matching files/directories (default undefined
)
env
- environment to use, any of: "preview"
, "publish"
, "code"
(default "preview"
)
owner
- repo owner to use (default "adobe"
)
repo
- repo name to use (default "pages"
)
branch
- branch to use (default "main"
)
With a locally mounted gdrive, you can bulk preview/publish content.
npm run sync -- "/Volumes/GoogleDrive/My Drive/pages"
Note: Selective globs are preferred, this will take a long time and is unnecessary in most cases.
npm run sync -- "/Volumes/GoogleDrive/My Drive/pages" --env=publish --glob="./my/content/dir/**/*"
npm run sync -- "/path/to/this/repo/pages" --env=code --glob="./pages/blocks/myblock/**/*"