Maintaining the Magazine Theme
The Magazine theme is maintained in a Pagure repository. If you want to submit a change, start by forking and/or cloning this repository. This page does not cover git workflow; consult git documentation for more information, or ask the Magazine staff for help.
Testing your changes
The build.sh
and 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, run 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 build.sh
and preview.sh
commands the next time because everything will need to be re-downloaded and re-installed.
Tagging the theme
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
.
Releasing the theme
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
The resulting fedoramagazine-theme-1.03.zip
is a release of the theme.
Installing the updated 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.
Want to help? Learn how to contribute to Fedora Docs ›