Local builds of your Pelican-template website

Once your infrastructure-pelican site is deployed to GitHub, you can easily edit it locally in a clone of the GitHub repo, and test your changes locally (on OSX or Linux) before uploading them to GitHub. Once you upload the changes, the CI/CD system will automatically use them to update the project website (depending on your configuration, the update will go either to a staging area or to the live site).

Note: the tool mentioned below may work on WSL or cygwin, but will not work under native Windows.

Preparation

Make sure you have installed:

  • cmake
  • python3 or greater
  • pip3

Download the automatic build tool, and run it, providing the name of your GitHub website repo.

Example:

./local-pelican-website.sh infrastructure-website

Once the process has completed, you should be able to see the rendered site by opening a web browser to http://localhost:8000/.

Use

After you have done local edits on the source files for the website, you can test them locally by running the script again as above.

When you are satisfied that your edits are correct, merge them into the online repository with a pull request. That will trigger an update to the staging or live locations, depending on how you have configured the .asf.yaml file.

Copyright 2024, The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
Apache® and the Apache feather logo are trademarks of The Apache Software Foundation...