From f3438baa9a20a0bf6b91b5326c498355b3edef38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 3 Mar 2026 17:51:56 +0100 Subject: [PATCH] Enable four MiniBlog articles as preview --- docs/.vuepress/components/MiniBlog.vue | 23 ++++++++++++++++++----- docs/de/README.md | 1 + docs/en/README.md | 1 + docs/es/README.md | 1 + docs/fr/README.md | 1 + 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/docs/.vuepress/components/MiniBlog.vue b/docs/.vuepress/components/MiniBlog.vue index 6972b1c..09bc2e0 100644 --- a/docs/.vuepress/components/MiniBlog.vue +++ b/docs/.vuepress/components/MiniBlog.vue @@ -56,16 +56,29 @@ const locale = useRouteLocale() const lang = usePageLang().value || 'de-DE' // Ref, e.g. "de-DE" or "en-US" const props = defineProps({ - title: { type: String}, - readMoreLinkTitle: { type: String}, - showAllPostsButtonTitle: { type: String}, + title: { + type: String, + required: true + }, + readMoreLinkTitle: { + type: String, + required: true + }, + showAllPostsButtonTitle: { + type: String, + required: true + }, + topArticlesCount: { + type: Number, + required: true + }, }); -// Nur Artikel des aktuellen Locales + Top 3 +// Nur Artikel des aktuellen Locales + Top X const items = computed(() => { const loc = locale.value || "/"; const list = (articles || []).filter(a => a.locale === loc); - return list.slice(0, 3); + return list.slice(0, props.topArticlesCount); }); const articleIndex = computed(() => diff --git a/docs/de/README.md b/docs/de/README.md index 5a082e0..eafb31c 100644 --- a/docs/de/README.md +++ b/docs/de/README.md @@ -291,6 +291,7 @@ XXX --> :title="'Neueste Beiträge'" :readMoreLinkTitle="'Weiterlesen'" :show-all-posts-button-title="'Alle Beiträge ansehen'" + :topArticlesCount="4" />

Spenden

diff --git a/docs/en/README.md b/docs/en/README.md index 4c1298e..147213f 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -292,6 +292,7 @@ XXX --> :title="'Latest posts'" :readMoreLinkTitle="'Read more'" :show-all-posts-button-title="'Show all posts'" + :topArticlesCount="4" />

Donate

diff --git a/docs/es/README.md b/docs/es/README.md index a9def17..960969f 100644 --- a/docs/es/README.md +++ b/docs/es/README.md @@ -260,6 +260,7 @@ XXX --> :title="'Últimas publicaciones'" :readMoreLinkTitle="'Seguir leyendo'" :show-all-posts-button-title="'Mostrar todas las publicaciones'" + :topArticlesCount="4" />

Donar

diff --git a/docs/fr/README.md b/docs/fr/README.md index c69e828..88fb01e 100644 --- a/docs/fr/README.md +++ b/docs/fr/README.md @@ -292,6 +292,7 @@ XXX --> :title="'Derniers articles'" :readMoreLinkTitle="'Continuer la lecture'" :show-all-posts-button-title="'Afficher tous les messages'" + :topArticlesCount="4" />

Faire un don