diff --git a/composables/useProjectDetail.ts b/assets/ts/project/useProjectDetail.ts similarity index 100% rename from composables/useProjectDetail.ts rename to assets/ts/project/useProjectDetail.ts diff --git a/composables/useTheme.ts b/assets/ts/project/useTheme.ts similarity index 100% rename from composables/useTheme.ts rename to assets/ts/project/useTheme.ts diff --git a/config/basePath.ts b/config/basePath.ts index 7a0ef7a..95a9950 100644 --- a/config/basePath.ts +++ b/config/basePath.ts @@ -3,9 +3,10 @@ import { useRuntimeConfig } from '#imports'; const getBasePath = (): string => { try { const config = useRuntimeConfig(); - return config.public.basePath || ''; + return config.public.basePath; } catch (e) { - return process.env.NODE_ENV === 'production' ? process.env.BASE_PATH || '/containers/matheothierry-portfolio_nuxt' : ''; + console.error('Error getting base path:', e); + return process.env.NODE_ENV === 'production' ? process.env.BASE_PATH || '/' : '/'; } }; diff --git a/nuxt.config.ts b/nuxt.config.ts index 5c5ec09..3370aa7 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -14,10 +14,6 @@ export default defineNuxtConfig({ '~/assets/css/pages/cv.css' ], - imports: { - dirs: ['composables'] - }, - app: { head: { title: 'Portfolio', @@ -31,12 +27,12 @@ export default defineNuxtConfig({ rel: 'icon', type: 'image/x-icon', href: process.env.NODE_ENV === 'production' - ? (process.env.BASE_PATH || '/containers/matheothierry-portfolio_nuxt') + '/favicon.ico' + ? process.env.BASE_PATH + '/favicon.ico' : '/favicon.ico' } ], }, - buildAssetsDir: process.env.NODE_ENV === 'production' ? (process.env.BASE_PATH || '/containers/matheothierry-portfolio_nuxt') + '/_nuxt/' : '/_nuxt/', + buildAssetsDir: process.env.NODE_ENV === 'production' ? process.env.BASE_PATH + '/_nuxt/' : '/_nuxt/', }, modules: ['@nuxt/image'], @@ -65,12 +61,12 @@ export default defineNuxtConfig({ ipx: { maxAge: 60 * 60 * 24 * 30 }, - baseURL: process.env.NODE_ENV === 'production' ? (process.env.BASE_PATH || '/containers/matheothierry-portfolio_nuxt') : '', + baseURL: process.env.NODE_ENV === 'production' ? process.env.BASE_PATH : '', }, runtimeConfig: { public: { - basePath: process.env.BASE_PATH || (process.env.NODE_ENV === 'production' ? '/containers/matheothierry-portfolio_nuxt' : '') + basePath: process.env.BASE_PATH || (process.env.NODE_ENV === 'production' ? process.env.BASE_PATH : '') } } }) \ No newline at end of file diff --git a/pages/projects/[id]/index.vue b/pages/projects/[id]/index.vue index 39583e4..14a1c15 100644 --- a/pages/projects/[id]/index.vue +++ b/pages/projects/[id]/index.vue @@ -79,7 +79,7 @@