Skip to content

Commit 63139fd

Browse files
Add TINA_SEARCH_TOKEN and have user profile pictures be downloaded at 16x16 instead of full size to save data
Fixes #186
1 parent cb96f2b commit 63139fd

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ NEXT_PUBLIC_GROWTHBOOK_API_KEY=XXXXXXXXXXXXXXXX
2020
// TinaCMS
2121
NEXT_PUBLIC_TINA_CLIENT_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
2222
TINA_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
23+
TINA_SEARCH_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2324
TINA_PUBLIC_IS_LOCAL=true

src/components/Blog/Elements.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function ShortAuthorRenderer({
8484
<>
8585
<AutoLink href={`https://github.com/${author}`}>
8686
<AvatarImageRenderer
87-
url={`https://github.com/${author}.png`}
87+
url={`https://github.com/${author}.png?size=16`}
8888
name={author}
8989
/>{" "}
9090
{author}

tina/config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,27 @@ export default defineConfig({
1111

1212
clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID,
1313
token: process.env.TINA_TOKEN,
14+
search: {
15+
tina: {
16+
indexerToken: process.env.TINA_SEARCH_TOKEN,
17+
stopwordLanguages: ["eng"],
18+
},
19+
indexBatchSize: 100,
20+
maxSearchIndexFieldLength: 100,
21+
},
1422

1523
build: {
1624
outputFolder: "admin",
1725
publicFolder: "public",
1826
},
27+
1928
media: {
2029
tina: {
2130
mediaRoot: "",
2231
publicFolder: "public",
2332
},
2433
},
34+
2535
schema: {
2636
collections: [
2737
{

tina/tina-lock.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,12 @@
255255
}
256256
],
257257
"config": {
258-
"media": { "tina": { "publicFolder": "public", "mediaRoot": "" } }
258+
"media": { "tina": { "publicFolder": "public", "mediaRoot": "" } },
259+
"search": {
260+
"tina": { "stopwordLanguages": ["eng"] },
261+
"indexBatchSize": 100,
262+
"maxSearchIndexFieldLength": 100
263+
}
259264
}
260265
},
261266
"lookup": {

0 commit comments

Comments
 (0)