Maintaining the Magazine Theme
Vagrantfile lets you deploy a test system to try out your work before you deploy. Ensure you are in the cloned repository in the same directory as the
Vagrantfile, and run the command
vagrant up to create and provision the box. This will take some time.
When done, you can point your local browser at http://localhost:5055 to see the theme in action on a test site. The Vagrant box accesses the contents of the repo directly, so you can edit changes in the repository and quickly see them in action. To iterate on changes, after modifying the theme, run
vagrant ssh — systemctl reload httpd so the Vagrant box’s web caching is cleared. Then reload on your browser to see the modifications at work.
When finished, run
vagrant halt to stop the Vagrant box, or
vagrant destroy to remove it from your system entirely.
Once the theme modifications are complete, you should make a release. This means that anyone can return to this iteration of the theme in case of a problem with a future version.
The last commit in your changes should be updating the
fedoramagazine/styles.css file to update the
version in the header:
Theme Name: Fedora Magazine 2018 Text Domain: fmag2018 Theme URI: http://pagure.org/fedoramagazine-theme/ Version: 1.03 Description: The theme for the Fedora Magazine. This iteration first rolled out in March 2018
(For theme committers:) Apply a tag to this commit to mark it for release, such as
v1.03, and push the tag to the repo using
git push --tags.
While in the repo, run these commands to make a zip file in which to deliver the theme. Remember to use the correct, new version number in place of 1.03 below.
$ ln -s fedoramagazine fedoramagazine-1.03 $ zip -r /tmp/fedoramagazine-theme-1.03.zip fedoramagazine-1.03 $ rm -f fedoramagazine-1.03
fedoramagazine-theme-1.03.zip is a release of the theme.
This step must be done by someone with "administrator" rights in the Fedora Magazine WordPress site.
Use the built-in functions to add a new theme. Upload the resulting
fedoramagazine-theme-1.03.zip file and activate it.
If you need to switch themes and get confused about which theme is correct, the theme details will show you the version number.