Conversation
Without this the badge current says "NOT FOUND" with a scary red/orange background. After this, the badge says "GUESTS NOT ALLOWED" with a much less scary gray background. I think that's as good as it's going to get on the Fedora matrix instance. Signed-off-by: John Eckersberg <jeckersb@redhat.com>
There was a problem hiding this comment.
Code Review
This pull request updates the index.html template to include the server_fqdn parameter in the Matrix badge URL, which likely corrects its display or linking. The reviewer suggests an improvement to extract the hardcoded values within the Matrix badge URL into config.toml variables for better maintainability and easier future updates.
| <div class="text-center" style="padding-top: 10px;"> | ||
| <a href="https://matrix.to/#/#bootc:fedoraproject.org"> | ||
| <img src="https://img.shields.io/matrix/bootc%3Afedoraproject.org?label=%23bootc%3Afedoraproject.org&style=for-the-badge&logo=matrix"> | ||
| <img src="https://img.shields.io/matrix/bootc%3Afedoraproject.org?server_fqdn=chat.fedoraproject.org&label=%23bootc%3Afedoraproject.org&style=for-the-badge&logo=matrix"> |
There was a problem hiding this comment.
While this change correctly fixes the Matrix badge, the URL contains several hardcoded values. To improve maintainability, it's recommended to extract these values into variables in your config.toml file. This makes it easier to update them in one place if they ever change.
You could add the following to your config.toml under the [extra] section:
matrix_room_id = "#bootc:fedoraproject.org"
matrix_room_alias = "bootc:fedoraproject.org"
matrix_server_fqdn = "chat.fedoraproject.org"Then, you can use these variables in the template. The suggestion below updates the <img> tag. For completeness, you should also update the <a> tag on line 18 to use config.extra.matrix_room_id.
<img src="https://img.shields.io/matrix/{{ config.extra.matrix_room_alias | default(value='bootc:fedoraproject.org') | urlencode }}?server_fqdn={{ config.extra.matrix_server_fqdn | default(value='chat.fedoraproject.org') }}&label={{ config.extra.matrix_room_id | default(value='#bootc:fedoraproject.org') | urlencode }}&style=for-the-badge&logo=matrix">

Without this the badge current says "NOT FOUND" with a scary
red/orange background.
After this, the badge says "GUESTS NOT ALLOWED" with a much less scary
gray background. I think that's as good as it's going to get on the
Fedora matrix instance.
Signed-off-by: John Eckersberg jeckersb@redhat.com