Skip to content

Commit

Permalink
feat: update code and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperwyczawski committed Sep 22, 2024
1 parent 2ad5c66 commit c617eff
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 32 deletions.
16 changes: 13 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import { defineConfig, squooshImageService } from "astro/config";
import { defineConfig, passthroughImageService } from "astro/config";

// https://astro.build/config
export default defineConfig({
site: "https://wyczawski.dev",
integrations: [
tailwind(),
sitemap({
customPages: ["https://autocut.wyczawski.dev/"],
customPages: [
"https://autocut.wyczawski.dev/",
"https://arx.wyczawski.dev",
],
i18n: {
defaultLocale: "en",
locales: {
pl: "pl-PL",
}
}
}),
],
image: {
service: squooshImageService(),
service: passthroughImageService(),
},
devToolbar: {
enabled: false,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/sitemap": "^3.1.1",
"@astrojs/tailwind": "^5.0.0",
"@fontsource-variable/fira-code": "^5.0.8",
"@fontsource-variable/inter": "^5.0.8",
"@fontsource-variable/sora": "^5.0.8",
"astro": "latest",
"squoosh": "^0.0.0",
"tailwindcss": "^3.3.3"
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.1",
"@fontsource-variable/fira-code": "^5.1.0",
"@fontsource-variable/inter": "^5.1.0",
"@fontsource-variable/sora": "^5.1.0",
"astro": "^4.15.8",
"tailwindcss": "^3.4.12"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.10"
"@tailwindcss/typography": "^0.5.15"
}
}
}
12 changes: 2 additions & 10 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const { lang } = Astro.props;
}

body {
--bg-color: theme(colors.neutral.50);
--grid-color: theme(colors.neutral.200 / 50%);
--bg-color: light-dark(theme(colors.neutral.50), theme(colors.slate.900));
--grid-color: light-dark(theme(colors.neutral.200 / 50%), theme(colors.slate.800 / 70%));
background-size: 32px 32px;
background-color: var(--bg-color);
background-image: linear-gradient(
Expand All @@ -76,14 +76,6 @@ const { lang } = Astro.props;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}

/* TODO: replace with https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark when it's supported */
@media (prefers-color-scheme: dark) {
body {
--bg-color: theme(colors.slate.900);
--grid-color: theme(colors.slate.800 / 70%);
}
}
</style>
</head>
<body class="selection:bg-fuchsia-700/20 dark:text-neutral-100 h-full flex flex-col">
Expand Down
12 changes: 6 additions & 6 deletions src/pages/robots.txt.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { APIRoute } from "astro";

const robotsTxt = `
const getRobotsTxt = (sitemapURL: URL) => `
User-agent: *
Allow: /
Disallow: /cdn-cgi/
Sitemap: ${new URL("sitemap-index.xml", import.meta.env.SITE).href}
`.trim();
export const GET: APIRoute = () => {
return new Response(robotsTxt, {
Sitemap: ${sitemapURL.href}
`;

export const GET: APIRoute = ({ site }) => {
return new Response(getRobotsTxt(new URL('sitemap-index.xml', site)), {
headers: {
"Content-Type": "text/plain; charset=utf-8",
},
Expand Down

0 comments on commit c617eff

Please sign in to comment.