From 63139fd3a4d37dd8fe9dc18282c63770479a1721 Mon Sep 17 00:00:00 2001 From: Cyrus Yiu Date: Mon, 21 Oct 2024 22:44:54 -0400 Subject: [PATCH] Add TINA_SEARCH_TOKEN and have user profile pictures be downloaded at 16x16 instead of full size to save data Fixes https://github.com/UnsignedArduino/Awesome-Arcade/issues/186 --- .env.sample | 1 + src/components/Blog/Elements.tsx | 2 +- tina/config.ts | 10 ++++++++++ tina/tina-lock.json | 7 ++++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index 49f5487..b4b3693 100644 --- a/.env.sample +++ b/.env.sample @@ -20,4 +20,5 @@ NEXT_PUBLIC_GROWTHBOOK_API_KEY=XXXXXXXXXXXXXXXX // TinaCMS NEXT_PUBLIC_TINA_CLIENT_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX TINA_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +TINA_SEARCH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX TINA_PUBLIC_IS_LOCAL=true diff --git a/src/components/Blog/Elements.tsx b/src/components/Blog/Elements.tsx index 2f73976..c6d65f9 100644 --- a/src/components/Blog/Elements.tsx +++ b/src/components/Blog/Elements.tsx @@ -84,7 +84,7 @@ export function ShortAuthorRenderer({ <> {" "} {author} diff --git a/tina/config.ts b/tina/config.ts index 5eb3fe3..0e615cc 100644 --- a/tina/config.ts +++ b/tina/config.ts @@ -11,17 +11,27 @@ export default defineConfig({ clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID, token: process.env.TINA_TOKEN, + search: { + tina: { + indexerToken: process.env.TINA_SEARCH_TOKEN, + stopwordLanguages: ["eng"], + }, + indexBatchSize: 100, + maxSearchIndexFieldLength: 100, + }, build: { outputFolder: "admin", publicFolder: "public", }, + media: { tina: { mediaRoot: "", publicFolder: "public", }, }, + schema: { collections: [ { diff --git a/tina/tina-lock.json b/tina/tina-lock.json index 58a19e9..186998b 100644 --- a/tina/tina-lock.json +++ b/tina/tina-lock.json @@ -255,7 +255,12 @@ } ], "config": { - "media": { "tina": { "publicFolder": "public", "mediaRoot": "" } } + "media": { "tina": { "publicFolder": "public", "mediaRoot": "" } }, + "search": { + "tina": { "stopwordLanguages": ["eng"] }, + "indexBatchSize": 100, + "maxSearchIndexFieldLength": 100 + } } }, "lookup": {