Skip to content

Commit

Permalink
fix astro changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Nov 12, 2024
1 parent 9f3abe7 commit 85061c9
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 158 deletions.
144 changes: 74 additions & 70 deletions astro.config.mts
Original file line number Diff line number Diff line change
@@ -1,84 +1,88 @@
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";

import react from '@astrojs/react'
import react from "@astrojs/react";

import tailwind from "@astrojs/tailwind";

// https://astro.build/config
export default defineConfig({
srcDir: './astro',
srcDir: "./astro",
vite: {
build: {
rollupOptions: {
// For some reason, the build crashes without this
external: ['sharp'],
external: ["sharp"],
},
},
},
integrations: [
starlight({
// https://starlight.astro.build/reference/configuration
title: 'Ada URL',
social: {
github: 'https://github.com/ada-url/ada',
integrations: [starlight({
// https://starlight.astro.build/reference/configuration
title: "Ada URL",
social: {
github: "https://github.com/ada-url/ada",
},
sidebar: [
{
label: "Getting Started",
items: ["introduction", "installation"],
},
sidebar: [
{
label: 'Getting Started',
items: ['introduction', 'installation'],
},
{
label: 'CLI',
items: [
{
label: 'Introduction',
slug: 'cli',
},
{
label: 'Performance',
slug: 'cli/performance',
},
],
},
{
label: 'Supported Languages',
items: [
{
label: 'C++ client',
slug: 'clients/cpp',
},
{
label: 'Rust client',
slug: 'clients/rust',
},
{
label: 'Python client',
slug: 'clients/python',
},
{
label: 'Go client',
slug: 'clients/go',
},
{
label: 'LuaJIT client',
slug: 'clients/luajit',
},
],
},
],
components: {
SiteTitle: './astro/components/SiteTitle.astro',
{
label: "CLI",
items: [
{
label: "Introduction",
slug: "cli",
},
{
label: "Performance",
slug: "cli/performance",
},
],
},
favicon: './public/favicon-32x32.png',
logo: {
light: './astro/assets/logo-light.svg',
dark: './astro/assets/logo-dark.svg',
replacesTitle: true,
{
label: "Supported Languages",
items: [
{
label: "C++ client",
slug: "clients/cpp",
},
{
label: "Rust client",
slug: "clients/rust",
},
{
label: "Python client",
slug: "clients/python",
},
{
label: "Go client",
slug: "clients/go",
},
{
label: "LuaJIT client",
slug: "clients/luajit",
},
],
},
customCss: [
// Relative path to your custom CSS file
'./astro/custom.css',
],
}),
react(),
],
})
],
components: {
SiteTitle: "./astro/components/SiteTitle.astro",
},
favicon: "./public/favicon-32x32.png",
logo: {
light: "./astro/assets/logo-light.svg",
dark: "./astro/assets/logo-dark.svg",
replacesTitle: true,
},
customCss: [
// Relative path to your custom CSS file
"./astro/custom.css",
],
editLink: {
baseUrl: "https://github.com/ada-url/website/edit/main",
},
titleDelimiter: "-",
credits: false,
}), react(), tailwind()],
});
5 changes: 2 additions & 3 deletions astro/custom.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
:root {
--sl-color-toast-red : #991b1b;

--sl-color-toast-red: #991b1b;
}

:root[data-theme="light"] {
--sl-color-toast-red: #dc2626;
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"@astrojs/react": "^3.6.2",
"@astrojs/starlight": "^0.28.2",
"@astrojs/tailwind": "^5.1.2",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-aspect-ratio": "^1.0.3",
"@radix-ui/react-collapsible": "^1.0.3",
Expand All @@ -24,6 +25,7 @@
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5",
"@tailwindcss/nesting": "0.0.0-insiders.565cd3e",
"@types/node": "20.5.7",
"@types/react": "18.2.24",
"@types/react-dom": "18.2.8",
Expand All @@ -48,7 +50,7 @@
"sharp": "^0.33.5",
"shiki": "^0.14.4",
"tailwind-merge": "^1.14.0",
"tailwindcss": "3.3.3",
"tailwindcss": "3.4.14",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.2.2"
},
Expand Down
Loading

0 comments on commit 85061c9

Please sign in to comment.