Currently, ansible-role-wp copies theme files directly to server nodes. The files copied take css, images and js assets remotely from www.c.o. This model restricts blog.c.o redesign to www.c.o redesign. www.c.o css, images and js assets are already functional for blog.c.o to use however they are not ready to be published in www.c.o, yet.
I would like to discuss the idea of having a wordpress-theme-centos repository to produce a versioned theme artifact in zip format, and update ansible-role-wp to install the specified archived version produced by wordpress-theme-centos in the theme directory of server nodes. Whenever a new version need to be install, the archive version number is updated in ansible-role-wp, and the wordpress user interface used to switch from one version to another. In this model, wordpress themes are accumulated in the theme directory so it might be possible to use them as backup as well.
There is a PR already available in ansible-role-wp, describing these changes along with some screenshots related to blog.c.o theme redesign.
Metadata Update from @arrfab: - Issue assigned to arrfab
Metadata Update from @arrfab: - Issue tagged with: centos-common-infra, feature-request, high-gain, medium-trouble
Ansible applied it and it was manually set to new theme on staging instance : https://blog.stg.centos.org/
Is that looking as you wanted ? One thing though, it seems that it's unarchiving with name+version :
drwxr-xr-x. 4 root root 4096 Aug 6 12:54 wordpress-theme-centos-1.0.16
So if I understand correctly, that would mean that a new version bump would just unarchive to a new directory ? wondering about how wordpress metadata parser for themes would find same name for theme but through different directories. I see that it detects the theme version too but it's not displayed in the theme selector easily (just a thought)
Metadata Update from @arrfab: - Issue priority set to: Waiting on Reporter (was: Needs Review)
The menu on the right doesn't look exactly as expected. Some styles seems to be missing there. Here is an example of how it looks on my local workstation (Wordpress 6.5.5):
<img alt="Screenshot_from_2024-08-07_09-18-46.png" src="/centos-infra/issue/raw/files/5a07d124c7e428136cc22a57d762472f9ba818d0ffa0c3003d417de207dad3d2-Screenshot_from_2024-08-07_09-18-46.png" />
Other than that it looks good to me.
Yes. Theme metadata is defined in the style.css file inside the theme directory. It shouldn't produce any conflict to have the same value in the Theme Name field as long as the directory that holds the theme is unique. Here is Wordpress 6.5.5 theme manager presenting two example versions (1.0.17 and 1.0.18) with the same name under different directories:
Theme Name
<img alt="Screenshot_2024-08-07_at_09-40-12_Themes_Blog_WordPress.png" src="/centos-infra/issue/raw/files/75ed02ebaab1ae7ca6672f72d2352bfe9d4e27942b33f320441480b32a98c919-Screenshot_2024-08-07_at_09-40-12_Themes_Blog_WordPress.png" />
and in themes filesystem:
egrep -i '(name|version)' wordpress-theme-centos-1.0.1*/style.css wordpress-theme-centos-1.0.17/style.css:Theme Name: wordpress-theme-centos wordpress-theme-centos-1.0.17/style.css:Version: v1.0.17 wordpress-theme-centos-1.0.18/style.css:Theme Name: wordpress-theme-centos wordpress-theme-centos-1.0.18/style.css:Version: v1.0.18
I am not sure if ansible.builtin.unarchive allows us to remove old files from a directory structure based on the new archive content. Also, wondering about the possibilities of testing new theme versions using wordpress theme preview feature if we apply changes directly to the same directory.
it's running wordpress 6.6.1. Let me know when you want to test another release somehow and then we you want me to update real https://blog.centos.org with that theme
As work was done for .stg. , can we just close this request ?
Yes. Let's close it. We tested the approach successfully and can open a new one for updates. Thanks @arrfab !
Metadata Update from @arrfab: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.