From a7e1a92de5fde52d14b88ac59426dd03068d353c Mon Sep 17 00:00:00 2001 From: Aumetra Weisman Date: Wed, 31 Jul 2024 22:14:44 +0200 Subject: [PATCH] Tweak colour scheme (#566) --- website/.prettierrc.mjs | 8 +-- website/astro.config.ts | 29 ++++++----- website/package-lock.json | 49 ++++++++++++++++++- website/package.json | 1 + website/src/content/config.ts | 4 +- .../content/docs/configuration/database.mdx | 2 +- .../content/docs/configuration/instance.mdx | 2 +- .../docs/configuration/job-scheduler.mdx | 2 +- .../docs/configuration/language-detection.mdx | 2 +- .../content/docs/configuration/messaging.mdx | 2 +- .../src/content/docs/configuration/oidc.mdx | 2 +- .../content/docs/configuration/storage.mdx | 2 +- website/src/content/docs/index.mdx | 29 ++++++----- .../src/content/docs/running/installation.mdx | 2 +- .../src/content/docs/spec/http-signatures.mdx | 2 +- website/src/styles/global.scss | 30 ++++++++++++ 16 files changed, 126 insertions(+), 42 deletions(-) create mode 100644 website/src/styles/global.scss diff --git a/website/.prettierrc.mjs b/website/.prettierrc.mjs index 7e619305..6303ed9a 100644 --- a/website/.prettierrc.mjs +++ b/website/.prettierrc.mjs @@ -1,12 +1,14 @@ /** @type {import("prettier").Config} */ export default { - plugins: ["prettier-plugin-astro"], + plugins: ['prettier-plugin-astro'], overrides: [ { - files: "*.astro", + files: '*.astro', options: { - parser: "astro", + parser: 'astro', }, }, ], + + singleQuote: true, }; diff --git a/website/astro.config.ts b/website/astro.config.ts index b5fa8d17..e4466813 100644 --- a/website/astro.config.ts +++ b/website/astro.config.ts @@ -1,29 +1,32 @@ -import { defineConfig } from "astro/config"; -import starlight from "@astrojs/starlight"; +import { defineConfig } from 'astro/config'; +import starlight from '@astrojs/starlight'; +import starlightLinksValidator from 'starlight-links-validator'; // https://astro.build/config export default defineConfig({ - site: "https://joinkitsune.org", + site: 'https://joinkitsune.org', integrations: [ starlight({ - title: "Kitsune", - social: { - github: "https://github.com/kitsune-soc/kitsune", - }, + customCss: ['./src/styles/global.scss'], + plugins: [starlightLinksValidator()], sidebar: [ { - label: "Run your own", - autogenerate: { directory: "running" }, + label: 'Run your own', + autogenerate: { directory: 'running' }, }, { - label: "Configuration", - autogenerate: { directory: "configuration" }, + label: 'Configuration', + autogenerate: { directory: 'configuration' }, }, { - label: "Specification", - autogenerate: { directory: "spec" }, + label: 'Specification', + autogenerate: { directory: 'spec' }, }, ], + social: { + github: 'https://github.com/kitsune-soc/kitsune', + }, + title: 'Kitsune', }), ], }); diff --git a/website/package-lock.json b/website/package-lock.json index 6f41f7ca..957e4256 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1,17 +1,18 @@ { - "name": "kitsune-landing", + "name": "kitsune-website", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "kitsune-landing", + "name": "kitsune-website", "version": "0.0.1", "dependencies": { "@astrojs/check": "^0.8.3", "@astrojs/starlight": "^0.25.3", "astro": "^4.10.2", "sharp": "^0.32.5", + "starlight-links-validator": "^0.10.0", "typescript": "^5.5.4" }, "devDependencies": { @@ -3919,6 +3920,17 @@ "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz", "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==" }, + "node_modules/is-absolute-url": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", + "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-alphabetical": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", @@ -6663,6 +6675,39 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "node_modules/starlight-links-validator": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/starlight-links-validator/-/starlight-links-validator-0.10.0.tgz", + "integrity": "sha512-pdEEXn0KTBFPDmlLQ3O3YpUlNy6vsQnJlmu7Vv53nVZxBDF+vwZwOuJbzlDbbMRxz9nbEqBFuBWG3SCELTR9Gw==", + "dependencies": { + "github-slugger": "2.0.0", + "hast-util-from-html": "2.0.1", + "hast-util-has-property": "3.0.0", + "is-absolute-url": "4.0.1", + "kleur": "4.1.5", + "mdast-util-to-string": "4.0.0", + "picomatch": "4.0.2", + "unist-util-visit": "5.0.0" + }, + "engines": { + "node": ">=18.14.1" + }, + "peerDependencies": { + "@astrojs/starlight": ">=0.15.0", + "astro": ">=4.0.0" + } + }, + "node_modules/starlight-links-validator/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/stdin-discarder": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", diff --git a/website/package.json b/website/package.json index 737dff39..11dcf3e7 100644 --- a/website/package.json +++ b/website/package.json @@ -15,6 +15,7 @@ "@astrojs/starlight": "^0.25.3", "astro": "^4.10.2", "sharp": "^0.32.5", + "starlight-links-validator": "^0.10.0", "typescript": "^5.5.4" }, "devDependencies": { diff --git a/website/src/content/config.ts b/website/src/content/config.ts index a4eec59b..31b74762 100644 --- a/website/src/content/config.ts +++ b/website/src/content/config.ts @@ -1,5 +1,5 @@ -import { defineCollection } from "astro:content"; -import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from 'astro:content'; +import { docsSchema } from '@astrojs/starlight/schema'; export const collections = { docs: defineCollection({ schema: docsSchema() }), diff --git a/website/src/content/docs/configuration/database.mdx b/website/src/content/docs/configuration/database.mdx index 05141336..c9c5ad5b 100644 --- a/website/src/content/docs/configuration/database.mdx +++ b/website/src/content/docs/configuration/database.mdx @@ -3,7 +3,7 @@ title: Database description: Configure the database used by Kitsune --- -import { Aside } from "@astrojs/starlight/components"; +import { Aside } from '@astrojs/starlight/components'; Kitsune requires a PostgreSQL installation that it can connect to since we make usage of Postgres-specific features, such as their full-text search. diff --git a/website/src/content/docs/configuration/instance.mdx b/website/src/content/docs/configuration/instance.mdx index 4f167d38..b580c151 100644 --- a/website/src/content/docs/configuration/instance.mdx +++ b/website/src/content/docs/configuration/instance.mdx @@ -3,7 +3,7 @@ title: Instance description: Configure miscellaneous aspects of your instance --- -import { Aside } from "@astrojs/starlight/components"; +import { Aside } from '@astrojs/starlight/components'; Kitsune has a number of configurations that change how your instance works. diff --git a/website/src/content/docs/configuration/job-scheduler.mdx b/website/src/content/docs/configuration/job-scheduler.mdx index 1a23af78..8026eda9 100644 --- a/website/src/content/docs/configuration/job-scheduler.mdx +++ b/website/src/content/docs/configuration/job-scheduler.mdx @@ -3,7 +3,7 @@ title: Job Scheduler description: Configure the Job Scheduler of Kitsune --- -import { Aside } from "@astrojs/starlight/components"; +import { Aside } from '@astrojs/starlight/components'; Kitsune uses the database to store and retrieve jobs that have to be run. There are options to tune the job scheduler to your specific needs. diff --git a/website/src/content/docs/configuration/language-detection.mdx b/website/src/content/docs/configuration/language-detection.mdx index 9f462f37..c6f7d620 100644 --- a/website/src/content/docs/configuration/language-detection.mdx +++ b/website/src/content/docs/configuration/language-detection.mdx @@ -3,7 +3,7 @@ title: Language detection description: Configure the language detection of Kitsune --- -import { Aside } from "@astrojs/starlight/components"; +import { Aside } from '@astrojs/starlight/components'; In order to classify posts better, Kitsune attempts to automatically guess the language a post is written in to improve the search experience by using language-specific tokenization. diff --git a/website/src/content/docs/configuration/messaging.mdx b/website/src/content/docs/configuration/messaging.mdx index a36ea3b5..af463b94 100644 --- a/website/src/content/docs/configuration/messaging.mdx +++ b/website/src/content/docs/configuration/messaging.mdx @@ -3,7 +3,7 @@ title: Messaging description: Configure the internal messaging channels used by Kitsune --- -import { Aside } from "@astrojs/starlight/components"; +import { Aside } from '@astrojs/starlight/components';