Maintaining the Magazine Theme
preview.sh scripts let you deploy WordPress in a local container
to test your work before you push your changes to the live site.
Ensure you are in the root of the cloned repository and enter
./build.sh && ./preview.sh to create and provision the container.
This will take some time.
When done, you can point your local browser at http://localhost:5055
to see the theme with your local revisions.
The container 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,
podman restart wordpress from another terminal window
so the containers’s web caching is cleared.
Then refresh your browser window (F5 or Ctrl+F5) to view the modifications.
When finished, press Ctrl+C in the original terminal window
from which you launched the container to stop the container.
Optionally, you can run
./clean.sh to remove all the contianer artifacts
except for the repo itself from your system.
If you remove all the artifacts (WordPress plugins, databases, etc.)
it will take longer to run the
preview.sh commands the
next time because everything will need to be re-downloaded and re-installed.
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.