Mirror of
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #109 from trueberryless-org/ci-format

[ci] format

authored by

trueberryless and committed by
GitHub
ff0527ff d8ca5fb3

+395 -375
+18 -18
.github/labeler.yml
··· 1 1 # See https://github.com/actions/labeler 2 2 3 - '🚨 action': 3 + "🚨 action": 4 4 - .github/workflows/** 5 - 6 - '🚧 astro': 7 - - 'starlight/astro.config.mjs' 8 - 9 - '📀 assets': 5 + 6 + "🚧 astro": 7 + - "starlight/astro.config.mjs" 8 + 9 + "📀 assets": 10 10 - starlight/src/assets/** 11 11 - starlight/public/** 12 12 13 - '📚 content': 13 + "📚 content": 14 14 - starlight/src/content/docs/** 15 - 16 - '🈳 dictionary': 15 + 16 + "🈳 dictionary": 17 17 - .github/actions/spelling/** 18 18 19 - '✒️ documentation': 20 - - '**/README.md' 21 - 22 - '🌏 i18n': 19 + "✒️ documentation": 20 + - "**/README.md" 21 + 22 + "🌏 i18n": 23 23 - starlight/src/content/docs/en/** 24 - 25 - '📦 package': 26 - - 'starlight/package.json' 27 - 28 - '🏯 styles': 24 + 25 + "📦 package": 26 + - "starlight/package.json" 27 + 28 + "🏯 styles": 29 29 - starlight/src/styles/**
+5 -5
.github/workflows/labeler.yaml
··· 1 1 name: "Pull Request Labeler" 2 2 on: 3 - - pull_request_target 3 + - pull_request_target 4 4 5 5 jobs: 6 6 triage: ··· 9 9 pull-requests: write 10 10 runs-on: ubuntu-latest 11 11 steps: 12 - - uses: actions/labeler@v4 13 - with: 14 - # repo-token: '${{ secrets.PUBLIC_GITHUB_TOKEN }}' 15 - sync-labels: true 12 + - uses: actions/labeler@v4 13 + with: 14 + # repo-token: '${{ secrets.PUBLIC_GITHUB_TOKEN }}' 15 + sync-labels: true
+90 -85
starlight/astro.config.mjs
··· 9 9 // https://astro.build/config 10 10 // https://starlight.astro.build/reference/configuration/ 11 11 export default defineConfig({ 12 - site: "https://mutanuq.trueberryless.org", 13 - integrations: [ 14 - starlight({ 15 - title: "Mutanuq", 16 - logo: { 17 - light: "./src/assets/light-logo.png", 18 - dark: "./src/assets/dark-logo.png", 19 - replacesTitle: true, 20 - }, 21 - social: { 22 - github: "https://github.com/trueberryless-org/mutanuq", 23 - patreon: "https://www.patreon.com/trueberryless", 24 - }, 25 - editLink: { 26 - baseUrl: "https://github.com/trueberryless-org/mutanuq/tree/main/starlight/", 27 - }, 28 - lastUpdated: true, 29 - defaultLocale: "de", 30 - locales: { 31 - de: { 32 - label: "Deutsch", 33 - }, 34 - en: { 35 - label: "English", 36 - }, 37 - }, 38 - tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 3 }, 39 - expressiveCode: {}, 40 - customCss: [ 41 - "./src/styles/custom.css", 42 - "./src/styles/landing.css", 43 - "./src/styles/print.css", 44 - "@fontsource-variable/jetbrains-mono/wght.css", 45 - ], 46 - components: { 47 - DownloadFile: "./src/components/DownloadFile.astro", 48 - }, 49 - sidebar: [ 50 - { 51 - label: "Informationstechnologie", 52 - collapsed: false, 53 - translations: { 54 - en: "Information Technology", 55 - }, 56 - autogenerate: { directory: "information_technology" }, 57 - }, 58 - { 59 - label: "Projektmanagement", 60 - collapsed: false, 61 - translations: { 62 - en: "Project Management", 63 - }, 64 - autogenerate: { directory: "project_management" }, 65 - }, 66 - { 67 - label: "Sprachen", 68 - collapsed: false, 69 - translations: { 70 - en: "Languages", 71 - }, 72 - autogenerate: { directory: "languages" }, 73 - }, 74 - { 75 - label: "Wirtschaft und Recht", 76 - collapsed: false, 77 - translations: { 78 - en: "Economy and Law", 79 - }, 80 - autogenerate: { directory: "economy_and_law" }, 81 - }, 82 - ], 83 - components: { 84 - Pagination: "./src/components/CustomPagination.astro", 85 - }, 86 - plugins: [starlightImageZoom(), starlightLinksValidator(), starlightViewModes()], 87 - credits: true, 88 - }), 89 - ], 90 - markdown: { 91 - remarkPlugins: [remarkMath], 92 - rehypePlugins: [rehypeMathjax], 93 - }, 94 - redirects: { 95 - "/": "/de/", 96 - }, 12 + site: "https://mutanuq.trueberryless.org", 13 + integrations: [ 14 + starlight({ 15 + title: "Mutanuq", 16 + logo: { 17 + light: "./src/assets/light-logo.png", 18 + dark: "./src/assets/dark-logo.png", 19 + replacesTitle: true, 20 + }, 21 + social: { 22 + github: "https://github.com/trueberryless-org/mutanuq", 23 + patreon: "https://www.patreon.com/trueberryless", 24 + }, 25 + editLink: { 26 + baseUrl: 27 + "https://github.com/trueberryless-org/mutanuq/tree/main/starlight/", 28 + }, 29 + lastUpdated: true, 30 + defaultLocale: "de", 31 + locales: { 32 + de: { 33 + label: "Deutsch", 34 + }, 35 + en: { 36 + label: "English", 37 + }, 38 + }, 39 + tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 3 }, 40 + expressiveCode: {}, 41 + customCss: [ 42 + "./src/styles/custom.css", 43 + "./src/styles/landing.css", 44 + "./src/styles/print.css", 45 + "@fontsource-variable/jetbrains-mono/wght.css", 46 + ], 47 + components: { 48 + DownloadFile: "./src/components/DownloadFile.astro", 49 + }, 50 + sidebar: [ 51 + { 52 + label: "Informationstechnologie", 53 + collapsed: false, 54 + translations: { 55 + en: "Information Technology", 56 + }, 57 + autogenerate: { directory: "information_technology" }, 58 + }, 59 + { 60 + label: "Projektmanagement", 61 + collapsed: false, 62 + translations: { 63 + en: "Project Management", 64 + }, 65 + autogenerate: { directory: "project_management" }, 66 + }, 67 + { 68 + label: "Sprachen", 69 + collapsed: false, 70 + translations: { 71 + en: "Languages", 72 + }, 73 + autogenerate: { directory: "languages" }, 74 + }, 75 + { 76 + label: "Wirtschaft und Recht", 77 + collapsed: false, 78 + translations: { 79 + en: "Economy and Law", 80 + }, 81 + autogenerate: { directory: "economy_and_law" }, 82 + }, 83 + ], 84 + components: { 85 + Pagination: "./src/components/CustomPagination.astro", 86 + }, 87 + plugins: [ 88 + starlightImageZoom(), 89 + starlightLinksValidator(), 90 + starlightViewModes(), 91 + ], 92 + credits: true, 93 + }), 94 + ], 95 + markdown: { 96 + remarkPlugins: [remarkMath], 97 + rehypePlugins: [rehypeMathjax], 98 + }, 99 + redirects: { 100 + "/": "/de/", 101 + }, 97 102 });
+49 -49
starlight/lunaria.config.json
··· 1 1 { 2 - "$schema": "./node_modules/@lunariajs/core/config.schema.json", 3 - "repository": { 4 - "name": "trueberryless-org/mutanuq", 5 - "rootDir": "starlight" 6 - }, 7 - "files": [ 8 - { 9 - "location": "src/content/docs/**/*.{md,mdx}", 10 - "pattern": "src/content/docs/@lang/@path", 11 - "type": "universal" 12 - } 13 - ], 14 - "defaultLocale": { 15 - "label": "Deutsch", 16 - "lang": "de" 17 - }, 18 - "locales": [ 2 + "$schema": "./node_modules/@lunariajs/core/config.schema.json", 3 + "repository": { 4 + "name": "trueberryless-org/mutanuq", 5 + "rootDir": "starlight" 6 + }, 7 + "files": [ 8 + { 9 + "location": "src/content/docs/**/*.{md,mdx}", 10 + "pattern": "src/content/docs/@lang/@path", 11 + "type": "universal" 12 + } 13 + ], 14 + "defaultLocale": { 15 + "label": "Deutsch", 16 + "lang": "de" 17 + }, 18 + "locales": [ 19 + { 20 + "label": "English", 21 + "lang": "en" 22 + } 23 + ], 24 + "dashboard": { 25 + "title": "Mutanuq Translation Status", 26 + "description": "Translation progress tracker for the Mutanuq site. See how much has been translated in your language and get involved!", 27 + "favicon": { 28 + "external": [ 19 29 { 20 - "label": "English", 21 - "lang": "en" 22 - } 23 - ], 24 - "dashboard": { 25 - "title": "Mutanuq Translation Status", 26 - "description": "Translation progress tracker for the Mutanuq site. See how much has been translated in your language and get involved!", 27 - "favicon": { 28 - "external": [ 29 - { 30 - "link": "https://mutanuq.trueberryless.org/favicon.svg", 31 - "type": "image/svg+xml" 32 - } 33 - ] 34 - }, 35 - "customCss": ["./lunaria/styles.css"], 36 - "basesToHide": ["src/content/docs/"], 37 - "ui": { 38 - "statusByLocale.heading": "Translation progress by locale", 39 - "statusByLocale.incompleteLocalizationLink": "incomplete translation", 40 - "statusByLocale.outdatedLocalizationLink": "outdated translation", 41 - "statusByLocale.completeLocalization": "This translation is complete, amazing job! 🎉", 42 - "statusByFile.heading": "Translation status by file" 30 + "link": "https://mutanuq.trueberryless.org/favicon.svg", 31 + "type": "image/svg+xml" 43 32 } 33 + ] 44 34 }, 45 - "ignoreKeywords": [ 46 - "lunaria-ignore", 47 - "typo", 48 - "en-only", 49 - "broken link", 50 - "i18nReady", 51 - "i18nIgnore" 52 - ], 53 - "renderer": "./lunaria/renderer.config.ts" 35 + "customCss": ["./lunaria/styles.css"], 36 + "basesToHide": ["src/content/docs/"], 37 + "ui": { 38 + "statusByLocale.heading": "Translation progress by locale", 39 + "statusByLocale.incompleteLocalizationLink": "incomplete translation", 40 + "statusByLocale.outdatedLocalizationLink": "outdated translation", 41 + "statusByLocale.completeLocalization": "This translation is complete, amazing job! 🎉", 42 + "statusByFile.heading": "Translation status by file" 43 + } 44 + }, 45 + "ignoreKeywords": [ 46 + "lunaria-ignore", 47 + "typo", 48 + "en-only", 49 + "broken link", 50 + "i18nReady", 51 + "i18nIgnore" 52 + ], 53 + "renderer": "./lunaria/renderer.config.ts" 54 54 }
+15 -14
starlight/lunaria/components.ts
··· 1 1 import { html } from "@lunariajs/core"; 2 2 3 3 export const TitleParagraph = () => html` 4 - <p> 5 - If you're interested in helping us translate 6 - <a href="https://mutanuq.trueberryless.org/">mutanuq.trueberryless.org</a> into one of the 7 - languages listed below, you've come to the right place! This auto-updating page always lists 8 - all the content that could use your help right now. 9 - </p> 10 - <p> 11 - Before starting a new translation, please read our 12 - <a 13 - href="https://github.com/trueberryless-org/mutanuq/blob/main/CONTRIBUTING.md#translating-mutanuqs-docs" 14 - >translation guide</a 15 - > 16 - to learn about our translation process and how you can get involved. 17 - </p> 4 + <p> 5 + If you're interested in helping us translate 6 + <a href="https://mutanuq.trueberryless.org/">mutanuq.trueberryless.org</a> 7 + into one of the languages listed below, you've come to the right place! This 8 + auto-updating page always lists all the content that could use your help 9 + right now. 10 + </p> 11 + <p> 12 + Before starting a new translation, please read our 13 + <a 14 + href="https://github.com/trueberryless-org/mutanuq/blob/main/CONTRIBUTING.md#translating-mutanuqs-docs" 15 + >translation guide</a 16 + > 17 + to learn about our translation process and how you can get involved. 18 + </p> 18 19 `;
+3 -3
starlight/lunaria/renderer.config.ts
··· 2 2 import { TitleParagraph } from "./components"; 3 3 4 4 export default defineRendererConfig({ 5 - slots: { 6 - afterTitle: TitleParagraph, 7 - }, 5 + slots: { 6 + afterTitle: TitleParagraph, 7 + }, 8 8 });
+31 -26
starlight/lunaria/styles.css
··· 1 1 :root { 2 - --theme-accent: hsl(234, 100%, 87%); 3 - --theme-bg: hsl(223, 13%, 10%); 4 - --theme-table-header: hsl(222, 13%, 16%); 5 - --theme-table-hover: hsl(222, 13%, 16%); 6 - --theme-text: hsl(228, 8%, 77%); 7 - --theme-text-bright: hsl(0, 0%, 100%); 8 - --overlay-blurple: hsla(255, 60%, 60%, 0.2); 2 + --theme-accent: hsl(234, 100%, 87%); 3 + --theme-bg: hsl(223, 13%, 10%); 4 + --theme-table-header: hsl(222, 13%, 16%); 5 + --theme-table-hover: hsl(222, 13%, 16%); 6 + --theme-text: hsl(228, 8%, 77%); 7 + --theme-text-bright: hsl(0, 0%, 100%); 8 + --overlay-blurple: hsla(255, 60%, 60%, 0.2); 9 9 10 - --ln-color-background: linear-gradient(215deg, var(--overlay-blurple), transparent 40%), 11 - radial-gradient(var(--overlay-blurple), transparent 40%) no-repeat -60vw -40vh / 105vw 200vh, 12 - radial-gradient(var(--overlay-blurple), transparent 65%) no-repeat 50% calc(100% + 20rem) / 13 - 60rem 30rem, 14 - var(--theme-bg); 15 - --ln-color-link: var(--theme-accent); 16 - --ln-color-black: var(--theme-text); 17 - --ln-color-done: var(--ln-color-blue); 18 - --ln-color-outdated: #ea580c; 19 - --ln-color-missing: var(--theme-text-bright); 20 - --ln-color-table-background: var(--theme-table-header); 21 - --ln-color-table-border: var(--theme-table-header); 10 + --ln-color-background: linear-gradient( 11 + 215deg, 12 + var(--overlay-blurple), 13 + transparent 40% 14 + ), 15 + radial-gradient(var(--overlay-blurple), transparent 40%) no-repeat -60vw -40vh / 16 + 105vw 200vh, 17 + radial-gradient(var(--overlay-blurple), transparent 65%) no-repeat 50% 18 + calc(100% + 20rem) / 60rem 30rem, 19 + var(--theme-bg); 20 + --ln-color-link: var(--theme-accent); 21 + --ln-color-black: var(--theme-text); 22 + --ln-color-done: var(--ln-color-blue); 23 + --ln-color-outdated: #ea580c; 24 + --ln-color-missing: var(--theme-text-bright); 25 + --ln-color-table-background: var(--theme-table-header); 26 + --ln-color-table-border: var(--theme-table-header); 22 27 23 - color-scheme: dark; 28 + color-scheme: dark; 24 29 } 25 30 26 31 h1, ··· 29 34 h4, 30 35 h5, 31 36 h6 { 32 - color: var(--theme-text-bright); 37 + color: var(--theme-text-bright); 33 38 } 34 39 35 40 p a { 36 - text-decoration: underline; 41 + text-decoration: underline; 37 42 } 38 43 39 44 .create-button { 40 - background-color: hsl(213deg 89% 64% / 20%); 41 - border-radius: 0.5em; 45 + background-color: hsl(213deg 89% 64% / 20%); 46 + border-radius: 0.5em; 42 47 } 43 48 44 49 sup { 45 - display: flex; 46 - justify-content: center; 50 + display: flex; 51 + justify-content: center; 47 52 }
+34 -34
starlight/package.json
··· 1 1 { 2 - "name": "starlight", 3 - "type": "module", 4 - "version": "0.1.1", 5 - "scripts": { 6 - "dev": "astro dev", 7 - "devo": "npm run open-browser && astro dev", 8 - "open-browser": "start http://localhost:4321", 9 - "start": "astro dev", 10 - "build": "astro build", 11 - "preview": "astro preview", 12 - "astro": "astro", 13 - "lunaria:build": "lunaria build", 14 - "lunaria:preview": "lunaria preview" 15 - }, 16 - "dependencies": { 17 - "@11ty/eleventy-fetch": "^4.0.1", 18 - "@astrojs/starlight": "^0.24.2", 19 - "@fontsource-variable/jetbrains-mono": "^5.0.21", 20 - "@lunariajs/core": "^0.1.0", 21 - "@zachleat/table-saw": "^1.0.6", 22 - "astro": "^4.10.2", 23 - "astro-expressive-code": "^0.34.2", 24 - "astro-feelback": "^0.3.4", 25 - "rehype-mathjax": "^6.0.0", 26 - "remark-expressive-code": "^0.34.2", 27 - "remark-math": "^6.0.0", 28 - "sharp": "^0.33.4", 29 - "starlight-image-zoom": "^0.5.0", 30 - "starlight-links-validator": "^0.7.1" 31 - }, 32 - "devDependencies": { 33 - "starlight-view-modes": "^0.5.3" 34 - }, 35 - "packageManager": "pnpm@8.7.4" 2 + "name": "starlight", 3 + "version": "0.1.1", 4 + "type": "module", 5 + "scripts": { 6 + "astro": "astro", 7 + "build": "astro build", 8 + "dev": "astro dev", 9 + "devo": "npm run open-browser && astro dev", 10 + "lunaria:build": "lunaria build", 11 + "lunaria:preview": "lunaria preview", 12 + "open-browser": "start http://localhost:4321", 13 + "preview": "astro preview", 14 + "start": "astro dev" 15 + }, 16 + "dependencies": { 17 + "@11ty/eleventy-fetch": "^4.0.1", 18 + "@astrojs/starlight": "^0.24.2", 19 + "@fontsource-variable/jetbrains-mono": "^5.0.21", 20 + "@lunariajs/core": "^0.1.0", 21 + "@zachleat/table-saw": "^1.0.6", 22 + "astro": "^4.10.2", 23 + "astro-expressive-code": "^0.34.2", 24 + "astro-feelback": "^0.3.4", 25 + "rehype-mathjax": "^6.0.0", 26 + "remark-expressive-code": "^0.34.2", 27 + "remark-math": "^6.0.0", 28 + "sharp": "^0.33.4", 29 + "starlight-image-zoom": "^0.5.0", 30 + "starlight-links-validator": "^0.7.1" 31 + }, 32 + "devDependencies": { 33 + "starlight-view-modes": "^0.5.3" 34 + }, 35 + "packageManager": "pnpm@8.7.4" 36 36 }
+75 -67
starlight/src/assets/components/getContributors.ts
··· 1 1 import { cachedFetch } from "./util-server"; 2 2 3 3 export interface Contributor { 4 - login: string; 5 - id: number; 6 - contributions: number; 4 + login: string; 5 + id: number; 6 + contributions: number; 7 7 } 8 8 9 9 interface Commit { 10 - author: { 11 - login: string; 12 - id: number; 13 - }; 14 - commit: { 15 - message: string; 16 - }; 10 + author: { 11 + login: string; 12 + id: number; 13 + }; 14 + commit: { 15 + message: string; 16 + }; 17 17 } 18 18 19 19 const printError = (e: Error) => 20 - console.warn(`[error] /src/util/getContributors.ts\n ${e?.message ?? e}`); 20 + console.warn( 21 + `[error] /src/util/getContributors.ts\n ${e?.message ?? e}` 22 + ); 21 23 22 24 async function recursiveFetch(endpoint: string, page = 1) { 23 - try { 24 - const queryParam = endpoint.includes("?") ? "&" : "?"; 25 - const pageSize = 100; 26 - const url = `https://api.github.com/${endpoint}${queryParam}per_page=${pageSize}&page=${page}`; 25 + try { 26 + const queryParam = endpoint.includes("?") ? "&" : "?"; 27 + const pageSize = 100; 28 + const url = `https://api.github.com/${endpoint}${queryParam}per_page=${pageSize}&page=${page}`; 27 29 28 - const token = import.meta.env.PUBLIC_GITHUB_TOKEN; 30 + const token = import.meta.env.PUBLIC_GITHUB_TOKEN; 29 31 30 - const res = await cachedFetch( 31 - url, 32 - { 33 - method: "GET", 34 - headers: { 35 - Authorization: 36 - token && `Basic ${Buffer.from(token, "binary").toString("base64")}`, 37 - "User-Agent": "astro-docs/1.0", 38 - }, 39 - }, 40 - { duration: "15m" } 41 - ); 32 + const res = await cachedFetch( 33 + url, 34 + { 35 + method: "GET", 36 + headers: { 37 + Authorization: 38 + token && `Basic ${Buffer.from(token, "binary").toString("base64")}`, 39 + "User-Agent": "astro-docs/1.0", 40 + }, 41 + }, 42 + { duration: "15m" } 43 + ); 42 44 43 - const data = await res.json(); 45 + const data = await res.json(); 44 46 45 - if (!res.ok) { 46 - throw new Error( 47 - `Request to fetch endpoint failed. Reason: ${res.statusText} 47 + if (!res.ok) { 48 + throw new Error( 49 + `Request to fetch endpoint failed. Reason: ${res.statusText} 48 50 Message: ${data?.message}` 49 - ); 50 - } 51 - 52 - // Fetch more data recursively if there are more than GitHub’s per-page response limit. 53 - if (data.length === pageSize) { 54 - const rest = await recursiveFetch(endpoint, page + 1); 55 - data.push(...rest); 56 - } 51 + ); 52 + } 57 53 58 - return data; 59 - } catch (e) { 60 - printError(e as Error); 61 - return []; 54 + // Fetch more data recursively if there are more than GitHub’s per-page response limit. 55 + if (data.length === pageSize) { 56 + const rest = await recursiveFetch(endpoint, page + 1); 57 + data.push(...rest); 62 58 } 59 + 60 + return data; 61 + } catch (e) { 62 + printError(e as Error); 63 + return []; 64 + } 63 65 } 64 66 65 67 export async function getAllContributors(repo: string) { 66 - const endpoint = `repos/${repo}/contributors`; 67 - const contributors: Contributor[] = await recursiveFetch(endpoint); 68 + const endpoint = `repos/${repo}/contributors`; 69 + const contributors: Contributor[] = await recursiveFetch(endpoint); 68 70 69 - return contributors; 71 + return contributors; 70 72 } 71 73 72 - export async function getTranslationContributors(paths: string[], repo: string) { 73 - const ignoredCommitKeywords = /(en-only|typo|broken link|i18nReady|i18nIgnore)/i; 74 - const contributors: Contributor[] = []; 74 + export async function getTranslationContributors( 75 + paths: string[], 76 + repo: string 77 + ) { 78 + const ignoredCommitKeywords = 79 + /(en-only|typo|broken link|i18nReady|i18nIgnore)/i; 80 + const contributors: Contributor[] = []; 75 81 76 - for (const path of paths) { 77 - const endpoint = `repos/${repo}/commits?path=${path}`; 78 - const commits: Commit[] = await recursiveFetch(endpoint); 82 + for (const path of paths) { 83 + const endpoint = `repos/${repo}/commits?path=${path}`; 84 + const commits: Commit[] = await recursiveFetch(endpoint); 79 85 80 - for (const { author, commit } of commits) { 81 - if (ignoredCommitKeywords.test(commit.message) || !author) continue; 82 - const contributor = contributors.find((contributor) => contributor.id === author.id); 86 + for (const { author, commit } of commits) { 87 + if (ignoredCommitKeywords.test(commit.message) || !author) continue; 88 + const contributor = contributors.find( 89 + (contributor) => contributor.id === author.id 90 + ); 83 91 84 - if (!contributor) { 85 - contributors.push({ 86 - id: author.id, 87 - login: author.login, 88 - contributions: 1, 89 - }); 90 - continue; 91 - } 92 - contributor.contributions += 1; 93 - } 92 + if (!contributor) { 93 + contributors.push({ 94 + id: author.id, 95 + login: author.login, 96 + contributions: 1, 97 + }); 98 + continue; 99 + } 100 + contributor.contributions += 1; 94 101 } 102 + } 95 103 96 - return contributors.sort((a, b) => b.contributions - a.contributions); 104 + return contributors.sort((a, b) => b.contributions - a.contributions); 97 105 }
+30 -30
starlight/src/assets/components/util-server.ts
··· 7 7 import EleventyFetch from "@11ty/eleventy-fetch"; 8 8 9 9 export type CachedFetchOptions = { 10 - duration?: string; 11 - verbose?: boolean; 10 + duration?: string; 11 + verbose?: boolean; 12 12 }; 13 13 14 14 export async function cachedFetch( 15 - url: string, 16 - fetchOptions = {}, 17 - { duration = "5m", verbose = false }: CachedFetchOptions = {} 15 + url: string, 16 + fetchOptions = {}, 17 + { duration = "5m", verbose = false }: CachedFetchOptions = {} 18 18 ) { 19 - let status = 200; 20 - let statusText = "OK"; 21 - let buffer: Buffer | undefined; 19 + let status = 200; 20 + let statusText = "OK"; 21 + let buffer: Buffer | undefined; 22 22 23 - try { 24 - buffer = await EleventyFetch(url, { 25 - duration, 26 - verbose, 27 - type: "buffer", 28 - fetchOptions, 29 - }); 30 - } catch (e: unknown) { 31 - const error = e as Error; 32 - const msg: string = error?.message || error.toString(); 33 - const matches = msg.match(/^Bad response for (.*) \(.*?\): (.*)$/); 34 - status = parseInt(matches?.[2] || "") || 404; 35 - statusText = matches?.[3] || msg; 36 - } 23 + try { 24 + buffer = await EleventyFetch(url, { 25 + duration, 26 + verbose, 27 + type: "buffer", 28 + fetchOptions, 29 + }); 30 + } catch (e: unknown) { 31 + const error = e as Error; 32 + const msg: string = error?.message || error.toString(); 33 + const matches = msg.match(/^Bad response for (.*) \(.*?\): (.*)$/); 34 + status = parseInt(matches?.[2] || "") || 404; 35 + statusText = matches?.[3] || msg; 36 + } 37 37 38 - return { 39 - ok: status >= 200 && status <= 299, 40 - status, 41 - statusText, 42 - body: buffer, 43 - json: () => buffer && JSON.parse(buffer.toString()), 44 - text: () => buffer?.toString(), 45 - }; 38 + return { 39 + ok: status >= 200 && status <= 299, 40 + status, 41 + statusText, 42 + body: buffer, 43 + json: () => buffer && JSON.parse(buffer.toString()), 44 + text: () => buffer?.toString(), 45 + }; 46 46 }
+4 -4
starlight/src/content/config.ts
··· 1 - import { defineCollection } from 'astro:content'; 2 - import { docsSchema, i18nSchema } from '@astrojs/starlight/schema'; 1 + import { defineCollection } from "astro:content"; 2 + import { docsSchema, i18nSchema } from "@astrojs/starlight/schema"; 3 3 4 4 export const collections = { 5 - docs: defineCollection({ schema: docsSchema() }), 6 - i18n: defineCollection({ type: 'data', schema: i18nSchema() }), 5 + docs: defineCollection({ schema: docsSchema() }), 6 + i18n: defineCollection({ type: "data", schema: i18nSchema() }), 7 7 };
+4 -4
starlight/src/styles/custom.css
··· 1 1 .MathJax svg { 2 - display: inline; 2 + display: inline; 3 3 } 4 4 5 5 /* svg.inline { ··· 8 8 } */ 9 9 10 10 html[data-theme="light"] .dark-only { 11 - display: none; 11 + display: none; 12 12 } 13 13 14 14 html[data-theme="dark"] .light-only { 15 - display: none; 15 + display: none; 16 16 } 17 17 18 18 :is(code, code *) { 19 - font-family: "JetBrains Mono Variable", sans-serif !important; 19 + font-family: "JetBrains Mono Variable", sans-serif !important; 20 20 }
+13 -12
starlight/src/styles/landing.css
··· 1 1 :root { 2 - --purple-hsl: 255, 60%, 60%; 3 - --overlay-blurple: hsla(var(--purple-hsl), 0.2); 2 + --purple-hsl: 255, 60%, 60%; 3 + --overlay-blurple: hsla(var(--purple-hsl), 0.2); 4 4 } 5 5 6 6 :root[data-theme="light"] { 7 - --purple-hsl: 255, 85%, 65%; 7 + --purple-hsl: 255, 85%, 65%; 8 8 } 9 9 10 10 [data-has-hero] .page { 11 - background: linear-gradient(215deg, var(--overlay-blurple), transparent 40%), 12 - radial-gradient(var(--overlay-blurple), transparent 40%) no-repeat -60vw -40vh / 105vw 200vh, 13 - radial-gradient(var(--overlay-blurple), transparent 65%) no-repeat 50% calc(100% + 20rem) / 14 - 60rem 30rem; 11 + background: linear-gradient(215deg, var(--overlay-blurple), transparent 40%), 12 + radial-gradient(var(--overlay-blurple), transparent 40%) no-repeat -60vw -40vh / 13 + 105vw 200vh, 14 + radial-gradient(var(--overlay-blurple), transparent 65%) no-repeat 50% 15 + calc(100% + 20rem) / 60rem 30rem; 15 16 } 16 17 17 18 [data-has-hero] header { 18 - border-bottom: 1px solid transparent; 19 - background-color: transparent; 20 - -webkit-backdrop-filter: blur(16px); 21 - backdrop-filter: blur(16px); 19 + border-bottom: 1px solid transparent; 20 + background-color: transparent; 21 + -webkit-backdrop-filter: blur(16px); 22 + backdrop-filter: blur(16px); 22 23 } 23 24 24 25 [data-has-hero] .hero > img { 25 - filter: drop-shadow(0 0 3rem var(--overlay-blurple)); 26 + filter: drop-shadow(0 0 3rem var(--overlay-blurple)); 26 27 }
+24 -24
starlight/src/styles/print.css
··· 1 1 @media print { 2 - :is( 3 - .header, 4 - #starlight__sidebar, 5 - .right-sidebar-container, 6 - footer, 7 - starlight-menu-button, 8 - .content-panel > div > p.sl-flex 9 - ) { 10 - display: none; 11 - } 2 + :is( 3 + .header, 4 + #starlight__sidebar, 5 + .right-sidebar-container, 6 + footer, 7 + starlight-menu-button, 8 + .content-panel > div > p.sl-flex 9 + ) { 10 + display: none; 11 + } 12 12 13 - .main-frame { 14 - padding-inline-start: 0; 15 - padding-top: 0; 16 - } 13 + .main-frame { 14 + padding-inline-start: 0; 15 + padding-top: 0; 16 + } 17 17 18 - .main-pane { 19 - width: 100%; 20 - --sl-content-margin-inline: unset; 21 - } 18 + .main-pane { 19 + width: 100%; 20 + --sl-content-margin-inline: unset; 21 + } 22 22 23 - .sl-container { 24 - --sl-content-width: 100%; 25 - } 23 + .sl-container { 24 + --sl-content-width: 100%; 25 + } 26 26 27 - :is(h1, h2, h3, h4, h5, h6) { 28 - color: black !important; 29 - } 27 + :is(h1, h2, h3, h4, h5, h6) { 28 + color: black !important; 29 + } 30 30 }