Pages #1

Open
opened 2020-10-17 14:18:30 +00:00 by w4rner · 9 comments
w4rner commented 2020-10-17 14:18:30 +00:00 (Migrated from github.com)

So what is supposed to happens to pages? This is my root url (should have the slickest og:image really!)
image

So what is supposed to happens to pages? This is my root url (should have the slickest og:image really!) <img width="1338" alt="image" src="https://user-images.githubusercontent.com/31451410/96339324-f01f1700-108b-11eb-9e67-57303667b6e1.png">
thatguygriff commented 2020-10-18 15:05:54 +00:00 (Migrated from github.com)

When the plugin is installed on a micro.blog hosted blog it will generate the appropriate meta tags in the <head></head> element for Open Graph previews places like Facebook and Twitter.

I notice in your screenshots that the url you are using is http://micro.blog/w4rner which is the timeline for your account on micro.blog and not the blog itself, https://w4rner.micro.blog, which does have tags

<meta property="og:locale" content="en">
<meta property="og:type" content="article">
<meta property="og:title" content="Laurence Warner (aka Cerulean) Writes">
<meta property="og:url" content="https://blog.w4rner.com/">
<meta property="og:site_name" content="Laurence Warner (aka Cerulean) Writes">

The missing property="og:image" tag on your main page is because your Hugo theme does not have any images in the Front matter for your main page.

When the plugin is installed on a micro.blog hosted blog it will generate the appropriate meta tags in the <head></head> element for Open Graph previews places like Facebook and Twitter. I notice in your screenshots that the url you are using is `http://micro.blog/w4rner` which is the timeline for your account on micro.blog and not the blog itself, `https://w4rner.micro.blog`, which does have <meta> tags ``` <meta property="og:locale" content="en"> <meta property="og:type" content="article"> <meta property="og:title" content="Laurence Warner (aka Cerulean) Writes"> <meta property="og:url" content="https://blog.w4rner.com/"> <meta property="og:site_name" content="Laurence Warner (aka Cerulean) Writes"> ``` The missing `property="og:image"` tag on your main page is because your Hugo theme does not have any images in the Front matter for your main page.
w4rner commented 2020-10-19 16:13:30 +00:00 (Migrated from github.com)

The url I'm using is actually https://blog.w4rner.com.
From this site,
image

Agreed, it stems from the Typerwriter default theme doesn't have any image specified in head. When you say front matter, do you just mean colloquially or Hugo specific?
I'm tryna advocate @manton to allow updating og: meta tags on default themes for mid-technical folks like me who don't wanna do custom theme. Please feel free to add your support!
Alternatively, is this something that could be solved with a plug-in, similar to the Plausible Analytics one I use, which seems to just inject this line in the head:

