Skip to content

Commit 32671f2

Browse files
committed
chore: Lint
1 parent 1f108cc commit 32671f2

4 files changed

Lines changed: 257 additions & 297 deletions

File tree

docs/astro.config.mts

Lines changed: 91 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import starlight from "@astrojs/starlight";
2-
import onestWoff2 from "@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url";
3-
import ui from "@studiocms/ui";
4-
import { defineConfig, envField } from "astro/config";
5-
import rehypePluginKit from "./src/plugins/rehypePluginKit";
1+
import starlight from '@astrojs/starlight';
2+
import onestWoff2 from '@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url';
3+
import ui from '@studiocms/ui';
4+
import { defineConfig, envField } from 'astro/config';
5+
import rehypePluginKit from './src/plugins/rehypePluginKit';
66

77
// Define the Site URL
8-
const site = "https://ui.studiocms.dev/";
8+
const site = 'https://ui.studiocms.dev/';
99

1010
export const locales = {
11-
root: { label: "English", lang: "en" },
12-
es: { label: "Español", lang: "es" },
11+
root: { label: 'English', lang: 'en' },
12+
es: { label: 'Español', lang: 'es' },
1313
// de: { label: 'Deutsch', lang: 'de' },
1414
// ja: { label: '日本語', lang: 'ja' },
1515
// fr: { label: 'Français', lang: 'fr' },
@@ -29,16 +29,16 @@ export const locales = {
2929
export default defineConfig({
3030
site,
3131
image: {
32-
remotePatterns: [{ protocol: "https" }],
32+
remotePatterns: [{ protocol: 'https' }],
3333
},
3434
markdown: {
3535
rehypePlugins: rehypePluginKit,
3636
},
3737
env: {
3838
schema: {
3939
THUM_SECRET_KEY: envField.string({
40-
access: "secret",
41-
context: "server",
40+
access: 'secret',
41+
context: 'server',
4242
optional: true,
4343
}),
4444
},
@@ -48,183 +48,181 @@ export default defineConfig({
4848
noInjectResetCSS: true,
4949
}),
5050
starlight({
51-
title: "StudioCMS UI",
52-
description:
53-
"The UI library for StudioCMS, available for Astro for all to use.",
51+
title: 'StudioCMS UI',
52+
description: 'The UI library for StudioCMS, available for Astro for all to use.',
5453
lastUpdated: true,
5554
credits: false,
56-
tagline:
57-
"The UI library for StudioCMS, available for Astro for all to use.",
55+
tagline: 'The UI library for StudioCMS, available for Astro for all to use.',
5856
components: {
59-
SiteTitle: "./src/starlightOverrides/SiteTitle.astro",
60-
PageTitle: "./src/starlightOverrides/PageTitle.astro",
61-
Sidebar: "./src/starlightOverrides/Sidebar.astro",
62-
Head: "./src/starlightOverrides/Head.astro",
63-
Header: "./src/starlightOverrides/Header.astro",
57+
SiteTitle: './src/starlightOverrides/SiteTitle.astro',
58+
PageTitle: './src/starlightOverrides/PageTitle.astro',
59+
Sidebar: './src/starlightOverrides/Sidebar.astro',
60+
Head: './src/starlightOverrides/Head.astro',
61+
Header: './src/starlightOverrides/Header.astro',
6462
},
6563
logo: {
66-
dark: "../assets/logo-light.svg",
67-
light: "../assets/logo-dark.svg",
64+
dark: '../assets/logo-light.svg',
65+
light: '../assets/logo-dark.svg',
6866
},
69-
defaultLocale: "root",
67+
defaultLocale: 'root',
7068
locales,
7169
social: [
7270
{
73-
href: "https://github.com/withstudiocms/ui",
74-
icon: "github",
75-
label: "GitHub",
71+
href: 'https://github.com/withstudiocms/ui',
72+
icon: 'github',
73+
label: 'GitHub',
7674
},
7775
{
78-
href: "https://chat.studiocms.dev",
79-
icon: "discord",
80-
label: "Discord",
76+
href: 'https://chat.studiocms.dev',
77+
icon: 'discord',
78+
label: 'Discord',
8179
},
8280
{
83-
href: "https://www.youtube.com/@StudioCMS",
84-
icon: "youtube",
85-
label: "YouTube",
81+
href: 'https://www.youtube.com/@StudioCMS',
82+
icon: 'youtube',
83+
label: 'YouTube',
8684
},
8785
{
88-
href: "https://x.com/withstudiocms",
89-
icon: "x.com",
90-
label: "X/Twitter",
86+
href: 'https://x.com/withstudiocms',
87+
icon: 'x.com',
88+
label: 'X/Twitter',
9189
},
9290
{
93-
href: "https://bsky.app/profile/studiocms.dev",
94-
icon: "blueSky",
95-
label: "BlueSky",
91+
href: 'https://bsky.app/profile/studiocms.dev',
92+
icon: 'blueSky',
93+
label: 'BlueSky',
9694
},
9795
{
98-
href: "https://opencollective.com/StudioCMS",
99-
icon: "openCollective",
100-
label: "Open Collective",
96+
href: 'https://opencollective.com/StudioCMS',
97+
icon: 'openCollective',
98+
label: 'Open Collective',
10199
},
102100
],
103101
customCss: [
104-
"@studiocms/ui/css/global.css",
105-
"./src/styles/sponsorcolors.css",
106-
"./src/styles/starlight.css",
102+
'@studiocms/ui/css/global.css',
103+
'./src/styles/sponsorcolors.css',
104+
'./src/styles/starlight.css',
107105
],
108106
editLink: {
109-
baseUrl: "https://github.com/withstudiocms/ui/tree/main/docs",
107+
baseUrl: 'https://github.com/withstudiocms/ui/tree/main/docs',
110108
},
111109
head: [
112110
{
113-
tag: "script",
111+
tag: 'script',
114112
attrs: {
115-
src: "https://analytics.studiocms.cloud/script.js",
116-
"data-website-id": "d30566ce-efae-4096-95e5-037378c8d2cb",
113+
src: 'https://analytics.studiocms.cloud/script.js',
114+
'data-website-id': 'd30566ce-efae-4096-95e5-037378c8d2cb',
117115
defer: true,
118116
},
119117
},
120118
{
121-
tag: "meta",
119+
tag: 'meta',
122120
attrs: {
123-
property: "og:image",
121+
property: 'og:image',
124122
content: `${site}og.png`,
125123
},
126124
},
127125
{
128-
tag: "meta",
126+
tag: 'meta',
129127
attrs: {
130-
property: "twitter:image",
128+
property: 'twitter:image',
131129
content: `${site}og.png`,
132130
},
133131
},
134132
{
135-
tag: "meta",
133+
tag: 'meta',
136134
attrs: {
137-
property: "twitter:site",
138-
content: "withstudiocms",
135+
property: 'twitter:site',
136+
content: 'withstudiocms',
139137
},
140138
},
141139
{
142-
tag: "meta",
140+
tag: 'meta',
143141
attrs: {
144-
property: "twitter:creator",
145-
content: "withstudiocms",
142+
property: 'twitter:creator',
143+
content: 'withstudiocms',
146144
},
147145
},
148146
{
149-
tag: "link",
147+
tag: 'link',
150148
attrs: {
151-
rel: "preload",
152-
as: "font",
153-
type: "font/woff2",
149+
rel: 'preload',
150+
as: 'font',
151+
type: 'font/woff2',
154152
href: onestWoff2,
155-
crossorigin: "anonymous",
153+
crossorigin: 'anonymous',
156154
},
157155
},
158156
{
159-
tag: "link",
157+
tag: 'link',
160158
attrs: {
161-
rel: "icon",
162-
href: "/favicon.svg",
163-
type: "image/svg+xml",
159+
rel: 'icon',
160+
href: '/favicon.svg',
161+
type: 'image/svg+xml',
164162
},
165163
},
166164
{
167-
tag: "link",
165+
tag: 'link',
168166
attrs: {
169-
rel: "icon",
170-
href: "/favicon-light.png",
171-
type: "image/png",
172-
media: "(prefers-color-scheme: dark)",
167+
rel: 'icon',
168+
href: '/favicon-light.png',
169+
type: 'image/png',
170+
media: '(prefers-color-scheme: dark)',
173171
},
174172
},
175173
{
176-
tag: "link",
174+
tag: 'link',
177175
attrs: {
178-
rel: "icon",
179-
href: "/favicon-dark.png",
180-
type: "image/png",
181-
media: "(prefers-color-scheme: light)",
176+
rel: 'icon',
177+
href: '/favicon-dark.png',
178+
type: 'image/png',
179+
media: '(prefers-color-scheme: light)',
182180
},
183181
},
184182
],
185183
sidebar: [
186184
{
187-
label: "Getting Started",
185+
label: 'Getting Started',
188186
items: [
189187
{
190-
label: "Installation",
191-
link: "docs/",
188+
label: 'Installation',
189+
link: 'docs/',
192190
},
193191
{
194-
label: "Release Notes",
195-
link: "docs/changelog",
192+
label: 'Release Notes',
193+
link: 'docs/changelog',
196194
},
197195
{
198-
label: "Site Showcase",
199-
link: "docs/showcase",
196+
label: 'Site Showcase',
197+
link: 'docs/showcase',
200198
},
201199
],
202200
},
203201
{
204-
label: "Guides",
202+
label: 'Guides',
205203
autogenerate: {
206-
directory: "docs/guides",
204+
directory: 'docs/guides',
207205
collapsed: true,
208206
},
209207
},
210208
{
211-
label: "Upgrading StudioCMS",
209+
label: 'Upgrading StudioCMS',
212210
autogenerate: {
213-
directory: "docs/upgrade-guides",
211+
directory: 'docs/upgrade-guides',
214212
collapsed: true,
215213
},
216214
},
217215
{
218-
label: "Components",
216+
label: 'Components',
219217
autogenerate: {
220-
directory: "docs/components",
218+
directory: 'docs/components',
221219
collapsed: true,
222220
},
223221
},
224222
{
225-
label: "Utilities",
223+
label: 'Utilities',
226224
autogenerate: {
227-
directory: "docs/utilities",
225+
directory: 'docs/utilities',
228226
collapsed: true,
229227
},
230228
},

docs/src/styles/starlight.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ button[aria-label="Menu"][aria-controls="starlight__sidebar"] {
112112
padding: 0.5rem;
113113
}
114114

115-
[data-theme="light"]
116-
button[aria-label="Menu"][aria-controls="starlight__sidebar"] {
115+
[data-theme="light"] button[aria-label="Menu"][aria-controls="starlight__sidebar"] {
117116
background-color: var(--sl-color-black) !important;
118117
padding: 0.5rem;
119118
}
@@ -132,9 +131,7 @@ button[aria-label="Menu"][aria-controls="starlight__sidebar"] {
132131
}
133132

134133
/* Headings after non-headings have more spacing. */
135-
.sl-markdown-content
136-
:not(.heading-wrapper)
137-
+ :is(.heading-wrapper):not(:where(.not-content *)) {
134+
.sl-markdown-content :not(.heading-wrapper) + :is(.heading-wrapper):not(:where(.not-content *)) {
138135
margin-top: 1.5em;
139136
}
140137

@@ -159,8 +156,7 @@ button[aria-label="Menu"][aria-controls="starlight__sidebar"] {
159156
height: var(--icon-size) !important;
160157
}
161158

162-
.sl-markdown-content
163-
:is(img, picture, video, canvas, svg, iframe):not(:where(.not-content *)) {
159+
.sl-markdown-content :is(img, picture, video, canvas, svg, iframe):not(:where(.not-content *)) {
164160
display: block;
165161
height: auto;
166162
}

0 commit comments

Comments
 (0)