Skip to content

Commit

Permalink
Update .eleventy.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertJGabriel committed Jan 29, 2024
1 parent 1ad9d9a commit 316b321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ const createSocialImageForArticle = (input, output) =>
const imagePosition = { w: 100, h: 100, x: 360, y: 260 };
const titleY = 300;
const titleLineHeight = 50;
const authorY = titleText[1] ? 510 : 465; // Adjusted author's Y position


const canvas = createCanvas(width, height);
const context = canvas.getContext('2d');

Expand All @@ -53,6 +52,7 @@ const createSocialImageForArticle = (input, output) =>
if (titleText[1]) {
context.fillText(titleText[1], 485, titleY + titleLineHeight);
}
const authorY = titleText[1] ? 510 : 465; // Adjusted author's Y position

context.font = "20pt 'PT Sans'";
context.fillText(`${post.author} - ${post.tagline}`, 485, authorY);
Expand Down

0 comments on commit 316b321

Please sign in to comment.