From 25c7b9c986d69e9fc4cf56194ae3b1dc0732c516 Mon Sep 17 00:00:00 2001 From: jrosh Date: Thu, 29 May 2025 13:53:59 +0200 Subject: [PATCH] add computed to font base url for gh pages --- src/composables/useStyles.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/composables/useStyles.ts b/src/composables/useStyles.ts index 9fcfed8..a8c4616 100644 --- a/src/composables/useStyles.ts +++ b/src/composables/useStyles.ts @@ -1,5 +1,5 @@ // src/composables/useStyles.ts -import { ref, watch, nextTick } from 'vue'; +import { ref, watch, nextTick, computed } from 'vue'; import { type RenditionTheme, type StylesOptions } from '../types/styles'; export function useStyles(options: StylesOptions = {}) { @@ -12,8 +12,9 @@ export function useStyles(options: StylesOptions = {}) { const stylesModalOpen = ref(false); const rendition = ref(null); - const baseUrl = import.meta.env.VITE_BASE_URL; - + const baseUrl = computed(() => { + return import.meta.env.VITE_BASE_URL; + }); const customFonts = { 'Fast Sans': `${baseUrl}fonts/Fast_Sans.ttf`, 'Fast Serif': `${baseUrl}fonts/Fast_Serif.ttf`,