Upgrade to Astro 5, apply bincio design system, fix mdast-util-from-markdown v2 compat

- Bump astro@5, @astrojs/mdx@4, @astrojs/rss@4, @astrojs/sitemap@3
- Add @astrojs/tailwind, @astrojs/svelte, tailwindcss, svelte
- Add patch-package + patches for mdast-util-wikirefs and mdast-util-caml
  to fix getData/setData → this.data.key and this.exit() return value for
  mdast-util-from-markdown v2 API compatibility
- Fix wikirefs.ts resolveEmbedContent signature for new 3-arg call
- Fix backrefs.ts: guard wikirefs.scan() against non-iterable return
- Add Base.astro layout with bincio dark/light theme tokens, nav, Inter font
- Replace global.css with bincio CSS variables + wiki-specific prose styles
- Update Entry.astro, BlogPost.astro, index.astro, map.astro, blog/index.astro
  to use Base.astro layout with Tailwind utility classes
- Add tailwind.config.mjs (Inter + JetBrains Mono, zinc palette)
- Update SITE_TITLE to BincioWiki, site URL to wiki.bincio.com
This commit is contained in:
brutsalvadi
2026-04-22 22:47:59 +02:00
committed by brutsalvadi
parent 9cf5bfbd96
commit e1e3b0a85b
17 changed files with 7847 additions and 8175 deletions
+21 -30
View File
@@ -1,44 +1,35 @@
import { base, defineConfig } from 'astro/config';
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import svelte from '@astrojs/svelte';
import { remarkWikiRefs } from 'remark-wikirefs';
import { remarkCaml } from 'remark-caml';
import {
resolveHtmlHref,
resolveHtmlText,
createResolveEmbedContent,
generateForeRefsRemarkPlugin,
resolveHtmlHref,
resolveHtmlText,
createResolveEmbedContent,
generateForeRefsRemarkPlugin,
} from './src/wikibonsai/wikirefs';
const remarkPlugins = [
remarkCaml,
[
remarkWikiRefs,
{
resolveHtmlHref: resolveHtmlHref,
resolveHtmlText: resolveHtmlText,
resolveEmbedContent: null, // we'll set this later -- see below
},
],
generateForeRefsRemarkPlugin,
remarkCaml,
[
remarkWikiRefs,
{
resolveHtmlHref,
resolveHtmlText,
resolveEmbedContent: null,
},
],
generateForeRefsRemarkPlugin,
];
// embed content needs access to a unified processor
const resolveEmbedContent = createResolveEmbedContent(remarkPlugins);
remarkPlugins[1][1].resolveEmbedContent = resolveEmbedContent;
// https://astro.build/config
export default defineConfig({
site: 'https://astro-bloomz.netlify.app',
integrations: [
sitemap(),
],
assetsInclude: true,
markdown: {
// Preserve Astro's default plugins: GitHub-flavored Markdown and Smartypants
extendDefaultPlugins: true,
// Applied to .md and .mdx files
remarkPlugins: remarkPlugins,
},
site: 'https://wiki.bincio.com',
integrations: [sitemap(), tailwind(), svelte()],
legacy: { collections: true },
markdown: { remarkPlugins },
});