initial commit
All checks were successful
Generate a build and push to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Successful in 1m24s
All checks were successful
Generate a build and push to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Successful in 1m24s
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { defineConfig } from 'astro/config'
|
||||
|
||||
import mdx from '@astrojs/mdx'
|
||||
import react from '@astrojs/react'
|
||||
import icon from 'astro-icon'
|
||||
|
||||
import expressiveCode from 'astro-expressive-code'
|
||||
import { rehypeHeadingIds } from '@astrojs/markdown-remark'
|
||||
import rehypeExternalLinks from 'rehype-external-links'
|
||||
import rehypePrettyCode from 'rehype-pretty-code'
|
||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
|
||||
import remarkEmoji from 'remark-emoji'
|
||||
import remarkMath from 'remark-math'
|
||||
import remarkSectionize from 'remark-sectionize'
|
||||
@@ -17,7 +17,11 @@ import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-s
|
||||
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'
|
||||
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import vercel from '@astrojs/vercel';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
|
||||
import svelte from '@astrojs/svelte';
|
||||
import { fileURLToPath } from 'url';
|
||||
import path from 'path';
|
||||
|
||||
function rehypeDemoteH1AndStripTitle() {
|
||||
return (tree: any) => {
|
||||
@@ -46,7 +50,7 @@ function rehypeDemoteH1AndStripTitle() {
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
site: 'https://www.cojocarudavid.me',
|
||||
site: 'https://patrick.jaroszew.ski',
|
||||
|
||||
integrations: [expressiveCode({
|
||||
themes: ['catppuccin-latte', 'ayu-dark'],
|
||||
@@ -62,27 +66,23 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
}), mdx(), react(), icon()],
|
||||
}), svelte(), mdx(), icon()],
|
||||
|
||||
vite: {
|
||||
plugins: [tailwindcss() as any],
|
||||
plugins: [
|
||||
tailwindcss() as any,
|
||||
Icons({ compiler: 'svelte' }),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src'),
|
||||
'$lib': path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src/lib')
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ["satori", "satori-html"],
|
||||
include: [
|
||||
"react",
|
||||
"react-dom",
|
||||
"clsx",
|
||||
"framer-motion",
|
||||
"lucide-react",
|
||||
"lodash.debounce",
|
||||
"@radix-ui/react-icons",
|
||||
"@radix-ui/react-avatar",
|
||||
"@radix-ui/react-dropdown-menu",
|
||||
"@radix-ui/react-scroll-area",
|
||||
"@radix-ui/react-separator",
|
||||
"@radix-ui/react-slot"
|
||||
]
|
||||
},
|
||||
include: ["clsx"]
|
||||
},
|
||||
},
|
||||
|
||||
server: {
|
||||
@@ -107,6 +107,48 @@ export default defineConfig({
|
||||
],
|
||||
rehypeDemoteH1AndStripTitle,
|
||||
rehypeHeadingIds,
|
||||
[
|
||||
rehypeAutolinkHeadings,
|
||||
{
|
||||
behavior: 'append',
|
||||
properties: {
|
||||
className: ['heading-anchor'],
|
||||
ariaLabel: 'Link to this section',
|
||||
},
|
||||
content: {
|
||||
type: 'element',
|
||||
tagName: 'svg',
|
||||
properties: {
|
||||
className: ['anchor-icon'],
|
||||
xmlns: 'http://www.w3.org/2000/svg',
|
||||
width: '16',
|
||||
height: '16',
|
||||
viewBox: '0 0 24 24',
|
||||
fill: 'none',
|
||||
stroke: 'currentColor',
|
||||
strokeWidth: '2',
|
||||
strokeLinecap: 'round',
|
||||
strokeLinejoin: 'round'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
type: 'element',
|
||||
tagName: 'path',
|
||||
properties: {
|
||||
d: 'M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'element',
|
||||
tagName: 'path',
|
||||
properties: {
|
||||
d: 'M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
rehypePrettyCode,
|
||||
{
|
||||
@@ -119,6 +161,4 @@ export default defineConfig({
|
||||
],
|
||||
remarkPlugins: [remarkMath, remarkEmoji, remarkSectionize],
|
||||
},
|
||||
|
||||
adapter: vercel()
|
||||
})
|
||||
Reference in New Issue
Block a user