From edc99cbb4a5770315f06bb1c39fbff96a60e4643 Mon Sep 17 00:00:00 2001 From: Sergey Sova Date: Sat, 31 Aug 2024 14:39:35 +0400 Subject: [PATCH] fix(doc): operators link list --- documentation/astro.config.mjs | 5 ----- documentation/src/pages/operators/index.astro | 18 +++++++++--------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/documentation/astro.config.mjs b/documentation/astro.config.mjs index f8f91161..d73b68f0 100644 --- a/documentation/astro.config.mjs +++ b/documentation/astro.config.mjs @@ -22,11 +22,6 @@ export default defineConfig({ discord: 'https://discord.gg/yHcMcuRWeC', youtube: 'https://youtube.com/@effectorjs', }, - defaultLocale: 'en', - locales: { - root: { label: 'English', lang: 'en' }, - // 'ru-RU': { label: 'Russian' }, - }, sidebar: [ { label: 'Guides', diff --git a/documentation/src/pages/operators/index.astro b/documentation/src/pages/operators/index.astro index 80ca4aba..bd6ebacd 100644 --- a/documentation/src/pages/operators/index.astro +++ b/documentation/src/pages/operators/index.astro @@ -1,19 +1,19 @@ --- -import { getCollection } from "astro:content"; -import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; -import { LinkCard, CardGrid } from "@astrojs/starlight/components"; -import { groupBy } from "../../lib/group-by"; -import { capitalize } from "../../lib/string"; +import { getCollection } from 'astro:content'; +import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; +import { LinkCard, CardGrid } from '@astrojs/starlight/components'; +import { groupBy } from '../../lib/group-by'; +import { capitalize } from '../../lib/string'; -const list = await getCollection("operators"); +const list = await getCollection('operators'); const groups = groupBy( list.map((i) => ({ ...i, ...i.data })), - "group", + 'group', ).sort((a, b) => a.group.localeCompare(b.group)); --- - + { groups.map((group) => (
@@ -24,7 +24,7 @@ const groups = groupBy( .map((operator) => ( ))}