Skip to content

Commit bc1a422

Browse files
committed
docs: improve the download links in the docs
1 parent fd22f82 commit bc1a422

File tree

6 files changed

+723
-104
lines changed

6 files changed

+723
-104
lines changed

.github/scripts/create-versioned-mkdocs-config.sh

Lines changed: 23 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,13 @@
22

33
VERSION="${1:-latest}"
44

5-
# Function to generate download links for a specific version
6-
generate_download_links() {
7-
local version="$1"
8-
# Remove 'v' prefix from version for artifact names
9-
local version_no_v="${version#v}"
10-
11-
if [ "$version" = "latest" ]; then
12-
cat << EOF
13-
!!! info "Development Version"
14-
This is the latest development version of the documentation. For stable releases, please check the version selector above.
15-
16-
[📋 View all releases](https://github.com/mvach/ctRestClient/releases)
17-
EOF
18-
else
19-
cat << EOF
20-
!!! success "Release ${version}"
21-
This documentation is for release version ${version}.
22-
23-
## Downloads for ${version}
24-
25-
The following binaries are available for this version:
5+
# Remove 'v' prefix from version for artifact names
6+
VERSION_NO_V="${VERSION#v}"
267

27-
| Platform | Architecture | Download Link |
28-
|----------|--------------|---------------|
29-
| 🐧 Linux | x86_64 | [ctRestClient_${version_no_v}_linux_x86_64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/${version}/ctRestClient_${version_no_v}_linux_x86_64.tar.gz) |
30-
| 🍎 macOS | Intel (x86_64) | [ctRestClient_${version_no_v}_darwin_x86_64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/${version}/ctRestClient_${version_no_v}_darwin_x86_64.tar.gz) |
31-
| 🍎 macOS | Apple Silicon (ARM64) | [ctRestClient_${version_no_v}_darwin_arm64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/${version}/ctRestClient_${version_no_v}_darwin_arm64.tar.gz) |
32-
| 🪟 Windows | x86_64 | [ctRestClient_${version_no_v}_windows_x86_64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/${version}/ctRestClient_${version_no_v}_windows_x86_64.tar.gz) |
33-
34-
[📋 View all release assets](https://github.com/mvach/ctRestClient/releases/tag/${version})
35-
EOF
36-
fi
37-
}
8+
echo "Processing documentation for version: $VERSION"
389

3910
# Create mkdocs.yml file with version-specific content
11+
echo "Creating mkdocs.yml for version: $VERSION..."
4012
cat > mkdocs.yml << EOF
4113
site_name: ctRestClient
4214
site_description: Documentation for ctRestClient
@@ -47,13 +19,13 @@ theme:
4719
primary: indigo
4820
accent: indigo
4921
features:
50-
- navigation.tabs # This moves the navigation to the top as tabs
51-
- navigation.tabs.sticky # Makes the tabs sticky at the top
52-
- navigation.sections # Renders sections as groups in the sidebar
53-
- navigation.expand # Expands all collapsible sections
54-
- toc.follow # Automatically follows the table of contents on the right
55-
- content.code.copy # Add copy button to code blocks
56-
- navigation.top # Add back to top button
22+
- navigation.tabs
23+
- navigation.tabs.sticky
24+
- navigation.sections
25+
- navigation.expand
26+
- toc.follow
27+
- content.code.copy
28+
- navigation.top
5729
use_directory_urls: true
5830
plugins:
5931
- search
@@ -62,8 +34,8 @@ markdown_extensions:
6234
- pymdownx.details
6335
- pymdownx.superfences
6436
- pymdownx.emoji:
65-
emoji_index: !!python/name:materialx.emoji.twemoji
66-
emoji_generator: !!python/name:materialx.emoji.to_svg
37+
emoji_index: !!python/name:material.extensions.emoji.twemoji
38+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
6739
- toc:
6840
permalink: true
6941
nav:
@@ -75,35 +47,19 @@ extra:
7547
default: latest
7648
EOF
7749

78-
# Prepare documentation files with version-specific content
79-
# Create a temporary docs directory for processing
50+
# Process template files (*.md.tmp) to create versioned documentation
8051
if [ -d "docs" ]; then
81-
# Create version info to prepend to documentation files
82-
VERSION_INFO="$(generate_download_links "$VERSION")"
83-
84-
# Process German manual
85-
if [ -f "docs/manual-de.md" ]; then
86-
{
87-
echo "# ctRestClient - Benutzerhandbuch"
88-
echo ""
89-
echo "$VERSION_INFO"
90-
echo ""
91-
# Skip the first line (title) from original file and add the rest
92-
tail -n +2 "docs/manual-de.md"
93-
} > "docs/manual-de.md.tmp" && mv "docs/manual-de.md.tmp" "docs/manual-de.md"
52+
# Process German manual template
53+
if [ -f "docs/manual-de.md.tmp" ]; then
54+
echo "Processing docs/manual-de.md.tmp -> docs/manual-de.md..."
55+
sed -e "s/\${version}/$VERSION/g" -e "s/\${version_no_v}/$VERSION_NO_V/g" "docs/manual-de.md.tmp" > "docs/manual-de.md"
9456
fi
9557

96-
# Process English manual
97-
if [ -f "docs/manual-en.md" ]; then
98-
{
99-
echo "# ctRestClient - User Manual"
100-
echo ""
101-
echo "$VERSION_INFO"
102-
echo ""
103-
# Skip the first line (title) from original file and add the rest
104-
tail -n +2 "docs/manual-en.md"
105-
} > "docs/manual-en.md.tmp" && mv "docs/manual-en.md.tmp" "docs/manual-en.md"
58+
# Process English manual template
59+
if [ -f "docs/manual-en.md.tmp" ]; then
60+
echo "Processing docs/manual-en.md.tmp -> docs/manual-en.md..."
61+
sed -e "s/\${version}/$VERSION/g" -e "s/\${version_no_v}/$VERSION_NO_V/g" "docs/manual-en.md.tmp" > "docs/manual-en.md"
10662
fi
10763
fi
10864

109-
echo "MkDocs configuration created for version: $VERSION"
65+
echo "Template variables replaced successfully for version: $VERSION"

docs/manual-de.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# ctRestClient - Benutzerhandbuch
22

3-
!!! info "Development Version"
4-
This is the latest development version of the documentation. For stable releases, please check the version selector above.
5-
6-
[📋 View all releases](https://github.com/mvach/ctRestClient/releases)
7-
8-
93
## Überblick
104

115
`ctRestClient` ist ein Kommandozeilen-Tool, das den Export von Gruppen aus [ChurchTools](https://church.tools/de/home/) als CSV-Dateien ermöglicht. Dies ist besonders nützlich für die Erstellung von Serienbriefen mit Tools wie Microsoft Word oder Adobe InDesign.
@@ -43,10 +37,15 @@
4337
### 1. Executable herunterladen
4438

4539
Laden Sie die entsprechende Version für Ihr Betriebssystem herunter:
46-
- **Windows**: `ctRestClient-windows-amd64.exe`
47-
- **macOS (Intel)**: `ctRestClient-darwin-amd64`
48-
- **macOS (Apple Silicon)**: `ctRestClient-darwin-arm64`
49-
- **Linux**: `ctRestClient-linux-amd64`
40+
41+
| Plattform | Architektur | Download Link |
42+
|-----------|-------------|---------------|
43+
| 🐧 Linux | x86_64 | [ctRestClient_latest_linux_x86_64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/latest/ctRestClient_latest_linux_x86_64.tar.gz) |
44+
| 🍎 macOS | Intel (x86_64) | [ctRestClient_latest_darwin_x86_64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/latest/ctRestClient_latest_darwin_x86_64.tar.gz) |
45+
| 🍎 macOS | Apple Silicon (ARM64) | [ctRestClient_latest_darwin_arm64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/latest/ctRestClient_latest_darwin_arm64.tar.gz) |
46+
| 🪟 Windows | x86_64 | [ctRestClient_latest_windows_x86_64.tar.gz](https://github.com/mvach/ctRestClient/releases/download/latest/ctRestClient_latest_windows_x86_64.tar.gz) |
47+
48+
[📋 Alle Releases anzeigen](https://github.com/mvach/ctRestClient/releases/tag/latest)
5049

5150
### 2. KeePass-Datenbank einrichten
5251

0 commit comments

Comments
 (0)