diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1d9e349 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +# SEO Site URL +VITE_SEO_SITE_URL=http://localhost:5173 diff --git a/src/components/seo/index.tsx b/src/components/seo/index.tsx index 5fd430c..fee722f 100644 --- a/src/components/seo/index.tsx +++ b/src/components/seo/index.tsx @@ -7,7 +7,7 @@ type SeoProps = { path: string } -const SITE_URL = "https://dev-lab.onixbyte.dev" +const SITE_URL = import.meta.env.VITE_SEO_SITE_URL const DEFAULT_IMAGE = `${SITE_URL}/onixbyte.svg` function setMetaTag(selector: string, attr: string, value: string) { diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 391fbdf..527ccb7 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -1,8 +1,8 @@ /// interface ImportMetaEnv { - // todo add env properties here + readonly VITE_SEO_SITE_URL: string } interface ImportMeta { readonly env: ImportMetaEnv -} \ No newline at end of file +}