New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Auto-generated "Link preview" thumbnails for all pages #11186
Conversation
Heya! Thanks for this great improvement 🙂 Just so I don't merge this and nothing changes: What steps do we have to change to actually build the OG images in production? Looks like there's an addition CLI tool and build command? Could we update the |
Hey, my pleasure!! You don't need to build the images in the repo, they are rendered at the CDN-level when needed (when requested by a third party) and then they are cached. The CLI command is to "upload" the template to the service. I think it would be a good idea like you mentioned to add this in the build command. I will update the PR. This way, we will just need to update the HTML/CSS template to update the design and everything else will be automated 💯 |
Thank you! This looks great to me. For the breadcrumb, I was using Otherwise, this is ready to go from my end! |
@rijkvanzanten — can you confirm that the page title granularity is what we want? Just need to make sure the most relevant text (which may be an anchor) is what we surface. |
@rijkvanzanten I just pushed the integration with the build command :). However, someone will have to add the API key in the netlify config ( I think @benhaynes created an account a while back, you can use that one, or create a new one. Make sure the "handle" of the account is @benhaynes Noted for the breadcrumb that's also what I used!! Nifty feature of the Inter font :) Note for the link anchors (/path#anchor), those are not considered as a separate URL when sharing links, they are ignored so there is no way to detect them server-side unfortunately. |
I reserved |
6b51ec4
to
d59bfc3
Compare
👷 Deploy request for directus-docs accepted.
|
c96dc2b
to
b886219
Compare
As a follow up to #11137, this PR integrates auto-generated og:images with the thumbsmith service.
More precisely, it adds:
Requirement before merging:
A
THUMBSMITH_API_TOKEN
environment variable needs to be added in the netlify build configHere's some samples (with the updated design by @benhaynes 🚀 ):
Note on the breadcrumbs: I removed the "last element" in the breadcrumbs to match the new design. There was also a case where the breadcrumb was the same text as the page title which was weird (ex: Getting Started: Getting Started), in that case, the page name in the menu is used instead instead of the page title. (ex: Getting Started: Introduction)
Let me know what you think!! :)
cc @rijkvanzanten 🙏