Blender-org
Go to file
Márton Lente edb740f42d UI: Implement JavaScript getOS function Windows platform architecture detection
Implements x86 and Arm architectures detection for the Windows platform, and
displays the Windows Arm Download button on qualifying machines. See the pull
request for details.

Pull Request: #104136
2024-11-08 12:03:38 +01:00
plugins/borg-rss-code UI: Blender-org web-assets v2 upgrade 2024-08-13 17:27:56 +02:00
themes UI: Implement JavaScript getOS function Windows platform architecture detection 2024-11-08 12:03:38 +01:00
.gitignore Ignore local debug.log 2023-06-26 15:11:09 +02:00
.gitmodules UI: Blender-org web-assets v2 upgrade 2024-08-13 17:27:56 +02:00
deploy-filter.txt Deploy: Ignore local .log files 2023-06-26 15:13:22 +02:00
deploy.sh Config: Make script deploy run as dry-run by default 2024-11-01 10:46:27 +01:00
package-lock.json Chore: Update npm packages 2024-10-31 16:21:29 +01:00
package.json Pipeline: Copy icons and fonts as separate processes 2024-02-09 17:05:55 +01:00
README.md Docs: Update readme section Production deploy 2024-11-01 11:03:02 +01:00

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

  1. Install WordPress locally (use blender.local as URL)
  2. Delete the wp-content folder
  3. git clone this repository as a wp-content folder
  4. cd wp-content
  5. git submodule init
  6. git submodule update
  7. npm install to install dependencies.
  8. npm run copy to copy fonts and icons from assets_shared into the assets folder.
  9. 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):

  1. docker exec -ti wordpress bash
  2. chown -R www-data:www-data /var/www

Apache

If you choose to install WordPress using Apache, you might want to check these settings:

  1. Enable short_code (in php.ini) - this allows code to run with "<?" as well as <?php". The template and plugins use both formats.
  2. 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

  1. Perform a dry run:
    Make sure you're on the main 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 the production branch or the server. Dry run is on by default.
./deploy.sh blender.org

or

./deploy.sh 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.

  1. Checkout production:
    If the result of dry run looks correct, checkout the production branch.
git checkout production
  1. Merge main to production:
    The deployment happens at the checked-out state of the production branch by default. If you want to deploy latest main, pass in the --merge-production flag when running the script.
./deploy.sh --merge-production blender.org

or

./deploy.sh --merge-production code.blender.org
  1. Run the script:
    To perform an actual deployment, run the command with the --live-run flag.
./deploy.sh --live-run blender.org

or

./deploy.sh --live-run code.blender.org

Optionally you can combine steps 3. and 4. in a single run.

./deploy.sh --live-run --merge-production blender.org

or

./deploy.sh --live-run --merge-production code.blender.org

The script provides basic error handling if anything doesn't work as expected.