You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add docs and some more functionality for generate get-almalinux
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+83-4Lines changed: 83 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,9 @@ For smaller contributions, follow this workflow:
46
46
47
47
After review and approval, the changes will be merged into the `main` branch and deployed to the live site.
48
48
49
-
####For Developers
49
+
### For Developers
50
50
51
-
#####Local Development
51
+
#### Local Development
52
52
53
53
To set up a local development environment, you need the following installed:
54
54
@@ -58,7 +58,7 @@ Run `hugo server` to start a near-production local development instance.
58
58
59
59
Localization is important! Please include proper localization formatting in your PR. After formatting, run `find_missing_i18n_strings.py` and `setup-pages-for-supported-languages.py`, then commit the changes. If you encounter issues with these scripts, please open an [issue](https://github.com/AlmaLinux/almalinux.org/issues) with details.
60
60
61
-
#####Container Development
61
+
#### Container Development
62
62
63
63
To use a container-based development environment, install Docker and use an editor supporting the devcontainer standard. Details can be found in the [README](.devcontainer/README.md).
64
64
@@ -69,10 +69,89 @@ To use a container-based development environment, install Docker and use an edit
69
69
-`/i18n/` — Localization and translation files
70
70
-`/static/` — Static files
71
71
-`/content/` — Markdown content for site pages
72
+
-`/data/` — Source data, currently only for the "Get AlmaLinux" page
72
73
-`config.yaml` — Hugo configuration
73
74
-`find_missing_i18n_strings.py` — Detects untranslated strings in `i18n/en.json`
74
75
-`setup-pages-for-supported-languages.py` — Creates placeholder markdown pages for missing languages
75
76
77
+
#### Updating 'Get AlmaLinux' page
78
+
79
+
The "Get AlmaLinux" page is dynamically generated using structured data and Hugo partial templates. This section explains how the data flows, which files are involved, and how to update the page for new releases or changes.
80
+
81
+
**How it works:**
82
+
83
+
-**Data sources:**
84
+
-`data/get_almalinux_spec.yaml`: Defines available AlmaLinux versions, supported architectures, and the configuration for
85
+
each section (e.g., ISO, Cloud, Container).
86
+
-`data/get_almalinux_checksums.yaml`: Contains, for each version, the current highest point release (`fullVersion`) and the
87
+
checksums for all artifacts (ISOs and cloud images) per architecture. This file can (and probably will) be generated.
88
+
89
+
-**Generation script:**
90
+
- The script `tools/generate_get_almalinux_checksums.py` reads `data/get_almalinux_spec.yaml`, queries
91
+
the CHECKSUM URLs defined for ISO and Cloud images, extracts the checksums and the current minor release
92
+
and produces `data/get_almalinux_checksums.yaml`.
93
+
- The script `tools/generate_get_almalinux_yaml.py` reads both YAML files, merges their data, and produces `data/get_almalinux.yaml`. This merged file is used by the Hugo partials to render the page.
94
+
-`data/get_almalinux.yaml` is **not** tracked in git. It is generated automatically by the GitHub CI workflow during site builds, but you must run the script manually for local development if you change the source YAML files.
95
+
96
+
-**Templates:**
97
+
- Hugo partials in `layouts/partials/get-almalinux/` render the page:
98
+
-`tabs.html`: Renders version tabs and architecture dropdowns.
99
+
-`tab-content.html`: Generates the content for each tab panel.
100
+
-`arch-sections.html`: Generates the page for each version+architecture combination.
101
+
-`section-*.html`: Renders each section (ISO, Cloud, Container, etc.) that makes up a full page.
102
+
103
+
##### Editing for a New Point Release
104
+
105
+
**In most cases, you only need to update `get_almalinux_checksums.yaml` when a new point release is available.**
106
+
107
+
1. Run the checksum generation script to update `get_almalinux_checksums.yaml` by looking at the source repos:
108
+
```bash
109
+
python3 tools/generate_get_almalinux_checksums.py
110
+
```
111
+
2. Optionally, run the generation script to see your changes locally:
112
+
```bash
113
+
python3 tools/generate_get_almalinux_yaml.py
114
+
```
115
+
This updates `data/get_almalinux.yaml` for use by Hugo.
116
+
This will be done automatically by the Gitlab CI scripts during deployment.
117
+
3. Commit the resulting changes to `data/get_almalinux_checksums.yaml` and open a PR.
118
+
119
+
##### Editing Sections, Architectures, or URL Patterns
120
+
121
+
If you need to change which sections or architectures are shown, or adjust how URLs are generated, edit `data/get_almalinux_spec.yaml`:
122
+
123
+
- The YAML file contains a `common` block, which sets default configuration for each section. These defaults are merged with per-version overrides in the `versions` array.
124
+
- Each version entry includes:
125
+
-`id`: The major version (e.g., `10`, `10-kitten`).
126
+
-`label`: The tab title.
127
+
-`arches`: List of supported architectures (becomes dropdowns in the page).
128
+
-`sections`: List of sections to configure for that version.
129
+
- Each section (such as `iso` or `cloud`) can inherit from `common` but may be overridden per version or architecture.
130
+
- A section may have its own `arches` array to restrict it to certain architectures. For example, if cloud images for AlmaLinux 10 on `ppc64le` are not supported, the `cloud` section's `arches` array should exclude `ppc64le`.
131
+
- To remove a section entirely for a version, omit it from the version's `sections` list.
132
+
- To remove a specific cloud image within the `cloud` section, define it with no content (see the `oci` section in 10-kitten as an example).
133
+
134
+
##### URL Patterns and Variables
135
+
136
+
Most sections define URL templates for artifacts, using variables such as:
137
+
138
+
-`major`: The major version, from `id` (e.g., `10`, `10-kitten`).
139
+
-`full`: The full version, from `fullVersion` in `get_almalinux_checksums.yaml` (e.g., `10.1`). If `fullVersion` is not set, it falls back to `id`.
140
+
-`arch`: The architecture (e.g., `x86_64`, `x86_64_v2`).
141
+
142
+
Some URLs may allow other variables (like `variant`), or require different patterns per architecture (e.g., `vagrant`'s `registryUrls`). For advanced options, consult the code in `tools/generate_get_almalinux_yaml.py`.
143
+
144
+
##### Summary of Workflow
145
+
146
+
1. Edit `get_almalinux_checksums.yaml` for new point releases, or `get_almalinux_spec.yaml` for section/architecture changes.
147
+
2. Run the generation script to update the merged YAML:
148
+
```bash
149
+
python3 tools/generate_get_almalinux_yaml.py
150
+
```
151
+
3. Start or restart the Hugo server to see your changes locally.
152
+
153
+
If you have questions about advanced configuration or variable support, refer to the script or open an issue for help.
154
+
76
155
### Localization and Translation
77
156
78
157
AlmaLinux.org translations are managed on [Weblate](https://hosted.weblate.org/engage/almalinux/). To contribute, join the [AlmaLinux project](https://hosted.weblate.org/projects/almalinux/) on Weblate. Submissions through Weblate generate automated PRs to this repo, which are reviewed and merged by the Marketing SIG or another team lead.
@@ -83,7 +162,7 @@ To request a new language, open an issue in [GitHub issues](https://github.com/A
0 commit comments