Browse Source

docs: share page image

Jay V 7 months ago
parent
commit
969154a473
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/web/src/pages/s/[id].astro

+ 2 - 2
packages/web/src/pages/s/[id].astro

@@ -44,10 +44,10 @@ if (modelsArray.length === 1) {
   modelParam = modelsArray[0];
   modelParam = modelsArray[0];
 }
 }
 else if (modelsArray.length === 2) {
 else if (modelsArray.length === 2) {
-  modelParam = `${modelsArray[0]} & ${modelsArray[1]}`;
+  modelParam = encodeURIComponent(`${modelsArray[0]} & ${modelsArray[1]}`);
 }
 }
 else {
 else {
-  modelParam = `${modelsArray[0]} & ${modelsArray.length - 1} others`;
+  modelParam = encodeURIComponent(`${modelsArray[0]} & ${modelsArray.length - 1} others`);
 }
 }
 
 
 const ogImage = `${config.socialCard}/opencode-share/${encodedTitle}.png?model=${modelParam}&version=${version}&id=${id}`;
 const ogImage = `${config.socialCard}/opencode-share/${encodedTitle}.png?model=${modelParam}&version=${version}&id=${id}`;