Run the site locally
Running in a Docker container
Install Docker Compose.
Build the Docker image:
docker-compose buildRun the built image:
docker-compose upVerify that the website is working. Open your web browser and type
http://localhost:8888in the navigation bar. This opens a local instance of the website, you can now make changes in the documentation and those changes will immediately show up in the browser after you save.Hit Ctrl + C to stop the container.
To remove the produced images run:
docker-compose rmRunning Natively
Prerequisites
- python3
- hugo (EXTENDED VERSION)
- pip
- git 1.8.5 or later
- npm v6.14.5
- node v14.3.0
- netlify cli
- netlify account
Setup
Clone the repository
git clone https://github.com/tektoncd/website && cd websiteInstall the required node modules
npm installInstall the dependencies for the sync script
python3 -m venv .venv source .venv/bin/activate pip3 install -r requirements.txtRun the sync script
./sync/sync.pyServe the website locally
netlify devVerify that the website is working
Open your web browser and type
http://localhost:8888in the navigation bar. This opens a local instance of the website, you can now make changes in the documentation and those changes will immediately show up in the browser after you save.
The sync.py script clones the required repositories to a local cache folder, by default sync/.cache.
You can modify content and create commits in your local cache to test changes to the original docs.
To force and update of the local cache, use ./sync/sync.py --update-cache.