diff --git a/scripts/datasources.ts b/scripts/datasources.ts index ebd31c62..5a5865df 100644 --- a/scripts/datasources.ts +++ b/scripts/datasources.ts @@ -5,8 +5,14 @@ import { apiPlugin, storyblokInit } from '@storyblok/js'; dotenv.config(); +const PUBLIC_STORYBLOK_TOKEN = process.env.PUBLIC_STORYBLOK_TOKEN; + +if (!PUBLIC_STORYBLOK_TOKEN) { + throw new Error('Missing required env var: PUBLIC_STORYBLOK_TOKEN'); +} + const { storyblokApi } = storyblokInit({ - accessToken: process.env.PUBLIC_STORYBLOK_TOKEN, + accessToken: PUBLIC_STORYBLOK_TOKEN, use: [apiPlugin], apiOptions: { https: true @@ -33,19 +39,15 @@ const entries: Config[] = [ fetcher: async () => { const strings: Record = {}; - try { - const translationsRes = await storyblok.get('cdn/datasource_entries', { - datasource: 'strings', - per_page: 1000, - cv: Date.now() - }); - const entries: Datasource[] = translationsRes.data.datasource_entries; - entries.forEach((entry) => { - strings[entry.name] = entry.value; - }); - } catch (error) { - throw new Error(`Failed to get strings`); - } + const translationsRes = await storyblok.get('cdn/datasource_entries', { + datasource: 'strings', + per_page: 1000, + cv: Date.now() + }); + const entries: Datasource[] = translationsRes.data.datasource_entries; + entries.forEach((entry) => { + strings[entry.name] = entry.value; + }); return { keys: Object.keys(strings), diff --git a/src/lib/i18n/data.json b/src/lib/i18n/data.json index e8cd93bc..bb59ed68 100644 --- a/src/lib/i18n/data.json +++ b/src/lib/i18n/data.json @@ -75,8 +75,8 @@ "tictactoe.draw": "It's a Draw!", "tictactoe.your-turn": "Your turn", "tictactoe.wait": "Wait for your turn", - "handbook.draft.title": "This is a draft", - "handbook.draft.description": "We're working on this page and it's due to be updated soon. Please check again later for some fresh new content.", + "handbook.draft.title": "This is a draft.", + "handbook.draft.description": "Our team is currently cracking away at creating more content to make our Handbook something increggdible. Soon, you'll be able to explore it fully. In the meantime, think of it as a carton of eggs, each section packed with the potential to deliver something eggceptional.", "draw-segg.title": "Your very own Segg?", "draw-segg.description": "Head over to our careers page, release your inner Basquiat and start your own Significa egg from scratch.", "draw-segg.cta": "Get my Segg", diff --git a/vercel.json b/vercel.json index 95c74a14..a5a88771 100644 --- a/vercel.json +++ b/vercel.json @@ -1,4 +1,7 @@ { + "installCommand": "npm ci --prefer-offline --no-audit --no-fund", + "buildCommand": "npm run build", + "framework": "sveltekit", "redirects": [ { "source": "/showcase/:path", "destination": "/projects/:path", "permanent": true }, {