diff --git a/scripts/generate/readme-styles.ts b/scripts/generate/readme-styles.ts index 962bdccc5e..7816d3bd35 100644 --- a/scripts/generate/readme-styles.ts +++ b/scripts/generate/readme-styles.ts @@ -68,7 +68,7 @@ export function generateStyleReadmes(userstyles: UserstylesSchema.Userstyles) { const readmeContent = Handlebars.compile(stylesReadmeContent)({ heading: heading(name, readme["app-link"]), slug, - usage: readme.usage, + note: readme.note, faq: readme.faq, collaborators: { currentMaintainers: extractName(currentMaintainers), diff --git a/scripts/generate/templates/userstyle.md b/scripts/generate/templates/userstyle.md index e8364af7f1..c12d111ddd 100644 --- a/scripts/generate/templates/userstyle.md +++ b/scripts/generate/templates/userstyle.md @@ -17,9 +17,13 @@

-{{#if usage}} ## Usage -{{{ usage }}} + +See [the userstyle usage instructions](../../docs/USAGE.md). + +{{#if note}} +> [!NOTE] +> {{{ note }}} {{/if}} {{#if faq}} diff --git a/scripts/types/userstyles.d.ts b/scripts/types/userstyles.d.ts index e8b5418cd4..5d1f19008f 100644 --- a/scripts/types/userstyles.d.ts +++ b/scripts/types/userstyles.d.ts @@ -75,9 +75,9 @@ export type Icon = string; */ export type ApplicationLink = [string, string, ...string[]] | string; /** - * The Usage section of the userstyle README. + * An additional note for the Usage section of the userstyle README. */ -export type Usage = string; +export type Note = string; /** * The FAQ section of the userstyle README. * @@ -184,7 +184,7 @@ export interface Userstyle { */ export interface README { "app-link": ApplicationLink; - usage?: Usage; + note?: Note; faq?: FAQ; [k: string]: unknown; } diff --git a/scripts/userstyles.schema.json b/scripts/userstyles.schema.json index 726c70f888..ca1f6482e6 100644 --- a/scripts/userstyles.schema.json +++ b/scripts/userstyles.schema.json @@ -15,13 +15,6 @@ "type": "object", "description": "The directory of the userstyle.", "examples": ["youtube"], - "required": [ - "name", - "categories", - "readme", - "color", - "current-maintainers" - ], "additionalProperties": false, "properties": { "name": { @@ -85,7 +78,7 @@ "title": "README", "description": "Options to help in the auto-generation of the userstyle README.", "type": "object", - "required": ["app-link"], + "additionalProperties": false, "properties": { "app-link": { "$id": "#userstyles/userstyle/readme/app-link", @@ -108,10 +101,10 @@ } ] }, - "usage": { - "$id": "#userstyles/userstyle/readme/usage", - "title": "Usage", - "description": "The Usage section of the userstyle README.", + "note": { + "$id": "#userstyles/userstyle/readme/note", + "title": "Note", + "description": "An additional note for the Usage section of the userstyle README.", "type": "string" }, "faq": { @@ -122,6 +115,7 @@ "minItems": 1, "items": { "type": "object", + "additionalProperties": false, "properties": { "question": { "type": "string", @@ -137,7 +131,8 @@ "required": ["question", "answer"] } } - } + }, + "required": ["app-link"] }, "current-maintainers": { "$id": "#userstyles/userstyle/current-maintainers", @@ -154,7 +149,14 @@ "description": "List of all users that have maintained this userstyle in the past.", "$ref": "#/$defs/collaborators" } - } + }, + "required": [ + "name", + "categories", + "readme", + "color", + "current-maintainers" + ] } } }, @@ -173,6 +175,7 @@ "type": "array", "items": { "type": "object", + "additionalProperties": false, "properties": { "name": { "type": "string", diff --git a/scripts/userstyles.yml b/scripts/userstyles.yml index 2b2d100411..d0af896335 100644 --- a/scripts/userstyles.yml +++ b/scripts/userstyles.yml @@ -188,9 +188,7 @@ userstyles: color: sky readme: app-link: [https://anilist.co, https://anichart.net] - usage: |+ - > [!NOTE] - > This theme applies to [AniChart](https://anichart.net/) as well, which is an extension of AniList. + note: This theme also applies to [AniChart](https://anichart.net/), an extension of AniList. current-maintainers: [*anubisnekhet] arch-wiki: name: Arch Wiki @@ -199,7 +197,7 @@ userstyles: color: blue readme: app-link: https://wiki.archlinux.org - usage: "Make sure to use the default **Light** theme" + note: "Make sure to use the default **Light** theme." current-maintainers: [] past-maintainers: [*genshibe] boringproxy: @@ -216,7 +214,7 @@ userstyles: color: peach readme: app-link: https://search.brave.com - usage: "Make sure to set the theme to either dark or light in Brave Search settings, as the automatic setting will not work." + note: "Make sure to set the theme to either dark or light in Brave Search settings, as the automatic setting will not work." current-maintainers: [*ndsboy] bsky: name: Bluesky Social @@ -232,7 +230,7 @@ userstyles: color: green readme: app-link: https://bstats.org - usage: "Make sure to use the default **Teal** theme from the built-in color picker (located at the bottom of the page) for the best experience!" + note: "Make sure to use the default **Teal** theme from the built-in color picker (located at the bottom of the page) for the best experience!" current-maintainers: [*rockquiet] canvas-lms: name: Canvas LMS @@ -373,7 +371,7 @@ userstyles: icon: github color: text readme: - usage: "Switch to a default GitHub light/dark theme via **Settings** > **Appearance** for the best experience!" + note: "Switch to a default GitHub light/dark theme via **Settings** > **Appearance** for the best experience!" app-link: https://github.com current-maintainers: [*uncenter] past-maintainers: [*unseen-ninja, *pocco81, *glowingumbreon] @@ -383,7 +381,7 @@ userstyles: icon: gmail color: peach readme: - usage: "Switch to the default dark theme via the **Settings** > **Themes** > **View all** for the best experience!" + note: "Switch to the default dark theme via the **Settings** > **Themes** > **View all** for the best experience!" app-link: https://mail.google.com current-maintainers: [*uncenter] past-maintainers: [*isabelroses] @@ -471,9 +469,7 @@ userstyles: color: pink readme: app-link: https://holodex.net - usage: |+ - > [!NOTE] - > Holodex's selected theme is ignored. + note: Holodex's selected theme is ignored. current-maintainers: [*Guaxinim5573] home-manager-options-search: name: Home Manager Options Search @@ -622,7 +618,7 @@ userstyles: icon: lichess color: text readme: - usage: "Switch to a default Lichess light/dark theme via **Username** > **Background** for the best experience!" + note: "Switch to a default Lichess light/dark theme via **Username** > **Background** for the best experience!" app-link: https://lichess.org current-maintainers: [*coopw1] lingva: @@ -707,9 +703,7 @@ userstyles: color: blue readme: app-link: https://webmail.migadu.com - usage: |+ - > [!NOTE] - > Set Migadu Webmail's built-in theme to 'Migadu' for the optimal experience. + note: Set Migadu Webmail's built-in theme to 'Migadu' for the optimal experience. current-maintainers: [*uncenter] minesweeper: name: Minesweeper Online @@ -871,9 +865,7 @@ userstyles: color: mauve readme: app-link: https://proton.me - usage: |+ - > [!NOTE] - > Set Proton Mail's built-in theme to 'Snow' if you're using Latte or 'Carbon' if you're using the others. + note: Set Proton Mail's built-in theme to 'Snow' if you're using Latte or 'Carbon' if you're using the others. current-maintainers: [*soya-daizu] pypi: name: PyPI @@ -1005,9 +997,7 @@ userstyles: color: sapphire readme: app-link: https://syncthing.net - usage: |+ - > [!NOTE] - > This theme is designed to be used with the default WebGUI and default theme provided by Syncthing. This does not theme syncthing.net. + note: This theme is designed to be used with the default WebGUI and default theme provided by Syncthing. This does not theme syncthing.net. current-maintainers: [*BlankParticle] tabnews: name: TabNews @@ -1023,9 +1013,7 @@ userstyles: color: text readme: app-link: https://www.tldraw.com - usage: |+ - > [!NOTE] - > This theme only changes how the colors appear on the tldraw canvas. Exported graphics **will not be Catppuccin-themed**. + note: This theme only changes how the colors appear on the tldraw canvas. Exported graphics **will not be Catppuccin-themed**. current-maintainers: [*genshibe, *uncenter] trinket: name: Trinket @@ -1041,9 +1029,7 @@ userstyles: color: maroon readme: app-link: https://tuta.com - usage: |+ - > [!NOTE] - > Set Tuta's built-in theme to either **light** if you're using Latte or **dark** if you're using the others. + note: Set Tuta's built-in theme to either **light** if you're using Latte or **dark** if you're using the others. current-maintainers: [*ryanccn] twitch: name: Twitch @@ -1060,9 +1046,7 @@ userstyles: icon: twitter readme: app-link: https://twitter.com - usage: |+ - > [!NOTE] - > Set Twitter's built-in theme to **Lights out** with the blue accent. Also requires the [:has()](https://developer.mozilla.org/en-US/docs/Web/CSS/:has) selector. + note: Set Twitter's built-in theme to **Lights out** with the blue accent. current-maintainers: [*watatomo] vercel: name: ["Vercel", "Next.js"] @@ -1071,9 +1055,7 @@ userstyles: color: text readme: app-link: [https://vercel.com, https://nextjs.org] - usage: |+ - > [!NOTE] - > This theme also applies to the [Next.js](https://nextjs.org/) website. + note: This theme also applies to the [Next.js](https://nextjs.org/) website. current-maintainers: [*ryanccn, *Dandraghas] vikunja: name: Vikunja