Skip to content

Commit c9b43da

Browse files
committed
Merge branch 'restructuring2.0_fix' into dsf.dev_restructuring_2.0
2 parents 924ad24 + b060a4d commit c9b43da

File tree

71 files changed

+1779
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1779
-182
lines changed

docs/src/.vuepress/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export default defineClientConfig({
88
layouts: {
99
ParentLayout,
1010
Layout,
11-
NotFound: NotFoundLayout
11+
NotFound: NotFoundLayout,
1212
},
1313
})
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<script setup lang="ts">
2+
import { computed } from "vue";
3+
import { useArticles } from "vuepress-theme-hope/composables/blog/useArticles";
4+
5+
type ArticleInfo = {
6+
title: string;
7+
path: string;
8+
date?: Date;
9+
excerpt?: string;
10+
category?: string[];
11+
tag?: string[];
12+
sticky?: boolean;
13+
cover?: string;
14+
isEncrypted?: boolean;
15+
};
16+
17+
const props = defineProps<{ count?: number }>();
18+
const displayCount = computed(() => props.count ?? 5);
19+
20+
const articlesMap = useArticles();
21+
22+
23+
const sortedArticles = computed(() => {
24+
const allArticles: ArticleInfo[] = Object.values(articlesMap.value).flat();
25+
26+
return allArticles
27+
.filter((a) => a.date) // optional
28+
.sort((a, b) => new Date(b.date!).getTime() - new Date(a.date!).getTime());
29+
});
30+
</script>
31+
32+
<template>
33+
<div class="news-list">
34+
<h2> Latest News</h2>
35+
<p v-if="sortedArticles.length === 0"> No articles found.</p>
36+
<ul>
37+
<li v-for="article in sortedArticles.slice(0, displayCount)" :key="article.path">
38+
<RouterLink :to="article.path">
39+
{{ article.title }} — {{ article.date?.toLocaleDateString?.() }}
40+
</RouterLink>
41+
</li>
42+
</ul>
43+
</div>
44+
</template>
45+

docs/src/.vuepress/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export default defineUserConfig({
2727
description: "",
2828
},
2929
},*/
30-
plugins: [ ],
30+
plugins: [
31+
32+
],
3133

3234
// Enable it with pwa
3335
shouldPrefetch: false,

docs/src/.vuepress/layouts/NotFoundLayout.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,21 @@ redirectToParentDirectoryIfInOperations();
2929
3030
});*/
3131
32+
33+
function goBack() {
34+
router.go(-1);
35+
}
36+
37+
function goHome() {
38+
router.push('/');
39+
}
40+
3241
</script>
3342

3443
<template>
3544
<ParentLayout>
3645
<template #default>
37-
<div class="not-found-hint"><p class="error-code">404</p><h1 class="error-title">Page not found</h1><p class="error-hint">That’s a Four-Oh-Four.</p></div><div class="actions"><button type="button" class="action-button">Go back</button><button type="button" class="action-button">Take me home</button></div>
46+
<div class="not-found-hint"><p class="error-code">404</p><h1 class="error-title">Page not found</h1><p class="error-hint">That’s a Four-Oh-Four.</p></div><div class="actions"><button type="button" class="action-button" @click="goBack">Go back</button><button type="button" class="action-button" @click="goHome">Take me home</button></div>
3847
</template>
3948
</ParentLayout>
4049
</template>
4.49 MB
Binary file not shown.
635 KB
Binary file not shown.
270 KB
Loading
554 KB
Loading
2.22 MB
Loading
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#!/bin/bash
2+
# To run: chmod +x fetch-versioned-release-notes.sh && ./fetch-versioned-release-notes.sh
3+
# Dokumentation https://wiki.gecko.hs-heilbronn.de/doc/dokumentation-release-notes-script-45Ex3hoxjB
4+
5+
# GitHub repository details
6+
REPO_OWNER="datasharingframework"
7+
REPO_NAME="dsf"
8+
9+
# Output base directory (this will hold the versioned folders)
10+
OUTPUT_BASE_DIR="../../operations"
11+
12+
# Define the range of versions
13+
VERSIONS=("v1.0.0" "v1.1.0" "v1.2.0" "v1.3.0" "v1.3.1" "v1.3.2" "v1.4.0" "v1.5.0" "v1.5.1" "v1.5.2" "v1.6.0" "v1.7.0" "v1.7.1" "v1.8.0")
14+
15+
# Fetch all release details
16+
echo "Fetching all releases..."
17+
RELEASES=$(curl -s https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases)
18+
19+
# Loop through each version in the version list
20+
for VERSION in "${VERSIONS[@]}"; do
21+
VERSION_FOUND=$(echo "$RELEASES" | jq -r ".[] | select(.tag_name == \"$VERSION\")")
22+
23+
if [ ! -z "$VERSION_FOUND" ]; then
24+
VERSION_DIR="$OUTPUT_BASE_DIR/$VERSION"
25+
26+
if [ ! -d "$VERSION_DIR" ]; then
27+
echo "Directory $VERSION_DIR does not exist. Skipping $VERSION."
28+
continue
29+
fi
30+
31+
OUTPUT_FILE="$VERSION_DIR/release-notes.md"
32+
33+
34+
# Write frontmatter at the top of the Markdown file
35+
cat <<EOF > "$OUTPUT_FILE"
36+
---
37+
title: Release Notes ($VERSION)
38+
icon: note
39+
---
40+
41+
## [Release Notes for $VERSION](https://github.com/$REPO_OWNER/$REPO_NAME/releases/tag/$VERSION)
42+
43+
::: tip Release Notes
44+
You can access all release notes on our [GitHub](https://github.com/datasharingframework/dsf/releases).
45+
:::
46+
47+
EOF
48+
49+
echo "$RELEASES" | jq -r ".[] | select(.tag_name == \"$VERSION\") | @base64" | while read -r RELEASE; do
50+
RELEASE_JSON=$(echo "$RELEASE" | base64 --decode)
51+
RELEASE_BODY=$(echo "$RELEASE_JSON" | jq -r '.body')
52+
RELEASE_NAME=$(echo "$RELEASE_JSON" | jq -r '.name')
53+
54+
# Convert #issue_number to GitHub issue link
55+
RELEASE_BODY=$(echo "$RELEASE_BODY" | sed -E 's/#([0-9]+)/[#\1](https:\/\/github.com\/datasharingframework\/dsf\/issues\/\1)/g')
56+
57+
# Convert @username to GitHub user link
58+
RELEASE_BODY=$(echo "$RELEASE_BODY" | sed -E 's/@([a-zA-Z0-9_-]+)/[@\1](https:\/\/github.com\/\1)/g')
59+
60+
61+
echo "### $RELEASE_NAME" >> "$OUTPUT_FILE"
62+
echo "$RELEASE_BODY" >> "$OUTPUT_FILE"
63+
64+
echo "" >> "$OUTPUT_FILE"
65+
done
66+
67+
echo "Release notes for version $VERSION saved to $OUTPUT_FILE"
68+
else
69+
echo "No release found for version $VERSION"
70+
fi
71+
done
72+
73+
echo "Process completed."

0 commit comments

Comments
 (0)