<script async defer data-domain="blog.w4rner.com" src="https://plausible.io/js/plausible.js"></script>
The url I'm using is actually https://blog.w4rner.com. From [this site](https://www.opengraph.xyz/url/https:%2F%2Fblog.w4rner.com/), <img width="1165" alt="image" src="https://user-images.githubusercontent.com/31451410/96476836-aa01b900-122d-11eb-81a2-838afb2a00ae.png"> Agreed, it stems from the Typerwriter default theme doesn't have any image specified in head. When you say front matter, do you just mean colloquially or [Hugo specific](https://gohugo.io/content-management/front-matter/)? [I'm tryna](https://micro.blog/w4rner/10432721) advocate @manton to allow updating og: meta tags on default themes for mid-technical folks like me who don't wanna do custom theme. Please feel free to add your support! Alternatively, is this something that could be solved with a plug-in, similar to the [Plausible Analytics one](https://github.com/LukasRos/plugin-plausible) I use, which seems to just inject this line in the head: <script async defer data-domain="blog.w4rner.com" src="https://plausible.io/js/plausible.js"></script>
thatguygriff commented 2020-10-20 00:01:24 +00:00 (Migrated from github.com)

I did mean Hugo specific front matter.

This is something that could be solved with a plug-in that lets you add configurable meta tags to the <head>. I actually stopped using a custom theme for my own blog’s custom them and moved the small changes I had into a template instead.

Maybe I will take a crack at such a plugin later this week

I did mean Hugo specific front matter. This is something that could be solved with a plug-in that lets you add configurable meta tags to the <head>. I actually stopped using a custom theme for my own blog’s custom them and moved the small changes I had into a template instead. Maybe I will take a crack at such a plugin later this week
w4rner commented 2020-10-20 07:56:59 +00:00 (Migrated from github.com)

Ahh please do! Happy to do a Code review for ya!

w4rner

Sent from my Doesnt.FlipPh.one

On Tue, Oct 20, 2020 at 1:01 AM, James Griffin notifications@github.com wrote:

I did mean Hugo specific front matter.

This is something that could be solved with a plug-in that lets you add configurable meta tags to the . I actually stopped using a custom theme for my own blog’s custom them and moved the small changes I had into a template instead.

Maybe I will take a crack at such a plugin later this week


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Ahh please do! Happy to do a Code review for ya! w4rner Sent from my Doesnt.FlipPh.one On Tue, Oct 20, 2020 at 1:01 AM, James Griffin <notifications@github.com> wrote: > I did mean Hugo specific front matter. > > This is something that could be solved with a plug-in that lets you add configurable meta tags to the . I actually stopped using a custom theme for my own blog’s custom them and moved the small changes I had into a template instead. > > Maybe I will take a crack at such a plugin later this week > > — > You are receiving this because you authored the thread. > Reply to this email directly, [view it on GitHub](https://github.com/thatguygriff/plugin-open-graph/issues/1#issuecomment-712505883), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AHP6SEXI7K4REDSEC2DK2BTSLTHOHANCNFSM4SUMPHVA).
w4rner commented 2020-10-20 18:04:06 +00:00 (Migrated from github.com)

Also, a note about optimization on the original og: plugin:
for og:description tags, 155-160 char is considered optimal by the SEO community to get search engines to actually use the description rather than their own, but also for other uses such as RSS feeds where you want to give a short preview.
In this example the generated description is way too long at 536 char. Looks like it just took all the text until it reached a non-text element (image): is that correct?
If so would you consider tweaking / suggest ways we can adapt our blogging to make it work?

Also, a note about optimization on the original og: plugin: for og:description tags, 155-160 char is considered optimal by the SEO community to get search engines to actually use the description rather than their own, but also for other uses such as RSS feeds where you want to give a short preview. In [this example](https://www.opengraph.xyz/url/https:%2F%2Fblog.w4rner.com%2F2020%2F09%2F28%2Fmaking-an-archive.html/) the generated description is way too long at 536 char. Looks like it just took all the text until it reached a non-text element (image): is that correct? If so would you consider tweaking / suggest ways we can adapt our blogging to make it work?
thatguygriff commented 2020-10-21 00:34:58 +00:00 (Migrated from github.com)

As far as the plugin is concerned it is just pulling the description metadata out of Hugo (and a few conditionals to account for pages instead of posts). There is no logic about generating the description content for a given Post/Page in this plugin, that is all handled in the Hugo Theme. If you want to make adjustments to how much content shows up in the open graph tags you can adjust how Hugo parses the content.

As for RSS feeds that wouldn’t have anything to do with the open graph tags. The RSS feeds do use the same description or summary source metadata from Hugo though so fixing the generation of Summary/Description would fix both RSS summaries and the Open Graph content

As far as SEO goes I don’t really give much thought to the area.

As far as the plugin is concerned it is just pulling the description metadata out of Hugo (and a few conditionals to account for pages instead of posts). There is no logic about generating the description content for a given Post/Page in this plugin, that is all handled in the Hugo Theme. If you want to make adjustments to how much content shows up in the open graph tags you can adjust how Hugo parses the content. As for RSS feeds that wouldn’t have anything to do with the open graph tags. The RSS feeds do use the same description or summary source metadata from Hugo though so fixing the generation of Summary/Description would fix both RSS summaries and the Open Graph content As far as SEO goes I don’t really give much thought to the area.
w4rner commented 2020-10-21 11:10:28 +00:00 (Migrated from github.com)

So would we have to do Micro.Blog custom theme in order to change how Hugo handles it (all micro.blog themes are Hugo right?).

On Oct 21, 2020, at 1:35 AM, James Griffin notifications@github.com wrote:

As far as the plugin is concerned it is just pulling the description metadata out of Hugo (and a few conditionals to account for pages instead of posts). There is no logic about generating the description content for a given Post/Page in this plugin, that is all handled in the Hugo Theme. If you want to make adjustments to how much content shows up in the open graph tags you can adjust how Hugo parses the content.

As for RSS feeds that wouldn’t have anything to do with the open graph tags. The RSS feeds do use the same description or summary source metadata from Hugo though so fixing the generation of Summary/Description would fix both RSS summaries and the Open Graph content

As far as SEO goes I don’t really give much thought to the area.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

So would we have to do Micro.Blog custom theme in order to change how Hugo handles it (all micro.blog themes are Hugo right?). > On Oct 21, 2020, at 1:35 AM, James Griffin <notifications@github.com> wrote: > > As far as the plugin is concerned it is just pulling the description metadata out of Hugo (and a few conditionals to account for pages instead of posts). There is no logic about generating the description content for a given Post/Page in this plugin, that is all handled in the Hugo Theme. If you want to make adjustments to how much content shows up in the open graph tags you can adjust how Hugo parses the content. > > As for RSS feeds that wouldn’t have anything to do with the open graph tags. The RSS feeds do use the same description or summary source metadata from Hugo though so fixing the generation of Summary/Description would fix both RSS summaries and the Open Graph content > > As far as SEO goes I don’t really give much thought to the area. > > — > You are receiving this because you authored the thread. > Reply to this email directly, [view it on GitHub](https://github.com/thatguygriff/plugin-open-graph/issues/1#issuecomment-713218600), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AHP6SESOT2KYXHGHTGOZRMLSLYUD7ANCNFSM4SUMPHVA).
thatguygriff commented 2020-10-21 12:22:17 +00:00 (Migrated from github.com)

I believe that a custom theme can alter how the front matter is generated. I haven't dug very far into Hugo so I am not sure how flexible the changes to front matter can be.

The content of this plugin is really just the default Hugo open graph template but I didn't want to have to maintain a custom theme just to enable it :)

I believe that a custom theme can alter how the front matter is generated. I haven't dug very far into Hugo so I am not sure how flexible the changes to front matter can be. The content of this plugin is really just the default Hugo open graph template but I didn't want to have to maintain a custom theme just to enable it :)
w4rner commented 2022-11-24 14:42:50 +00:00 (Migrated from github.com)

Update: Manton has now created a custom meta tag adder:
https://github.com/microdotblog/plugin-metatags
It would appear it adds the identical tags to every page's Head End, which obviously is way inferior to yours for posts, but might be worth it just to customize home page.
It would appear that browsers only accept the first meta tag they read and ignore subsequent, so to use his I believe you have to delete yours.

Just for clarity,
these are all the tags it had generated and were removed:

The one that tripped me out is description cos the default is empty
So dunno where Hugo is pulling that from (on my test blog's Simple theme).

Update: Manton has now created a custom meta tag adder: https://github.com/microdotblog/plugin-metatags It would appear it adds the identical tags to every page's Head End, which obviously is way inferior to yours for posts, but might be worth it just to customize home page. It would appear that browsers only accept the first meta tag they read and ignore subsequent, so to use his I believe you have to delete yours. Just for clarity, these are all the tags it had generated and were removed: <meta property="og:title" content="Draft Previews (do not share)" /> <meta property="og:description" content="Follow &lt;a href=&#34;https://micro.blog/warner&#34;&gt;@warner on Micro.blog&lt;/a&gt;." /> <meta property="og:type" content="article" /> <meta property="og:url" content="https://REDACTED.micro.blog/" /> <meta property="og:updated_time" content="2022-11-24T12:54:18&#43;00:00"/> The one that tripped me out is description cos the default <meta name="description" content=""> is empty So dunno where Hugo is pulling that from (on my test blog's Simple theme).
Sign in to join this conversation.
No description provided.