@cieloazul310/astro-sarkara-components@4.0.0
github-actions
released this
08 Sep 09:33
·
35 commits
to main
since this release
Major Changes
-
c011a2c: Using Panda CSS with Astro
https://panda-css.com/docs/installation/astro@pandacss/dev >= 40.0.0
npm install astro-icon @iconify-json/mdi
Upgrade to Astro Icon v1
https://www.astroicon.dev/guides/upgrade/v1/// panda.config.ts import { defineSarkaraConfig } from "@cieloazul310/astro-sarkara/preset"; export default defineSarkaraConfig({ palette: { primary: "teal", secondary: "yellow" }, include: [ "./src/**/*.{js,jsx,ts,tsx,astro,mdx}", + "./node_modules/@cieloazul310/**/*.{js,ts,astro}" ], });
// astro.config.ts import { defineConfig } from "astro/config"; +import icon from "astro-icon"; // https://astro.build/config export default defineConfig({ integrations: [ + icon(), ], });
Upgrade to Astro Icon v1
https://www.astroicon.dev/guides/upgrade/v1/{ "compilerOptions": { + "baseUrl": ".", + "paths": { + "styled-system/*": ["./styled-system/*"] } } }
Compiler Options / Paths -
paths
https://www.typescriptlang.org/tsconfig/#paths/** ./src/index.css */ @layer reset, base, tokens, recipes, utilities;
--- // ./src/pages/index.astro import { SarkaraLayout } from "@cieloazul310/astro-sarkara/preset"; + import "../src/index.css"; ---
- import { css } from "@cieloazul310/sarkara-css/css"; + import { css } from "styled-system/css";
// src/mdx-classes.ts /** * DO NOT use path alias * ❌ import { articleClasses } from "styled-system"; */ import { articleClasses } from "../styled-system/recipes"; export default articleClasses();
npm install @astrojs/mdx rehype-class-names
// astro.config.ts import { defineConfig } from "astro/config"; + import mdx from "@astrojs/mdx"; + import rehypeClassNames from "rehype-class-names"; + import mdxClasses from "./src/mdx-classes"; export default defineConfig({ integrations: [ + mdx(), ], + markdown: { + rehypePlugins: [[rehypeClassNames, mdxClasses]], + }, });
Markdown & MDX
https://docs.astro.build/en/guides/markdown-content/Rehype Class Names
https://github.com/riderjensen/rehype-class-names -
36024a2: Prerelease next major