Automatically add <meta> tags for SEO and social networks.


Import this plugin in your _config.ts file to use it:

import lume from "lume/mod.ts";
import metas from "lume/plugins/metas.ts";

const site = lume();


export default site;

See all available options in Deno Doc.


This plugin generates <meta> tags in your HTML pages for Open graph, Twitter cards,, and SEO purposes. The data must be defined in the metas keyword of every page and the supported values are:

  • site: The name of the site.
  • title: The title of the page, article, post, etc.
  • lang: The language of the page.
  • description: Page description.
  • image: The main image of the page, article, post, etc.
  • icon: The logotype or icon of the site.
  • keywords: An array of keywords.
  • twitter: The twitter username.
  • color: The color theme of the website.
  • robots: Configuration for search engines (a boolean to enable/disable or a string with a custom value).
  • generator: The software that generated the page (Lume v1.x). It can be true to autogenerate or a string with a custom value.


In a data file (like /_data.yml) in the root of your project, add the default values.

  site: Oscar's blog
  twitter: "@misteroom"
  icon: /img/icon.png
  lang: en
  generator: true

  metas: object

The mergeKeys value allows overriding some values of metas in your pages. See Merged Keys documentation for more info.

You can complete the meta values with the specific values for every page. For example:

  title: Hello world
  description: My first post
  image: /hello-world.png

This is my first post

The output HTML page will include the <meta> tags with the result of merging the default values with the specific page values. It should be something similar to:

    <meta property="og:type" content="website">
    <meta property="og:site_name" content="Oscar's blog">
    <meta property="og:locale" content="en">
    <meta property="og:title" content="Hello world">
    <meta property="og:description" content="My first post">
    <meta property="og:url" content="">
    <meta property="og:image" content="/hello-world.png">
    <meta name="twitter:title" content="Hello world">
    <meta name="twitter:description" content="My first post">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:image" content="/hello-wold.png">
    <meta name="twitter:site" content="@misteroom">
    <meta itemprop="name" content="Hello world">
    <meta itemprop="description" content="My first post">
    <meta itemprop="image" content="/hello-world.png">
    <meta name="description" content="My first post">
    <meta name="generator" content="Lume v1.10.1">
    <p>This is my first post</p>