From 4ed8590cd672c3adfa02857db3a7143ce8891cf0 Mon Sep 17 00:00:00 2001 From: arhimede Date: Tue, 15 Sep 2026 20:37:13 +0300 Subject: [PATCH] Use a real asset in the card example Signed-off-by: arhimede --- docs/book/v1/how-tos/twitter-opengraph-cards.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/book/v1/how-tos/twitter-opengraph-cards.md b/docs/book/v1/how-tos/twitter-opengraph-cards.md index 5f72248..bd89b8b 100644 --- a/docs/book/v1/how-tos/twitter-opengraph-cards.md +++ b/docs/book/v1/how-tos/twitter-opengraph-cards.md @@ -10,14 +10,14 @@ Make sure to update all items based on your page content. - + - + ``` @@ -26,4 +26,5 @@ In the example: - `{{ url('app::index') }}` is the absolute URL of the homepage, and `url()` returns an absolute URL for any route name, which is what cards require — you can point a card at another page the same way, just like the canonical URL does in `{% block canonical %}{{ url(routeName ?? null) }}{% endblock %}`. - The `block` item is present to mitigate for not-found pages, e.g. when the url is typed incorrectly. - Card images must be absolute URLs too, but `asset()` on its own returns a path, so it is wrapped in `absolute_url()`. -The image from `{{ absolute_url(asset('images/app/My-image.png')) }}` is found in `public/images/app/PHP-REST-API.png`, but it is copied there by the `npm` script from `src/App/assets/images/PHP-REST-API.png`. +The image in the example, `images/app/logo.png`, is served from `public/images/app/logo.png`, where the Vite build copies it from `src/App/assets/images/logo.png`. +Replace it with your own card image by adding the file to `src/App/assets/images/` and rebuilding.