fabianmichael / kirby-meta

All-in-one solution to all of your SEO/OpenGraph/JSON-LD needs. 👀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Additional meta tags

Daandelange opened this issue · comments

Hello,
Do you have any plans on adding some extra meta tags ?
If so, would you like some help ?

Here's a list of some suggestions I could think of. Some could be optional (like Twitter), others on by default.

  1. Tags needing extra data fields :

    1. <meta content="Copyright 2012-2023 My Organisation" name="copyright">
      A content copyright indicator. Use a startyear, current year and owner name ? Or just a free field.
    2. <meta content="keyword1, keyword2" name="keywords" lang="en_GB">
      Keywords, similar to the meta description.
    3. <meta content="general" name="rating"> & <meta content="global" name="distribution">
      Content rating & distribution tags.
    4. <meta content="XXX" http-equiv="Last-Modified">
      Last modified date.
  2. Alternatives of existing data fields :

    1. <meta content="" name="owner"> & <meta content="" name="author">
      Site owner and content author as meta tags.
    2. og:image:secure_url
      Alternative og:image for HTTPS protocols.
    3. og:description
      OG content description (similar to the og:title).
    4. og:locale, og:locale:alternate
      Available translation indications.
    5. <link href="XXX" hreflang="en_GB" rel="alternate"> & <link href="XXX" hreflang="x-default" rel="alternate">
      Available translation indications + default language.
    6. <meta content="en_GB" http-equiv="content-language">
      Current locale indicator
    7. <meta content="Site Title" name="application-name"> & <meta content="XXX" name="apple-mobile-web-app-title">
      Some smartphone integration hints. Similar to the theme color for browsers.
    8. <link href="://url/" rel="start" title="Home Title"> & <link href="://url" rel="prev" title="PrevSiblingTitle"> & `
      Siblings navigation hints.
    9. <meta name="twitter:dnt" content="on">
      Twitter DNT protection for your visitors. more info.
  3. Improvements of existing tags :

    1. <meta content="image/png" property="og:image:type">
      Indicates the filetype of the OG image.
    2. <meta content="Index,Follow,notranslate" name="robots">
      Crawl settings in the meta tags.
    3. <meta content="no-cache" name="cache-control"> & <meta content="14 days" name="revisit-after">
      Sitemap priority & cache control settings as meta tags.
    4. <meta content="#000" media="(prefers-color-scheme: dark)" name="theme-color">
      Additionally indicate the light/dark setting for some browsers.
    5. <link href="http://xxxx/sitemap.xml" rel="sitemap" title="sitemap" type="application/xml">
      The sitemap linked in the meta tags.

@Daandelange Thanks for all the input. I’d be happy to investigate this further, but unfortunately I am currently lacking the resources to work on implementing any of these. But let me try to give quick feedback:

1.Tags needing extra data fields:

i. Great idea, but date handling is tricky. Maybe create a separate issue
ii. Opt-in if at all. Not used by Google anymore, maybe just relevant for things like Algolia. Would not implement this.
iii. Rating can also be defined via JSON-LD, would not add it

2. Alternatives of existing data fields:

As far as I know, most of these have fallbacks to other meta information (e.g. locale and content-language), so I wouldn’t bother. The last one (ix.) is very specific and opinionated and belongs into a Twitter-related plugin, not a general SEO solution.

Are the tags from viii. actually used by anything?

3. Improvements of existing tags :

i. Please go ahead if youlike
ii. This should be part of the plugin already or am I missing anything?
iii. I would need more background information to make a decision and whether this has some real-world benefit
iv. I added the theme-color option because that is something that is easily forgotten. If someone needs more fine-grained control, it can be added for individual project using a hook or written directly into the template. So I would not add it.
v. Is this used by anything? If so, I’d be happy to add it to the plugin.

Thanks for your feedback.

    1. [Copyright] Ok :) Handling only years should not be too painful.
    2. [Meta-Keywords] True, I might forget about these too, plus they are a pain to handle page-per-page.
    3. [Meta-Rating] Google needs it only for "adult" sites, in order to filter it out of safe-search without getting penalties. Not a lot of Kirby installations would need it though.
    • viii. [Prev-Next-Home] True, these settings kinda vanished nowadays.
    • xi. [Twitter-DNT] True, moreover the Twitter part is depreciated.
    • Why not make an opt-in option to output json-ld meta equivalents ? There are quite a lot already present and I think it could be a great addition.
      Field candidates :
      • 2.i [Author-and-Owner]
      • 2.ii [Secure-OG-Image]
      • 2.iii [OG-Description]
    • And maybe an opt-in provideExtendedMultilanguageMetaData option ?
      • 2.iv [OG-Locales-Alternatives]
      • 2.v [Meta-Locales-Alternatives] They seem useful for crawlers to index multilanguage websites. (Google uses them)
      • 2.vi [Meta-Locale]
    1. [OG-IMage-Type] Ok :)
    2. [Meta-Robots] I can't get them to show up, while the settings are in the panel. I'll check again.
    3. [Meta-cache-control] Sorry, this was rather an HTML alternative to Cache-Control headers and vanished.
    4. [Theme-FineTuning] Ok
    5. [Meta-XMLSiteMap] Sorry, urban legend.

1.i.: The main reason why I do not want to add this, is that there’s no standardized way in Kirby of supplying copyright information. So tapping into this calls for trouble/unwanted side-effects.
1.iii.: Yep, those who need it probably already know about it. :-)
2.JSON-LD: I think this just adds a bit of bloat, unless there’s some real-world benefits.
2.i.: See 1.i.
2.ii.: All of my current projecteds are served via HTTPs and seemingly, providing the secure_url does not provide any additional benefit, as OpenGraph images work fine either way. I guess, this is a leftover from the era before nearly everything was served via HTTPs.
2.iii.: There’s already a field in the metadata settings for that
2.iv, 2.v, 2.vi: Let’s add always add these, see #26. But this needs an additional API, because in some projects I got settings to hide additional languages or pages if translation is incomplete (and I am probably not the only one who needs this).
3.i.: Created a ticket, see #27
3.ii: Default value of robots is "all", so it is only necessary to tell crawlers what is disabled. I’ve opted to output <meta name="robots" content="all"> instead of omitting the robots tag to avoid confusio, see 7c7c42b

I am closing this now, since we got 2 separate tickets for the remaining tasks. Thanks for your input. :-)