diff --git a/astro.config.mjs b/astro.config.mjs index 7a63da7..34f2ba7 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,6 +2,7 @@ import {defineConfig} from 'astro/config'; import starlight from '@astrojs/starlight'; import lunaria from '@lunariajs/starlight'; import matomo from 'astro-matomo'; +import starlightCoolerCredit from 'starlight-cooler-credit'; const locales = { root: { @@ -28,6 +29,21 @@ export default defineConfig({ }, plugins: [ lunaria(), + starlightCoolerCredit({ + customImage: './public/img/premium/premium_logo.png', + customImageAlt: 'Mr. Robøt Premium Logo', + credit: { + title: { + fr: "Obtenez Mr. Robøt Premium", + en: "Get Mr. Robøt Premium", + }, + href: "https://mrrobot.app/premium", + description: { + fr: "Débloquez des fonctionnalités exclusives avec un filtre anti-insultes avancées !", + en: "Unlock exclusive features with an advanced swear filter!", + }, + }, + }), ], components: { Header: "./src/components/Header.astro", @@ -122,7 +138,7 @@ export default defineConfig({ locales, social: { github: 'https://github.com/mrrobotdotapp/docs.mrrobot.app', - twitter: 'https://twitter.com/MrRobotApp', + blueSky: 'https://bsky.app/profile/mrrobot.app', discord: 'https://mrrobot.app/discord', }, sidebar: [ @@ -161,6 +177,15 @@ export default defineConfig({ }, autogenerate: {directory: 'mod'}, }, + { + label: 'Premium', + badge: { text: 'NOUVEAU', variant: 'tip' }, + translations: { + en: 'Premium', + }, + + autogenerate: {directory: 'premium'}, + }, { label: 'Liens utiles', collapsed: true, @@ -268,5 +293,6 @@ export default defineConfig({ redirects: { '/logs': '/configuration/logs', '/beta': '/getting-started/beta/', + '/premium': '/premium/introduction/', } }); diff --git a/lunaria.config.json b/lunaria.config.json index 53a2497..eebbb95 100644 --- a/lunaria.config.json +++ b/lunaria.config.json @@ -2,6 +2,7 @@ "$schema": "./node_modules/@lunariajs/core/config.schema.json", "repository": { "name": "mrrobotdotapp/docs.mrrobot.app", + "rootDir": "/src/content/docs", "hosting": "github" }, "files": [ diff --git a/package.json b/package.json index 69c499d..6a847eb 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,12 @@ "astro": "astro" }, "dependencies": { - "@astrojs/starlight": "^0.31.1", - "@lunariajs/starlight": "^0.1.1", + "@astrojs/starlight": "0.32.0", + "@lunariajs/starlight": "0.1.1", "astro": "^5.1.8", "astro-matomo": "^1.7.0", - "sharp": "^0.33.5" + "sharp": "^0.33.5", + "starlight-cooler-credit": "^0.4.0" }, "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" } diff --git a/public/img/premium/premium_logo.png b/public/img/premium/premium_logo.png new file mode 100644 index 0000000..e2c6d36 Binary files /dev/null and b/public/img/premium/premium_logo.png differ diff --git a/src/components/PageSidebar.astro b/src/components/PageSidebar.astro index 7178799..1a8b638 100644 --- a/src/components/PageSidebar.astro +++ b/src/components/PageSidebar.astro @@ -1,24 +1,22 @@ --- -import type {Props} from '../props'; - import MobileTableOfContents from 'virtual:starlight/components/MobileTableOfContents'; import TableOfContents from 'virtual:starlight/components/TableOfContents'; --- { - Astro.props.toc && ( + Astro.locals.starlightRoute.toc && ( <>