From 6026c006db58108f251833536d8134a003fd7a12 Mon Sep 17 00:00:00 2001 From: Isaac Mills Date: Sat, 20 Apr 2024 17:19:14 -0400 Subject: [PATCH] Add opengraph image generation --- .woodpecker.yml | 1 + templates/article.html | 10 +++--- templates/opengraph.svg | 78 ++++++++++++++++++++++++++++++++++++++++ templates/opengraph.toml | 10 ++++++ 4 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 templates/opengraph.svg create mode 100644 templates/opengraph.toml diff --git a/.woodpecker.yml b/.woodpecker.yml index 391c920..e89d049 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -7,3 +7,4 @@ steps: - bruin-journal-gen volumes: - /var/woodpecker:/var/woodpecker + - /usr/share/fonts:/usr/share/fonts diff --git a/templates/article.html b/templates/article.html index 59efb62..4b82aab 100644 --- a/templates/article.html +++ b/templates/article.html @@ -11,14 +11,14 @@ - + + - - - + + @@ -82,4 +82,4 @@ - + \ No newline at end of file diff --git a/templates/opengraph.svg b/templates/opengraph.svg new file mode 100644 index 0000000..333193b --- /dev/null +++ b/templates/opengraph.svg @@ -0,0 +1,78 @@ + + + + diff --git a/templates/opengraph.toml b/templates/opengraph.toml new file mode 100644 index 0000000..9930beb --- /dev/null +++ b/templates/opengraph.toml @@ -0,0 +1,10 @@ +faces = ["/usr/share/fonts/noto/NotoSans-Bold.ttf"] + +[[text]] +x = 435.15115 +y = 8.0 +width = 736.84885 +height = 594.60768 +value = "{{title}}" +font = "Noto Sans" +bold = true