adonisjs / v6-docs

Documentation website for AdonisJS v6
38 stars 53 forks source link

feat: og images #89

Closed Julien-R44 closed 1 month ago

Julien-R44 commented 1 month ago

Based on #86 -

Added OG image generation for each documentation page at build-time using an SVG template.

The implementation is a bit hackish:

We need add some hooks for allowing that in Dimmer. In the meantime, it work perfectly, so I don't think there's any hurry


The result

image image image image

Let me know if you like the OG template


Before merging :

Julien-R44 commented 1 month ago

if you can please give me the cloudflares logs to see why it's failing. but i think it's caused by sharp. if that's right, it's not a problem: we'll push the OG image to the repo, it was the initial goal

RomainLanz commented 1 month ago

if you can please give me the cloudflares logs to see why it's failing

The error is about the package-lock file being outdated.

npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

Could we make the summary/excerpt be the whole line? It seems cluttered right now.

We should also use the correct fonts:

Julien-R44 commented 1 month ago

The fonts are correct, they are encoded and inlined as base64 in the svg template

thetutlage commented 1 month ago

Seems like you have used pnpm on your local to install dependencies and therefore the package-lock.json file is not updated

cloudflare-pages[bot] commented 1 month ago

Deploying v6-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 12c1182
Status:🚫  Build failed.

View logs

Julien-R44 commented 1 month ago

Diff is totally messed up. I will reopen a PR