Skip to content

Commit

Permalink
Add TINA_SEARCH_TOKEN and have user profile pictures be downloaded at…
Browse files Browse the repository at this point in the history
… 16x16 instead of full size to save data

Fixes #186
  • Loading branch information
UnsignedArduino committed Oct 22, 2024
1 parent cb96f2b commit 63139fd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/components/Blog/Elements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function ShortAuthorRenderer({
<>
<AutoLink href={`https://github.com/${author}`}>
<AvatarImageRenderer
url={`https://github.com/${author}.png`}
url={`https://github.com/${author}.png?size=16`}
name={author}
/>{" "}
{author}
Expand Down
10 changes: 10 additions & 0 deletions tina/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
{
Expand Down
7 changes: 6 additions & 1 deletion tina/tina-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,12 @@
}
],
"config": {
"media": { "tina": { "publicFolder": "public", "mediaRoot": "" } }
"media": { "tina": { "publicFolder": "public", "mediaRoot": "" } },
"search": {
"tina": { "stopwordLanguages": ["eng"] },
"indexBatchSize": 100,
"maxSearchIndexFieldLength": 100
}
}
},
"lookup": {
Expand Down

0 comments on commit 63139fd

Please sign in to comment.