Table of Contents

About

Front Matter is a component that permits to replicate the metadata into your page.

This functionality is used when you want to:

  • move your pages and get the metadata in sync in other ComboStrap installation
  • get an history of the metadata modification
  • want to kept your short page id close to your page when using permant url

It borrows its name from the front matter book

The frontmatter is the source of truth for ComboStrap. Any value in the frontmatter will take precedence over the raw metadata or internal database metadata.

Example

A frontmatter is a block located at the start of your page that:

  • starts with ---json
  • contains a json document representing your metadata
  • end with ---

Example:

---json
{
    "name":"Short Name",
    "title":"My Big title in the Search Engine Result Pages",
    "description":"That's the article that you want to read!"
}
---

Replication

The frontmatter replication happens by default page by page when you submit the metadata manager form.

  • If you have just enabled the frontmatter in the configuration
  • And that you want to replicate the managed metadata for all pages
  • You can call the metadata-to-frontmatter command of the cli.
cd $DOKUWIKI_HOME
# optional (for farm)
animal=animal-directory-name
# command
php ./bin/plugin.php combo metadata-to-frontmatter

Configuration

enableFrontMatterOnSubmit

When the enableFrontMatterOnSubmit configuration, you will create a frontmatter when you submit the metadata manager form.

By default, this functionality is disabled if the page does not have already a frontmatter.