From 09ee595618ad8c2fc6816e4c2ca21991a5ddeae3 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 13 Feb 2024 01:46:59 -0500 Subject: use MINIFLUX_URL if present --- astro.config.ts | 4 ++-- src/components/Nav.astro | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/astro.config.ts b/astro.config.ts index 4dd8829..15dfedd 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -3,8 +3,8 @@ import mdx from "@astrojs/mdx"; import sitemap from "@astrojs/sitemap"; import tailwind from "@astrojs/tailwind"; -const site = - process.env.SITE_URL || process.env.CF_PAGES_URL || "https://my.site"; +const site: string = + process.env.SITE_URL || process.env.CF_PAGES_URL || "http://my.site"; // https://astro.build/config export default defineConfig({ diff --git a/src/components/Nav.astro b/src/components/Nav.astro index 378c804..f427548 100644 --- a/src/components/Nav.astro +++ b/src/components/Nav.astro @@ -6,11 +6,13 @@ interface NavLink { url: string; } +const minifluxUrl = process.env.MINIFLUX_URL || `https://miniflux.${Astro.url.hostname || config.site}`; + const links: NavLink[] = [ { name: "home", url: "/" }, { name: "miniflux", - url: `https://miniflux.${Astro.url.hostname || config.site}`, + url: minifluxUrl, }, { name: "github", -- cgit v1.2.3