From 8c3c09dc0331e4ebe86b8a0c6cdf3a04d891adbe Mon Sep 17 00:00:00 2001 From: darken Date: Fri, 20 Jun 2025 08:53:28 +0200 Subject: [PATCH] feat: Enhance Jekyll config and add auto-generated changelog page This commit updates the Jekyll configuration to include `jekyll-github-metadata` and `jemoji` plugins. It also introduces a `CHANGELOG.md` file that automatically generates a formatted changelog page from GitHub releases. The default changelog text for new app versions in Fastlane has also been updated to be more engaging and directly link to the new changelog page. --- CHANGELOG.md | 81 +++++++++++++++++++ _config.yml | 3 + .../android/en-US/changelogs/default.txt | 8 +- 3 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..c7e9b2c0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,81 @@ +--- +layout: plain +permalink: /changelog +title: "Changelog" +--- + +# Changelog for CAPod + +{% for release in site.github.releases %} + +## {{ release.tag_name }} - {{ release.published_at | date: "%B %d, %Y" }} + +{% assign clean_body = release.body | strip %} +{% assign no_comments = clean_body | replace: "" %} +{% if no_comments.size > 1 %} +{% assign clean_content = no_comments[1] | strip %} +{% else %} +{% assign clean_content = no_comments[0] | strip %} +{% endif %} + +{% comment %} Make links clickable {% endcomment %} +{% assign lines = clean_content | split: " +" %} +{% assign processed_lines = "" %} +{% for line in lines %} +{% if line contains "**Full Changelog**:" %} +{% comment %} Handle Full Changelog links {% endcomment %} +{% assign parts = line | split: ": " %} +{% if parts.size > 1 %} +{% assign url = parts[1] | strip %} +{% assign clickable_line = "**[View Changes](" | append: url | append: ")**" %} +{% assign processed_lines = processed_lines | append: clickable_line | append: " +" %} +{% else %} +{% assign processed_lines = processed_lines | append: line | append: " +" %} +{% endif %} +{% elsif line contains " in https://github.com/" and line contains "/pull/" %} +{% comment %} Handle pull request links {% endcomment %} +{% assign pr_parts = line | split: " in https://github.com/" %} +{% if pr_parts.size > 1 %} +{% assign before_url = pr_parts[0] %} +{% assign after_url = pr_parts[1] %} +{% assign url = "https://github.com/" | append: after_url %} +{% assign pr_number = after_url | split: "/pull/" %} +{% if pr_number.size > 1 %} +{% assign pr_num = pr_number[1] | split: " " | first %} +{% assign clickable_line = before_url | append: " in [#" | append: pr_num | append: "](" | append: url | append: ")" %} +{% assign processed_lines = processed_lines | append: clickable_line | append: " +" %} +{% else %} +{% assign processed_lines = processed_lines | append: line | append: " +" %} +{% endif %} +{% else %} +{% assign processed_lines = processed_lines | append: line | append: " +" %} +{% endif %} +{% else %} +{% assign processed_lines = processed_lines | append: line | append: " +" %} +{% endif %} +{% endfor %} + +{% comment %} Check if there are any bullet points (actual release notes) {% endcomment %} +{% if processed_lines contains "## " or processed_lines contains "- " %} +{% assign spaced_content = processed_lines | replace: " + +- ", " + +- " %} + {{ spaced_content | markdownify }} + {% else %} + *No release notes available.* + + {{ processed_lines | markdownify }} + {% endif %} + +--- +{% endfor %} \ No newline at end of file diff --git a/_config.yml b/_config.yml index c06e629b..74cc9d0f 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,9 @@ theme: minima plugins: - jekyll-relative-links + - jekyll-github-metadata + - jemoji + relative_links: enabled: true collections: true diff --git a/fastlane/metadata/android/en-US/changelogs/default.txt b/fastlane/metadata/android/en-US/changelogs/default.txt index 02bac681..b7e4702c 100644 --- a/fastlane/metadata/android/en-US/changelogs/default.txt +++ b/fastlane/metadata/android/en-US/changelogs/default.txt @@ -1,5 +1,5 @@ -Updates contain bugfixes, performance improvements and maybe new features. -A detailed changelog is always available on GitHub. +🐛 Bug fixes, 🚀 performance boosts, maybe even ✨ new features. -FYI: It’s just me here, sometimes replies might take a bit. Sorry for that! -¯\_(ツ)_/¯ \ No newline at end of file +Changelog: https://capod.darken.eu/changelog + +FYI: It’s just me here — thanks for understanding if replies take a bit. ¯\_(ツ)_/¯