diff options
| author | seth <[email protected]> | 2024-02-13 01:46:59 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-13 01:46:59 -0500 |
| commit | 09ee595618ad8c2fc6816e4c2ca21991a5ddeae3 (patch) | |
| tree | fbd0ce5aee443b5b3054fad8685f4026604c513d | |
| parent | a48c12b23ee697f86f951c930f78b2c6647b9c7a (diff) | |
use MINIFLUX_URL if present
| -rw-r--r-- | astro.config.ts | 4 | ||||
| -rw-r--r-- | 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", |
