Symfony frontend website for w3.org
Please report any issues to the w3c-website repo.
This document is a summary of what you need to know when working on this project. Please also read the more detailed project documentation
Live:
- https://www.w3.org
- https://www.w3.org/_build_summary.json (very brief summary of latest deployment)
Used to test new functionality / changes. Access to development is restricted by IP address.
The project uses Deployer to perform deployment.
Please note this project uses a local instance of Deployer (installed via Composer), as opposed to a global version of Deployer.
To run deployments please use:
vendor/bin/dep deploy <environment>
To deploy a specific branch use
vendor/bin/dep deploy <environment> --branch=<branch_name>
E.g.
vendor/bin/dep deploy development --branch=feature/my-branch-name
To connect to the server directly at the correct path for an environments current release, run the following from the root of the project
vendor/bin/dep ssh <environment>
The HTML templates are stored in w3c-website-templates-bundle
These can be updated by deploying changes to the design system
and running composer update
in this project.
You can also test changes either by deploying a branch to the staging environment for the design system, or by testing a development branch on the frontend website.
w These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
More on the Git workflow for this project.
- PHP 8.1+
- Composer
- Symfony CLI
git clone [email protected]:w3c/website-frontend.git
composer install
Note: If you already have this project installed locally and you're having trouble seeing any changes, make sure you have cleared your Symfony cache using the bin/console cache:clear
command.
Create a local env file:
touch .env.local
And set:
- APP_ENV (dev, staging, prod)
- APP_URL
- CRAFTCMS_API_URL
- CRAFTCMS_API_READ_TOKEN
- CRAFTCMS_API_PUBLISH_TOKEN
You can find your API Read and Publish tokens by going to the Craft CMS dashboard (see the Craft repo).
You can check what env files are being loaded in your environment by running php bin/console debug:dotenv
Before running the below command, please ensure you have the Symfony CLI installed
Once you have the Symfony CLI installed (or you have ensured you already have it installed), you can run the frontend application locally at http://localhost:8000/ by running
symfony server:start
In your terminal
Note: A good way to test if something will break if you deploy it to live is to switch your local env’s CraftCMS API URL and Read and Publish tokens to the production CMS (Please be careful about any changes you make in the Production CMS as they will be visible on the live site)
- Symfony
- Craft CMS API
- Strata Frontend
- W3C Design System (used as a Symfony template bundle)