chore: add rss generation to samples

This commit is contained in:
Evgenii Alekseev 2024-08-30 15:45:55 +03:00
parent 164b6d7956
commit cedf18ac7a
3 changed files with 32 additions and 5 deletions

View File

@ -28,8 +28,8 @@ How to report by email
sender = me@example.com sender = me@example.com
user = me@example.com user = me@example.com
How to generate index page for S3 How to generate index page
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
#. #.
Install dependencies: Install dependencies:
@ -50,7 +50,27 @@ How to generate index page for S3
path = ${repository:root}/repository/aur-clone/x86_64/index.html path = ${repository:root}/repository/aur-clone/x86_64/index.html
link_path = http://example.com/aur-clone/x86_64 link_path = http://example.com/aur-clone/x86_64
After these steps ``index.html`` file will be automatically synced to S3. Having this configuration, the generated ``index.html`` will be also automatically synced to remote services (e.g. S3).
How to generate RSS feed for index page
"""""""""""""""""""""""""""""""""""""""
In addition to previous steps, the following configuration is required:
.. code-block:: ini
[report]
target = html rss
[html]
rss_url = ${html:link_path}/rss.xml
[rss]
link_path = ${html:link_path}
path = ${repository:root}/repository/ahriman-demo/x86_64/rss.xml
rss_url = ${html:link_path}/rss.xml
With the appended configuration, the service fill also generate ``rss.xml``, link it to generated ``index.html`` and put it together.
How to post build report to telegram How to post build report to telegram
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,6 +1,7 @@
# Index # Index
1. Setup repository named `ahriman-demo` with architecture `x86_64`. 1. Setup repository named `ahriman-demo` with architecture `x86_64`.
2. Generate index page. 2. Generate index page and RSS feed.
3. Repository is available at `http://localhost:8080/repo`. 3. Repository is available at `http://localhost:8080/repo`.
4. Index page is available at `http://localhost:8080/repo/ahriman-demo/x86_64/index.html` 4. Index page is available at `http://localhost:8080/repo/ahriman-demo/x86_64/index.html`
5. Index page is available at `http://localhost:8080/repo/ahriman-demo/x86_64/rss.xml`

View File

@ -1,6 +1,12 @@
[report] [report]
target = html target = html rss
[html] [html]
path = ${repository:root}/repository/ahriman-demo/x86_64/index.html path = ${repository:root}/repository/ahriman-demo/x86_64/index.html
link_path = http://localhost:8080/repo/ahriman-demo/x86_64 link_path = http://localhost:8080/repo/ahriman-demo/x86_64
rss_url = ${html:link_path}/rss.xml
[rss]
link_path = ${html:link_path}
path = ${repository:root}/repository/ahriman-demo/x86_64/rss.xml
rss_url = ${html:link_path}/rss.xml