Skip to content

Instantly share code, notes, and snippets.

@RickCogley
Last active May 15, 2025 00:15
Show Gist options
  • Save RickCogley/22debf4165512c116283455e855f440a to your computer and use it in GitHub Desktop.
Save RickCogley/22debf4165512c116283455e855f440a to your computer and use it in GitHub Desktop.
Lume v3 default tags exploration

If I add a default keywords string to the metas settings, say in src/_data.yml like this:

...
metas:
    lang: en
    ...
    default_keywords: [aaaaa,bbbbb,ccccc]
    keywords: "=tags || =default_keywords"
    ...

...then I get what you can see in 2. example source.html, metas plugin just adds them as arbitrary meta tags. Conversely the actual keywords meta is not populated, for a page without any tags set.

If I add a default keywords string outside the metas settings in src/_data.yml like this:

...
default_keywords: [aaaaa,bbbbb,ccccc]
metas:
    lang: en
    ...
    keywords: "=tags || =default_keywords"
    ...

...nothing happens. The actual keywords meta is not added, for a page without any tags set, nor are any meta tags added.

Similarly, if I add the defaults into src/en/pages/_data.yml, where the page lives, like this

lang: en
default_keywords: [aaaaa,bbbbb,ccccc]
templateEngine:
  - vto
  - md

...nothing happens, and you don't see these in the source of the page with no tags set, in any way.

<meta name="twitter:label2" content="Reading Time">
<meta name="twitter:data2" content="2 min">
<meta name="default_keywords" content="aaaaa">
<meta name="default_keywords" content="bbbbb">
<meta name="default_keywords" content="ccccc">
<link rel="alternate" hreflang="ja" href="http://localhost:3000/thank-you/">
<link rel="alternate" hreflang="en" href="http://localhost:3000/en/thank-you/">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment