summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-06-28 18:32:37 -0300
committerJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-06-28 18:32:37 -0300
commit12227e4a8b4fd22b663f839142bc0bc994b0543b (patch)
tree400d98a62b3b87c73accf00c3c2add83da196146
parent79fd506d30eef3d113f4a8e3ab9ebd9004f1e8cc (diff)
env on config
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
-rw-r--r--astro.config.ts9
-rw-r--r--deno.lock23
-rw-r--r--package.json3
3 files changed, 28 insertions, 7 deletions
diff --git a/astro.config.ts b/astro.config.ts
index 3f16134..174e0ca 100644
--- a/astro.config.ts
+++ b/astro.config.ts
@@ -13,12 +13,15 @@ import { visit } from "unist-util-visit";
import rehypeSanitize from "rehype-sanitize";
import remarkToc from "remark-toc";
import { get } from "./src/utils/anonymous.ts";
-// import { env } from "./src/lib/env.ts";
+import { loadEnv } from "vite";
+import process from "node:process";
+
+// deno-lint-ignore no-non-null-assertion
+const { PUBLIC_SITE_URL } = loadEnv(process.env.NODE_ENV!, process.cwd(), "");
// https://astro.build/config
export default defineConfig({
- // site: new URL(env.PUBLIC_SITE_URL).href,
- site: "https://cravodeabril.pt",
+ site: new URL(PUBLIC_SITE_URL).href,
integrations: [sitemap({
serialize: async (item) => {
const match = item.url.match(/\/blog\/read\/([^/]+)\/$/);
diff --git a/deno.lock b/deno.lock
index bb70bb6..56974c3 100644
--- a/deno.lock
+++ b/deno.lock
@@ -38,6 +38,7 @@
"npm:unified@^11.0.5": "11.0.5",
"npm:unist-util-visit@5": "5.0.0",
"npm:vfile@^6.0.3": "6.0.3",
+ "npm:vite@7": "7.0.0_picomatch@4.0.2",
"npm:yaqrcode@~0.2.1": "0.2.1",
"npm:zod@^3.25.67": "3.25.67"
},
@@ -962,7 +963,7 @@
"unist-util-visit",
"unstorage",
"vfile",
- "vite",
+ "vite@6.3.5_picomatch@4.0.2",
"vitefu",
"xxhash-wasm",
"yargs-parser",
@@ -2656,13 +2657,28 @@
],
"bin": true
},
+ "vite@7.0.0_picomatch@4.0.2": {
+ "integrity": "sha512-ixXJB1YRgDIw2OszKQS9WxGHKwLdCsbQNkpJN171udl6szi/rIySHL6/Os3s2+oE4P/FLD4dxg4mD7Wust+u5g==",
+ "dependencies": [
+ "esbuild",
+ "fdir",
+ "picomatch@4.0.2",
+ "postcss",
+ "rollup",
+ "tinyglobby"
+ ],
+ "optionalDependencies": [
+ "fsevents"
+ ],
+ "bin": true
+ },
"vitefu@1.0.7_vite@6.3.5__picomatch@4.0.2": {
"integrity": "sha512-eRWXLBbJjW3X5z5P5IHcSm2yYbYRPb2kQuc+oqsbAl99WB5kVsPbiiox+cymo8twTzifA6itvhr2CmjnaZZp0Q==",
"dependencies": [
- "vite"
+ "vite@6.3.5_picomatch@4.0.2"
],
"optionalPeers": [
- "vite"
+ "vite@6.3.5_picomatch@4.0.2"
]
},
"volar-service-css@0.0.62_@volar+language-service@2.4.15": {
@@ -2980,6 +2996,7 @@
"npm:unified@^11.0.5",
"npm:unist-util-visit@5",
"npm:vfile@^6.0.3",
+ "npm:vite@7",
"npm:yaqrcode@~0.2.1",
"npm:zod@^3.25.67"
]
diff --git a/package.json b/package.json
index e596222..150731e 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"zod": "^3.25.67"
},
"devDependencies": {
- "@openpgp/web-stream-tools": "^0.1.3"
+ "@openpgp/web-stream-tools": "^0.1.3",
+ "vite": "^7.0.0"
}
}