How to get Google Images to pick up image titles from Hugo website when using Shortcodes? - hugo

I have a Hugo v0.74.3 home run website and it has some pictures on it.
I declare these pictures in the markdown as shortcodes, i.e.
{{<figure src="./media/trng-dilemma.png"
title="The TRNG dilemma."
alt="The TRNG dilemma: Are any true random number generators really random given the stakes and circumstances?" >}}
which Hugo converts to the following HTML:-
<figure>
<img src="./media/trng-dilemma.png" alt="The TRNG dilemma: Are any true random number generators really random given the stakes and circumstances?">
<figcaption>
<h4>The TRNG dilemma.</h4>
</figcaption>
</figure>
And it all renders correctly :-) But you see that the title text is now a figcaption. So the problem: Google Images displays that image as:-
It has not picked up the figcaption at all. Despite Google stating that they suck up figcaptions. Neither the alt text. It's actually displaying the website main title:part of the meta description and home URL. And Google does that for all of my images anywhere on the site :-(
This seems to be the intended behaviour, but it doesn't seem right to me as part of the site's informatics gets lost.
Q: How can I get my image title to be displayed by Google Images?

Related

React-Quill, videos are not displayed at all. Only other tags/images, I can't understand why

I have a couple objects created using the React-Quill editor and some contain images while others contain videos. The ones containing images are rendered back in my app without issue but the ones with videos end up rendering while ignoring all video tags.
For example this is one set of data:
<p>Some text</p><video class="quill-upload-video" src="https://res.cloudinary.com/hidden-bucket/video/upload/v1670504722/InspirationMedia/hvnctjls3jpglucerfso.mov" controls="true" controlslist="nodownload" width="100%"></video><p>Some more text</p>
Quill renders both paragraph tags and absolutely ignores the video tag as though it isn't there. This is not an issue for images.
Is there an explanation for this? How can I troubleshoot the problem?

Issue with next/image in NextJS V12.3.0 specifically with alt attribute

I use next/image to render images on the site and set the alt tag appropriately. The images I use originate from a CDN. I have a NextJS-based repository. The issue is that, despite the fact that the image is rendering correctly, whenever I check my site's Google cache and switch to the text-only version, Google attempts to replace the image with the text specified in the alt attribute, which is somehow repeating itself. As a result, instead of displaying "Some Image ALT," Google displays "Some Image ALTSome Image ALT."
Here's my implementation for reference:
<div className="videoCard__image">
<Image
src={bannerUrl}
alt={titleLabel}
layout="responsive"
width={123.6}
height={120}
className="videoCard__image--banner"
priority={loadPriority}
sizes="33vw"
quality={80}
/>
<PlayCircleOutline className="videoCard__image--play-icon" />
</div>
Rendered image HTML from next/image ->
Rendered image HTML from next/image
Google cache text only version ->
Google cache text only version
Expectation: ALT attributte text to occur to once instead of twice.

Replace the default block with figure

Currently, i'm buiding my rich text editor with quill and i need to create an embed for images. Before quill, i used to use redactor and i try to move to redactor. But, i already have 2 version of data from redactor before where the users is already uploaded images.
Version 1:
<p>
<img src="http://lorempixel.com/400/200/" data-image="5bb71bdc65465e0675ba" class="img-fluid img-responsive">
</p>
Version 2:
<figure>
<img src="http://lorempixel.com/400/200/" data-image="1bdc65465e0675ba1b2b" class="img-fluid img-responsive">
</figure>
Expected behavior:
I expect to replace the p with figure on initial parsing in quill. So, all the images have same parent figure
Actual behavior
figure is always deleted by default
I tried to register figure with blots/block/embed but i can't check and add the figure if the image doesn't have figure on its parent
Thank you

Error using md-grid-list on smaller screen size

I am building a mobile website that displays a grid-list of products.
In order to implement the grid list I am making use of md-grid-list directive of angular material.
This is the part of my code that implements the above functionality:
<div id="products-row" infinite-scroll="fetchNextPage(nextCategory,1)" infinite-scroll-disabled="busy">
<md-grid-list md-cols-gt-md="3" md-cols-md="2" md-cols-sm="1" md-gutter="5px" md-row-height="2:1">
<md-grid-tile ng-repeat="p in productsOfCurrentCat">
<product data="p" id="product-item"></product>
</md-grid-tile>
<div ng-show="busy">Loading more products....</div>
</md-grid-list>
</div>
This works quite well on larger screen size. When I view the webpage on a smaller screen size using the toggle device mode of Google Chrome, I get the following error:
md-grid-list: md-cols attribute was not found, or contained a non-numeric value
And, it infinitely sends requests to the node server.
I tried to google it out, but not enough help is available. Any help on this forum would be appreciated.
Well, the error tells you that you are missing md-cols for the breakpoint that fits your chosen device.
If you look at the layout breakpoint introduction here and the grid-list demo here, you will find out, that you are missing the md-cols-xs="1" attribute. sm is not the smallest breakpoint.

How does Google+ contact process glass shared timeline items?

I am testing out the mirror api and so far I have a sample app running nicely.
The issue I am having is that I added a menu item for the action 'SHARE' but when I try to share the timeline card created by my app to Google+ it posts an empty Google+ post. The only text in the Google+ post is #throughglass. The contents of the timeline card is some simple html (see below) which renders find on glass. I also set the speakable text which works great with the 'READ_ALOUD' menu action. What gives on the 'SHARE' action, am I missing something?
Link to Google+ post
Timeline Item html:
<article class="auto-paginate">
<section>
<p class="text-auto-size">
Hello Word.
</p>
</section>
</article>
Each application is free to choose what, from the shared timeline item, it will use as part of the share command. The Google+ Glassware appears to use the text field only when sharing a textual item and ignores the html field.
(This makes some sense. Google+ can't display the HTML formatting, so it chooses to go with the text that it knows should be good.)
When you're writing Glassware, you should make sure both the text and html (and speakableText, for that matter) fields contain the correct representation of your item.

Resources