From 9b83b5459870aa843e69887e7b6aabe9e5e39e5f Mon Sep 17 00:00:00 2001 From: psy <psy@darmstadt.ccc.de> Date: Sun, 23 Jul 2023 18:45:21 +0200 Subject: [PATCH] add rss feed --- .gitlab-ci.yml | 4 ++++ mkdocs.yml | 9 ++++++++- requirements.txt | 1 + theme_customization/main.html | 7 +++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 requirements.txt create mode 100644 theme_customization/main.html diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b57e83..3c39ab5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,10 @@ image: registry.git.cccv.de/infra/static-pages/docker-images/bullseye-mkdocs variables: GIT_SUBMODULE_STRATEGY: recursive +before_script: + - pip install -r requirements.txt + + pages: stage: deploy script: diff --git a/mkdocs.yml b/mkdocs.yml index ccea98d..71c21e1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,6 @@ site_name: Chaos Communication Camp 2023 site_description: Infos, news, links and more +site_url: https://events.ccc.de/camp/2023/infos/ site_dir: public use_directory_urls: false strict: true @@ -10,6 +11,7 @@ extra_css: theme: site_favicon: img/favicon_200px.png name: readthedocs + custom_dir: theme_customization prev_next_buttons_location: none highlightjs: false logo: img/logo.svg @@ -27,11 +29,16 @@ theme: #navigation_depth: 2 #nav_style: primary - markdown_extensions: - extra - admonition +plugins: + - rss: + image: https://events.ccc.de/camp/2023/infos/img/favicon.ico + abstract_chars_count: -1 # -1 for full content + feed_ttl: 10 + nav: - index.md - location.md diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7a7fb2b --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +mkdocs-rss-plugin diff --git a/theme_customization/main.html b/theme_customization/main.html new file mode 100644 index 0000000..960a195 --- /dev/null +++ b/theme_customization/main.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block extrahead %} + <!-- RSS Feed --> + <link rel="alternate" type="application/rss+xml" title="RSS feed of created content" href="{{ config.site_url }}feed_rss_created.xml"> + <link rel="alternate" type="application/rss+xml" title="RSS feed of updated content" href="{{ config.site_url }}feed_rss_updated.xml"> +{% endblock %} \ No newline at end of file -- GitLab