Files

69 lines
2.4 KiB
JavaScript
Raw Permalink Normal View History

2026-06-13 12:53:17 +08:00
import { defineConfig } from 'astro/config';
2026-06-27 08:55:48 +08:00
import { readFileSync } from 'node:fs';
2026-06-27 18:07:58 +08:00
import sitemap from '@astrojs/sitemap';
2026-06-13 12:53:17 +08:00
import reallySimpleDocs from 'reallysimpledocs/astro';
2026-06-27 18:07:58 +08:00
const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
const includeInSitemap = (page) => {
const { pathname } = new URL(page);
return pathname === '/' || (
pathname.endsWith('/') &&
!pathname.startsWith('/fragments/')
);
};
2026-06-27 08:55:48 +08:00
2026-06-13 12:53:17 +08:00
export default defineConfig({
site: process.env.SITE_URL || 'https://basecoatui.com',
2026-06-17 11:19:31 +08:00
vite: {
2026-06-20 13:58:42 +08:00
build: {
assetsInlineLimit: 0,
},
2026-06-17 11:19:31 +08:00
resolve: {
dedupe: ['basecoat-css'],
},
},
2026-06-13 12:53:17 +08:00
integrations: [
reallySimpleDocs({
2026-06-27 18:07:58 +08:00
docsDir: './src/docs',
2026-06-13 12:53:17 +08:00
routeBase: '/',
2026-06-17 11:19:31 +08:00
style: 'vega',
2026-06-22 18:19:38 +08:00
css: false,
2026-06-24 19:07:23 +08:00
bodyAttrs: {
2026-07-06 15:21:53 +07:00
class: 'antialiased',
2026-06-24 19:07:23 +08:00
'hx-boost': 'true',
'hx-target': '#content',
'hx-select': '#content',
'hx-swap': 'outerHTML',
'hx-push-url': 'true',
},
2026-06-13 12:53:17 +08:00
components: {
2026-06-27 18:07:58 +08:00
Head: './src/components/StyleHead.astro',
SidebarHeader: './src/components/SidebarHeader.astro',
ContentHeader: './src/components/ContentHeader.astro',
2026-06-13 12:53:17 +08:00
},
site: {
title: 'Basecoat',
2026-06-27 08:55:48 +08:00
subtitle: `v${packageJson.version}`,
2026-06-13 12:53:17 +08:00
description: 'A components library built with Tailwind CSS that works with any web stack.',
url: process.env.SITE_URL || 'https://basecoatui.com',
keywords: ['components', 'component library', 'component system', 'UI', 'UI kit', 'shadcn', 'shadcn/ui', 'Tailwind CSS', 'Tailwind', 'CSS', 'HTML', 'Jinja', 'Nunjucks', 'JS', 'JavaScript', 'vanilla JS', 'vanilla JavaScript'],
author: {
name: 'Ronan Berder',
x: '@hunvreus',
},
2026-06-27 18:07:58 +08:00
favicon: 'favicon.svg',
appleTouchIcon: 'apple-touch-icon.png',
socialImage: 'social.png',
2026-06-13 12:53:17 +08:00
logo: {
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" class="h-4 w-4"><rect width="256" height="256" fill="none"></rect><line x1="208" y1="128" x2="128" y2="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></line><line x1="192" y1="40" x2="40" y2="192" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></line></svg>',
},
},
}),
2026-06-27 18:07:58 +08:00
sitemap({
filter: includeInSitemap,
}),
2026-06-13 12:53:17 +08:00
],
});