|
||
---|---|---|
plugins/borg-rss-code | ||
themes | ||
.gitignore | ||
.gitmodules | ||
deploy-filter.txt | ||
deploy.sh | ||
package-lock.json | ||
package.json | ||
README.md |
blender.org WordPress Theme
'bthree' is the WordPress theme of blender.org's main website. We invite web developers to help and provide fixes.
Reporting issues and pull requests are welcome in the project page.
Installation
- Install WordPress locally (use
blender.local
as URL) - Delete the
wp-content
folder git clone
this repository as awp-content
foldercd wp-content
git submodule init
git submodule update
npm install
to install dependencies.npm run copy
to copy fonts and icons from assets_shared into the assets folder.npm run build
to finally build all stylesheets and javascript.
Development
Run npm start
in the root of the repo, this will to open blender.local:3000
in your browser and refresh automatically on changes.
Required Plugins
Installation Notes
Docker
If you choose to install WordPress via Docker, the volumes
section is needed to override wp-config.php
and the entire wp-content
folder.
Example docker-compose.yaml
:
wordpress:
image: wordpress
container_name: wordpress
restart: always
ports:
- 8080:80
volumes:
- /home/<local_install_path>/wordpress/wp-content:/var/www/html/wp-content
- /home/<local_install_path>/wordpress/wp-config.php:/var/www/html/wp-config.php
Remember to set the user:group (so you can e.g. update plugins):
docker exec -ti wordpress bash
chown -R www-data:www-data /var/www
Apache
If you choose to install WordPress using Apache, you might want to check these settings:
- Enable short_code (in php.ini) - this allows code to run with "<?" as well as <?php". The template and plugins use both formats.
- Enable "rewrite_module" or "mod_rewrite" - this allow the links to work since the permalink format is different than the default.
Production Deploy
The deploy.sh
script is designed to automate the deployment process of blender.org and code.blender.org, with an option for a dry run to simulate the deployment. It ensures that deployments are made from the production
branch and allows merging changes from the main
branch into production
.
Usage Instructions
- Perform a dry run:
Make sure you're on themain
branch. Before executing the actual deployment, it's recommended to perform a dry run to simulate the deployment process without making actual changes to either theproduction
branch or the server.
./deploy.sh --dry-run blender.org
or
./deploy.sh --dry-run code.blender.org
The dry run will simulate merging from main
to production
and check what file changes are going to be deployed if the deployment host is correctly specified, without making changes.
- Checkout
production
:
If the result of dry run looks correct, checkout theproduction
branch.
git checkout production
- Run the script:
To perform an actual deployment, run the command without the--dry-run
flag.
./deploy.sh blender.org
or
./deploy.sh code.blender.org
The script provides basic error handling if anything doesn't work as expected.