docs: add starlight (#1859)
Co-authored-by: uncenter <[email protected]> Co-authored-by: Hammy <[email protected]> Co-authored-by: WalkQuackBack <[email protected]>
This commit is contained in:
46 files changed
+5967
-522
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
@@ -1,30 +0,0 @@
|
||||
# Summary
|
||||
|
||||
- [Introduction](./README.md)
|
||||
|
||||
- [Usage](./USAGE.md)
|
||||
|
||||
- [FAQ](./FAQ.md)
|
||||
|
||||
---
|
||||
|
||||
- [Contributing](./CONTRIBUTING.md)
|
||||
|
||||
- [Userstyle Creation](./userstyle-creation.md)
|
||||
|
||||
- [Guide](./guide/README.md)
|
||||
|
||||
- [Images and SVGs](./guide/images-and-svgs.md)
|
||||
- [Syntax highlighting](./guide/syntax-highlighting.md)
|
||||
- [Obtaining raw color values](./guide/raw-color-values.md)
|
||||
|
||||
- [Tutorials](./tutorials/README.md)
|
||||
|
||||
- [Writing a userstyle (walkthrough)](./tutorials/writing-a-userstyle.md)
|
||||
|
||||
- [Tips and Tricks](./tips-and-tricks/README.md)
|
||||
|
||||
- [Inspect hard-to-grab elements](./tips-and-tricks/inspect-hard-to-grab-elements.md)
|
||||
- [See changes in real time (hot reloading)](./tips-and-tricks/see-changes-in-real-time.md)
|
||||
|
||||
- [`userstyles.yml`](./userstylesyml.md)
|
||||
@@ -0,0 +1,91 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
import starlight from "@astrojs/starlight";
|
||||
import catppuccin from "@catppuccin/starlight";
|
||||
import starlightLinksValidator from "starlight-links-validator";
|
||||
import starlightImageZoom from "starlight-image-zoom";
|
||||
import starlightGitHubAlerts from "starlight-github-alerts";
|
||||
import mermaid from "astro-mermaid";
|
||||
import { remarkHeadingId } from "remark-custom-heading-id";
|
||||
|
||||
export default defineConfig({
|
||||
site: "https://userstyles.catppuccin.com",
|
||||
markdown: {
|
||||
remarkPlugins: [remarkHeadingId],
|
||||
},
|
||||
integrations: [
|
||||
mermaid(),
|
||||
starlight({
|
||||
title: "Catppuccin Userstyles",
|
||||
favicon: "/favicon.png",
|
||||
logo: {
|
||||
dark: "/public/pepperjack-dark.png",
|
||||
light: "/public/pepperjack-light.png",
|
||||
},
|
||||
social: [
|
||||
{
|
||||
icon: "github",
|
||||
label: "GitHub",
|
||||
href: "https://github.com/catppuccin/userstyles",
|
||||
},
|
||||
],
|
||||
editLink: {
|
||||
baseUrl: "https://github.com/catppuccin/userstyles/edit/main/docs",
|
||||
},
|
||||
expressiveCode: {
|
||||
themes: ["catppuccin-mocha", "catppuccin-latte"],
|
||||
styleOverrides: {
|
||||
frames: {
|
||||
tooltipSuccessBackground: "var(--green)",
|
||||
tooltipSuccessForeground: "var(--base)",
|
||||
},
|
||||
textMarkers: {
|
||||
insBackground:
|
||||
"color-mix(in oklab, var(--sl-color-green-high) 25%, var(--sl-color-gray-6));",
|
||||
insBorderColor: "var(--sl-color-gray-5)",
|
||||
delBackground:
|
||||
"color-mix(in oklab, var(--sl-color-red-high) 25%, var(--sl-color-gray-6));",
|
||||
delBorderColor: "var(--sl-color-gray-5)",
|
||||
},
|
||||
codeBackground: "var(--sl-color-gray-6)",
|
||||
},
|
||||
},
|
||||
sidebar: [
|
||||
{
|
||||
label: "Getting started",
|
||||
autogenerate: { directory: "getting-started" },
|
||||
},
|
||||
{
|
||||
label: "Contributing",
|
||||
collapsed: true,
|
||||
items: [
|
||||
"contributing",
|
||||
"contributing/creating-userstyles",
|
||||
"contributing/userstylesyml",
|
||||
{
|
||||
label: "How can I theme ...?",
|
||||
autogenerate: { directory: "contributing/guides" },
|
||||
},
|
||||
{
|
||||
label: "Tutorials",
|
||||
autogenerate: { directory: "contributing/tutorials" },
|
||||
},
|
||||
{
|
||||
label: "Tips and Tricks",
|
||||
autogenerate: { directory: "contributing/tips-and-tricks" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Reference",
|
||||
autogenerate: { directory: "reference" },
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
catppuccin(),
|
||||
starlightLinksValidator(),
|
||||
starlightGitHubAlerts(),
|
||||
starlightImageZoom(),
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
# Guide
|
||||
|
||||
> _How can I theme ...?_
|
||||
|
||||
- [Images and SVGs](./images-and-svgs.md)
|
||||
- [Syntax highlighting](./syntax-highlighting.md)
|
||||
- [Obtaining raw color values](./raw-color-values.md)
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f626928a690117a820725b74368dd486d499ca089d32791bcfa0cca77f7bd08a
|
||||
size 45802
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a3f5f77546969b6201f6ae9fd225356aa2fd62953e22c264ddf90b1bd944a830
|
||||
size 82836
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a0d7294023bf1b55eb3471c32295538a0582c671bea1d2ec6bf4063e0a29bc33
|
||||
size 4742
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "docs",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "^0.35.2",
|
||||
"@catppuccin/starlight": "^1.0.2",
|
||||
"astro": "^5.6.1",
|
||||
"astro-mermaid": "^1.0.4",
|
||||
"astro-remote": "^0.3.4",
|
||||
"mermaid": "^11.10.1",
|
||||
"remark-custom-heading-id": "^2.0.0",
|
||||
"sharp": "^0.34.2",
|
||||
"starlight-github-alerts": "^0.1.0",
|
||||
"starlight-image-zoom": "^0.13.0",
|
||||
"starlight-links-validator": "^0.17.2",
|
||||
"yaml": "^2.8.1"
|
||||
}
|
||||
}
|
||||
Generated
+5468
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,3 @@
|
||||
onlyBuiltDependencies:
|
||||
- esbuild
|
||||
- sharp
|
||||
@@ -0,0 +1 @@
|
||||
userstyles.catppuccin.com
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../lib
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
File renamed without changes.
@@ -0,0 +1,7 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { docsLoader } from '@astrojs/starlight/loaders';
|
||||
import { docsSchema } from '@astrojs/starlight/schema';
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
||||
};
|
||||
+14
-5
@@ -1,15 +1,24 @@
|
||||
# Userstyle Creation
|
||||
---
|
||||
title: Creating Userstyles
|
||||
description: Overview of the userstyle creation process.
|
||||
---
|
||||
|
||||
import { Steps } from '@astrojs/starlight/components';
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Websites should be popular or otherwise commonly known by members of the Catppuccin community; personal or niche sites may not meet the criteria. If you are unsure if a website qualifies, consider creating a [discussion](https://github.com/catppuccin/catppuccin/discussions/new?category=port-requests) before submitting an initial PR.
|
||||
|
||||
To create a userstyle, follow the instructions below. If you are unsure how to theme something, see [Guide](./guide/README.md). If you run into any difficulties or have any questions, feel free to join the [Catppuccin Discord server](https://discord.com/servers/catppuccin-907385605422448742) and find us in the #userstyles channel!
|
||||
To create a userstyle, follow the instructions below. If you are unsure how to theme something, see our [Guides](/contributing/guides/). If you run into any difficulties or have any questions, feel free to join the [Catppuccin Discord server](https://discord.com/servers/catppuccin-907385605422448742) and find us in the #userstyles channel!
|
||||
|
||||
<Steps>
|
||||
|
||||
1. Fork the `catppuccin/userstyles` repository.
|
||||
2. Create a new branch under the name `feat/<name-of-website>`, (e.g. `feat/nixos-search` instead of NixOS Search).
|
||||
3. Create a new folder `styles/<name-of-website>`. The name must be `lower-kebab-case`.
|
||||
4. Copy the contents of the [`template`](../template/) folder into `styles/<name-of-website>`.
|
||||
4. Copy the contents of the [`template`](https://github.com/catppuccin/userstyles/tree/main/template) folder into `styles/<name-of-website>`.
|
||||
- **The template uses [LESS](https://lesscss.org/#overview), a preprocessor for Stylus. Please do not change this as we will only accept userstyles based on the template.**
|
||||
5. [Write the userstyle](./tutorials/writing-a-userstyle.md).
|
||||
6. [Edit the `userstyles.yml` file](./userstylesyml.md) and enter the details of your port.
|
||||
5. [Write the userstyle](/contributing/tutorials/writing-a-userstyle/).
|
||||
6. [Edit the `userstyles.yml` file](/contributing/userstylesyml/) and enter the details of your port.
|
||||
7. Raise a [pull request](https://github.com/catppuccin/userstyles/compare), making sure to read and fill out the template properly. The title of your pull request should follow the format of `feat(<name-of-website>): init`.
|
||||
|
||||
</Steps>
|
||||
+7
@@ -1,3 +1,10 @@
|
||||
---
|
||||
title: Images and SVGs
|
||||
description: Guide for theming images and SVGs in userstyles.
|
||||
sidebar:
|
||||
order: 2
|
||||
---
|
||||
|
||||
## SVGs as `background-image`s
|
||||
|
||||
Websites will sometimes use the `background-image` CSS property to apply an SVG, often for icons. We will refer to these as "external SVGs" throughout the rest of this guide, as the SVGs are usually at a different URL and linked to with [`url()`](https://developer.mozilla.org/en-US/docs/Web/CSS/url). Below is an example of what a rule for an external SVG could look like.
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: How can I theme ...?
|
||||
description: Guides for common userstyle theming techniques.
|
||||
sidebar:
|
||||
order: 1
|
||||
label: Overview
|
||||
---
|
||||
|
||||
In this guide section, you can find out how to [theme images and SVGs](/contributing/guides/images-and-svgs/), [theme syntax highlighting](/contributing/guides/syntax-highlighting/), and [obtain raw color values](/contributing/guides/raw-color-values/).
|
||||
+7
@@ -1,3 +1,10 @@
|
||||
---
|
||||
title: Raw color values
|
||||
description: Guide for obtaining raw color values of palette colors in RGB or HSL formats.
|
||||
sidebar:
|
||||
order: 4
|
||||
---
|
||||
|
||||
## Obtaining RGB values
|
||||
|
||||
You can use the following snippet to get the raw RGB values from a color.
|
||||
+7
@@ -1,3 +1,10 @@
|
||||
---
|
||||
title: Syntax Highlighting
|
||||
description: Guide for theming syntax highlighting in userstyles.
|
||||
sidebar:
|
||||
order: 3
|
||||
---
|
||||
|
||||
If a website uses [highlight.js](https://highlightjs.org/), [Pygments](https://pygments.org/), or [Prism.js](https://prismjs.com/) for syntax highlighting, follow the steps for the syntax higlighter in use below. First though, you'll need to add the following lines beneath the color definition section (`@<color>: @catppuccin[@@lookup][@<color>];`) in the `#catppuccin` mixin:
|
||||
|
||||
```css
|
||||
@@ -1,4 +1,9 @@
|
||||
# Contributing
|
||||
---
|
||||
title: Contributing
|
||||
description: Contribution guidelines for the Catppuccin Userstyles project.
|
||||
sidebar:
|
||||
label: Overview
|
||||
---
|
||||
|
||||
If it is your first time contributing to a project on GitHub, please see the popular [first-contributions](https://github.com/firstcontributions/first-contributions) repository. This will give you hands-on experience with the features of GitHub required to make a contribution. As always, feel free to join our [Discord](https://discord.com/servers/catppuccin-907385605422448742) to ask any questions and clarify your understanding, we are more than happy to help!
|
||||
|
||||
@@ -6,7 +11,7 @@ If it is your first time contributing to a project on GitHub, please see the pop
|
||||
|
||||
This repositories uses [Deno](https://deno.com/) extensively for linting, formatting, and automation. We recommend setting up Deno locally to improve your workflow — see ["Installation" - Deno Docs](https://docs.deno.com/runtime/manual/getting_started/installation). With Deno installed locally, you can run the lint script using `deno task lint` (and `deno task lint:fix` to automatically apply fixes) and the formatting script using `deno fmt`.
|
||||
|
||||
When editing a userstyle, we suggest setting up live reloading so your local changes can be automatically reloaded through Stylus. See ["How can I see my changes in real time?"](./tips-and-tricks/see-changes-in-real-time.md).
|
||||
When editing a userstyle, we suggest setting up live reloading so that local changes (from your IDE) can be automatically reloaded through Stylus. See ["Using hot reloading in Stylus"](/contributing/tips-and-tricks/hot-reloading/).
|
||||
|
||||
## Recommendations
|
||||
|
||||
+7
@@ -1 +1,8 @@
|
||||
---
|
||||
title: Using hot reloading in Stylus
|
||||
description: See changes from your IDE in real time with Stylus's "Live reloading" feature.
|
||||
sidebar:
|
||||
order: 2
|
||||
---
|
||||
|
||||
See ["Initial installation and live reload" - Stylus Wiki](https://github.com/openstyles/stylus/wiki/Writing-UserCSS#live-reload-on-the-fly-previewingwhen-developing-styles-locally-in-another-editoride).
|
||||
+7
@@ -1,3 +1,10 @@
|
||||
---
|
||||
title: Inspect hard to grab elements
|
||||
description: Useful tip for inspecting elements that are hard to debug.
|
||||
sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
Paste the following snippet into your browser console, then trigger the event. Adjust the delay (in milliseconds) as needed.
|
||||
|
||||
```js
|
||||
+9
-13
@@ -1,20 +1,16 @@
|
||||
# Writing a userstyle (walkthrough)
|
||||
|
||||
Beginner-friendly walkthrough of creating a userstyle!
|
||||
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Usercss Metadata](#usercss-metadata)
|
||||
- [`@-moz-document`](#-moz-document)
|
||||
- [Applying the theme](#applying-the-theme)
|
||||
- [The `#catppuccin` mixin](#the-catppuccin-mixin)
|
||||
- [Putting it all together](#putting-it-all-together)
|
||||
---
|
||||
title: Writing a userstyle
|
||||
description: Beginner-friendly walkthrough of creating a userstyle!
|
||||
sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Stylus](https://github.com/openstyles/stylus) ([Firefox](https://addons.mozilla.org/en-GB/firefox/addon/styl-us/) / [Chrome](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne) extension).
|
||||
- A website to theme!
|
||||
|
||||
Assuming you have completed steps 1-4 of [Creating Userstyles](./userstyle-creation.md#creating-userstyles), you should have a new `catppuccin.user.less` file under the `styles/<name-of-website>/` directory. Follow along in that `catppuccin.user.less` file as we write an example userstyle for [example.org](http://example.org/).
|
||||
Assuming you have completed steps 1-4 of [Creating Userstyles](/contributing/creating-userstyles/), you should have a new `catppuccin.user.less` file under the `styles/<name-of-website>/` directory. Follow along in that `catppuccin.user.less` file as we write an example userstyle for [example.org](http://example.org/).
|
||||
|
||||
## Usercss Metadata
|
||||
|
||||
@@ -219,6 +215,6 @@ Combining all of the previous steps, we have a working userstyle!
|
||||
|
||||
| Original | Themed |
|
||||
| ---------------------------------------- | -------------------------------------- |
|
||||
|  |  |
|
||||
|  |  |
|
||||
|
||||
Complete the rest of the steps in [Userstyle Creation](../userstyle-creation.md), and then submit your PR!
|
||||
Complete the rest of the steps in [Creating Userstyles](/contributing/creating-userstyles/), and then submit your PR!
|
||||
@@ -1,16 +1,19 @@
|
||||
# userstyles.yml
|
||||
---
|
||||
title: userstyles.yml
|
||||
description: Guide for adding and removing userstyles and maintainers.
|
||||
---
|
||||
|
||||
import { Steps } from "@astrojs/starlight/components";
|
||||
|
||||
The [`userstyles.yml`](https://github.com/catppuccin/userstyles/tree/main/scripts/userstyles.yml) file is responsible for tracking all userstyle and maintainer metadata.
|
||||
|
||||
- [Adding a new userstyle](#adding-a-new-userstyle)
|
||||
- [Adding yourself as a maintainer](#adding-yourself-as-a-maintainer)
|
||||
- [Removing yourself as a maintainer](#removing-yourself-as-a-maintainer)
|
||||
|
||||
> [!TIP]
|
||||
> The [`userstyles.schema.json`](https://github.com/catppuccin/userstyles/tree/main/scripts/userstyles.schema.json) file is the schema specification for `userstyles.yml`. Please refer to it for clarification.
|
||||
|
||||
## Adding a new userstyle
|
||||
|
||||
<Steps>
|
||||
|
||||
1. [Add yourself as a maintainer](#adding-yourself-as-a-maintainer).
|
||||
2. Locate the `userstyles` section of `userstyles.yml` and add an entry for the new userstyle to the list in alphabetical order.
|
||||
|
||||
@@ -23,7 +26,7 @@ The [`userstyles.yml`](https://github.com/catppuccin/userstyles/tree/main/script
|
||||
name: <name>
|
||||
link: <url>
|
||||
# Up to 3 categories are allowed, and having at least one is required.
|
||||
# The first category is considered the "primary" category and impacts where the userstyle appears on the README.
|
||||
# The first category is considered the "primary" category and impacts where the userstyle is listed on the website.
|
||||
categories: [<primary-category>]
|
||||
color: <color>
|
||||
current-maintainers: [*<github-username>]
|
||||
@@ -37,50 +40,58 @@ The [`userstyles.yml`](https://github.com/catppuccin/userstyles/tree/main/script
|
||||
|
||||
The `past-maintainers` field contains a list of maintainers who have maintained the port in the past. We encourage all maintainers to add/remove themselves from this list as they see fit.
|
||||
|
||||
</Steps>
|
||||
|
||||
## Adding yourself as a maintainer
|
||||
|
||||
<Steps>
|
||||
|
||||
1. Add a new entry to the end of the `collaborators` array in the `userstyles.yml` file. The entry should be made under your GitHub username. The following example shows a new entry for a user with the GitHub username "Pepperjack".
|
||||
|
||||
```yaml
|
||||
collaborators:
|
||||
- &Pepperjack Pepperjack
|
||||
```
|
||||
```yaml
|
||||
collaborators:
|
||||
- &Pepperjack Pepperjack
|
||||
```
|
||||
|
||||
2. Add your username to the `current-maintainers` array of the userstyle you wish to maintain. The following example shows the user "Pepperjack" added to the `example.org` userstyle.
|
||||
|
||||
```diff
|
||||
userstyles:
|
||||
example.org:
|
||||
name: example.org
|
||||
link: https://example.org
|
||||
categories: [productivity]
|
||||
color: text
|
||||
- current-maintainers: []
|
||||
+ current-maintainers: [*Pepperjack]
|
||||
```
|
||||
```yaml del={7} ins={8}
|
||||
userstyles:
|
||||
example.org:
|
||||
name: example.org
|
||||
link: https://example.org
|
||||
categories: [productivity]
|
||||
color: text
|
||||
current-maintainers: []
|
||||
current-maintainers: [*Pepperjack]
|
||||
```
|
||||
|
||||
If the change is accepted, you will receive an invitation to the `catppuccin` organization, and become a member of the [`userstyles-maintainers` team](https://github.com/orgs/catppuccin/teams/userstyles-maintainers).
|
||||
If the change is accepted, you will receive an invitation to the `catppuccin` organization, and become a member of the [`userstyles-maintainers` team](https://github.com/orgs/catppuccin/teams/userstyles-maintainers).
|
||||
|
||||
As a maintainer you will be expected to:
|
||||
As a maintainer you will be expected to:
|
||||
|
||||
- Review and merge PRs for the userstyle you maintain.
|
||||
- Keep the userstyle up to date with the latest changes. If you no longer wish to maintain a userstyle, see [Removing yourself as a maintainer](#removing-yourself-as-a-maintainer).
|
||||
- Follow our code of conduct and guidelines.
|
||||
- Review and merge PRs for the userstyle you maintain.
|
||||
- Keep the userstyle up to date with the latest changes. If you no longer wish to maintain a userstyle, see [Removing yourself as a maintainer](#removing-yourself-as-a-maintainer).
|
||||
- Follow our code of conduct and guidelines.
|
||||
|
||||
</Steps>
|
||||
|
||||
## Removing yourself as a maintainer
|
||||
|
||||
1. Remove your username from the `current-maintainers` array and add it to the `past-maintainers` array of the userstyle(s) you no longer want to maintain. The following example shows the user "Pepperjack" removed from the `example.org` userstyle.
|
||||
Remove your username from the `current-maintainers` array and add it to the `past-maintainers` array of the userstyle(s) you no longer want to maintain.
|
||||
|
||||
```diff
|
||||
The following example shows the user "Pepperjack" removed from the `example.org` userstyle:
|
||||
|
||||
```yaml del={7} ins={8-9}
|
||||
userstyles:
|
||||
example.org:
|
||||
name: example.org
|
||||
link: https://example.org
|
||||
categories: [productivity]
|
||||
color: text
|
||||
- current-maintainers: [*Pepperjack]
|
||||
+ current-maintainers: []
|
||||
+ past-maintainers: [*Pepperjack]
|
||||
current-maintainers: [*Pepperjack]
|
||||
current-maintainers: []
|
||||
past-maintainers: [*Pepperjack]
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
title: FAQ
|
||||
description: Answers to frequently asked questions about Catppuccin Userstyles.
|
||||
sidebar:
|
||||
order: 3
|
||||
---
|
||||
|
||||
## This userstyle is broken!
|
||||
|
||||
Sorry to hear that! Please [open an issue](https://github.com/catppuccin/userstyles/issues/new?template=userstyle.yml).
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Introduction
|
||||
description: Introduction to Catppuccin Userstyles.
|
||||
sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
A curated collection of soothing pastel themes for your favorite websites and web applications.
|
||||
|
||||

|
||||
|
||||
## Getting started
|
||||
|
||||
To get started using the catppuccin/userstyles collection, see [Usage](/getting-started/usage/).
|
||||
|
||||
To get started contributing to catppuccin/userstyles, see [Contributing](/contributing/) and [Creating Userstyles](/contributing/creating-userstyles/).
|
||||
|
||||
## Userstyles
|
||||
|
||||
> [!NOTE]
|
||||
> Userstyles labeled with the "❤️🩹" emoji lack maintainers, and may not work as intended. Contributions are still welcome and encouraged!
|
||||
|
||||
import AnchorHeading from '@astrojs/starlight/components/AnchorHeading.astro';
|
||||
import { ports } from "../../../lib/ports";
|
||||
import { categories, sortedCategories, categoryMap } from "../../../lib/categories";
|
||||
|
||||
{sortedCategories.map((cat) => {
|
||||
const category = categories[cat];
|
||||
return (
|
||||
<>
|
||||
<AnchorHeading level="3" id={cat}>{category.emoji}{' '}{category.name}</AnchorHeading>
|
||||
<p>{category.description}</p>
|
||||
<ul>
|
||||
{categoryMap[cat]
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((port) => (
|
||||
<li>
|
||||
<a href={`https://github.com/catppuccin/userstyles/tree/main/styles/${port.slug}`}>
|
||||
{port.currentMaintainers.length > 0 ? '' : '❤️🩹 '}
|
||||
{port.name}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
@@ -1,4 +1,11 @@
|
||||
# Usage
|
||||
---
|
||||
title: Usage
|
||||
description: Guide for how to use Catppuccin Userstyles.
|
||||
sidebar:
|
||||
order: 2
|
||||
---
|
||||
|
||||
import { Steps } from '@astrojs/starlight/components';
|
||||
|
||||
For both of the below installation methods, you will need the Stylus browser extension installed. Install [Stylus](https://github.com/openstyles/stylus) for [Chrome](https://chromewebstore.google.com/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne) or [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/styl-us/). If you use Chrome, make sure to enable "Allow access to file URLs" in the Chrome extension settings for Stylus (visit `chrome://extensions/?id=clngdbkpkpeebahjckkjfobafhncgmne`).
|
||||
|
||||
@@ -7,15 +14,23 @@ For both of the below installation methods, you will need the Stylus browser ext
|
||||
|
||||
## All Userstyles
|
||||
|
||||
<Steps>
|
||||
|
||||
1. Download the compiled Stylus export file, containing our recommended Stylus settings and all userstyles preloaded: [`import.json` (download)](https://github.com/catppuccin/userstyles/releases/download/all-userstyles-export/import.json).
|
||||
- Alternatively, if you want to further customize the `import.json` file - such as setting it so that all userstyles have the accent color `peach`, or the dark flavor is always `frappe` - you can download a customized Stylus export file from [@uncenter](https://github.com/uncenter)'s "[Catppuccin Userstyles Customizer](https://catppuccin-userstyles-customizer.uncenter.dev/)" instead.
|
||||
2. Open the Stylus "manage" page.
|
||||
3. On the sidebar panel, click the **Import** button in the **Backup** section, and select the downloaded file from step 1.
|
||||
|
||||
</Steps>
|
||||
|
||||
## Individual Userstyles
|
||||
|
||||
<Steps>
|
||||
|
||||
1. Enable CSP Patching from Stylus's **Settings** > **Advanced**.
|
||||
2. Install your choice of [available userstyles](https://github.com/catppuccin/userstyles#-userstyles) by clicking the **Stylus Install** badge in each README.
|
||||
2. Install your choice of [available userstyles](/getting-started/introduction/#userstyles) by clicking the **Stylus Install** badge in each README.
|
||||
|
||||
</Steps>
|
||||
|
||||
# Configuration
|
||||
|
||||
@@ -25,7 +40,11 @@ All userstyles come with three default configuration options; the light flavor,
|
||||
|
||||
For decentralized or self-hosted applications, you can apply a theme to one or multiple instances across updates by following the instructions below.
|
||||
|
||||
<Steps>
|
||||
|
||||
1. Open the Stylus "Manage" page.
|
||||
2. Click on the userstyle's name in the list.
|
||||
3. Click on **Style settings** in the left panel.
|
||||
4. Enter the URL patterns for your instance(s) in the text box labeled **Custom included sites**. For example, to apply a userstyle to `example.org`, you would add a line with `https://example.org/*` to the textbox. The trailing asterisk applies it to all pages on the domain - without it, only the root page is themed.
|
||||
|
||||
</Steps>
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Catppuccin Userstyles
|
||||
description: A curated collection of soothing pastel themes for your favorite websites and web applications.
|
||||
template: splash
|
||||
hero:
|
||||
tagline: A curated collection of soothing pastel themes for your favorite websites and web applications.
|
||||
image:
|
||||
dark: /public/pepperjack-dark.png
|
||||
light: /public/pepperjack-light.png
|
||||
actions:
|
||||
- text: Get Started
|
||||
link: /getting-started/introduction
|
||||
icon: right-arrow
|
||||
- text: Contribute on GitHub
|
||||
link: https://github.com/catppuccin/userstyles
|
||||
icon: external
|
||||
variant: minimal
|
||||
---
|
||||
@@ -1,4 +1,7 @@
|
||||
# Browsers
|
||||
---
|
||||
title: Browsers
|
||||
description: Useful information about browser versions and common issues.
|
||||
---
|
||||
|
||||
> [!NOTE]
|
||||
> If you see a popular browser that hasn't been added, please create a pull request to do so!
|
||||
@@ -0,0 +1,39 @@
|
||||
import YAML from "yaml";
|
||||
import { type PortEntry, ports } from "./ports.ts";
|
||||
|
||||
export type Category = {
|
||||
key: string;
|
||||
name: string;
|
||||
description: string;
|
||||
emoji: string;
|
||||
};
|
||||
|
||||
const CATEGORIES_URL =
|
||||
"https://raw.githubusercontent.com/catppuccin/catppuccin/d4f82739e687cfd19d168be355367fdbbcc8e029/resources/categories.yml";
|
||||
|
||||
const content = await fetch(
|
||||
CATEGORIES_URL,
|
||||
).then((res) => res.text());
|
||||
const parsed = YAML.parse(content) as Category[];
|
||||
|
||||
// Turn into a lookup table by key
|
||||
export const categories = Object.fromEntries(parsed.map((c) => [c.key, c]));
|
||||
|
||||
// Group ports by category
|
||||
export const categoryMap: Record<string, typeof ports> = ports.reduce(
|
||||
(acc, port) => {
|
||||
for (const cat of port.categories) {
|
||||
if (!acc[cat]) acc[cat] = [];
|
||||
acc[cat].push(port);
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, PortEntry[]>,
|
||||
);
|
||||
|
||||
// Sort categories by name
|
||||
export const sortedCategories = Object.keys(categoryMap).sort((a, b) => {
|
||||
const aName = categories[a]?.name ?? a;
|
||||
const bName = categories[b]?.name ?? b;
|
||||
return aName.localeCompare(bName);
|
||||
});
|
||||
@@ -0,0 +1,51 @@
|
||||
// deno-lint-ignore-file no-explicit-any
|
||||
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import YAML from "yaml";
|
||||
|
||||
export type Collaborator = string;
|
||||
|
||||
export type PortEntry = {
|
||||
slug: string;
|
||||
name: string;
|
||||
link: string;
|
||||
categories: string[];
|
||||
icon?: string;
|
||||
color: string;
|
||||
note?: string;
|
||||
currentMaintainers?: Collaborator[];
|
||||
pastMaintainers?: Collaborator[];
|
||||
supports?: Record<string, { name: string; link: string }>;
|
||||
};
|
||||
|
||||
const file = fs.readFileSync(
|
||||
path.resolve("../scripts/userstyles.yml"),
|
||||
"utf-8",
|
||||
);
|
||||
const parsed = YAML.parse(file) as {
|
||||
collaborators: Collaborator[];
|
||||
userstyles: Record<string, any>;
|
||||
};
|
||||
|
||||
// TODO: Use proper types from scripts lib once possible.
|
||||
|
||||
// Normalize keys (camelCase)
|
||||
function normalizePort(slug: string, data: any): PortEntry {
|
||||
return {
|
||||
slug,
|
||||
name: data.name,
|
||||
link: data.link,
|
||||
categories: data.categories ?? [],
|
||||
icon: data.icon,
|
||||
color: data.color,
|
||||
note: data.note,
|
||||
currentMaintainers: data["current-maintainers"] ?? [],
|
||||
pastMaintainers: data["past-maintainers"] ?? [],
|
||||
supports: data.supports,
|
||||
};
|
||||
}
|
||||
|
||||
export const ports: PortEntry[] = Object.entries(parsed.userstyles).map(
|
||||
([slug, data]) => normalizePort(slug, data),
|
||||
);
|
||||
@@ -1,4 +0,0 @@
|
||||
# Tips and Tricks
|
||||
|
||||
- [Inspect hard-to-grab elements](./inspect-hard-to-grab-elements.md)
|
||||
- [See changes in real time (hot reloading)](./see-changes-in-real-time.md)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"exclude": ["dist"]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# Tutorials
|
||||
|
||||
- [Writing a userstyle (walkthrough)](writing-a-userstyle.md)
|
||||
Reference in new issue
Block a user