Metadata

Almost all websites have a <head> section where users can configure many aspects of the website. This includes, but not limited to:

  • The title of the page (what you see on your tabs)
  • The thumbnail preview of the page (when you share links with friends)
  • The preview description of the page (when you share links with friends)
  • Whether a bot should scrape this website (like Google's search engine)
Ammonite allow users to configure these using a YAML config at the top of each page.

Usage

To get started, first create a block separated by three dashes at the top of the Markdown document. Inside this block, we can specify a YAML document with a version attribute and a page attribute. Under the page attribute, we can specify a title attribute. As Ammonite continues to add features, it is necessary to specify what version of the metadata we want to use, in case there are breaking changes introduced in the future. The title lets us set the title of our page.

---
version: 1
page:
  title: My first page with a title
  description: Hello world
---

Parameters

Row #1
Name
version
Type
int
Description
As the platform grows, new features will be added and a versioning system is required to indicate what features should be available
Row #2
Name
page
Type
Object
Description
Sets the metadata of the web page

Page Parameters

Row #1
Name
title
Type
String
Description
Sets the title of the web page
Row #2
Name
description
Type
String
Description
Sets the description of the web page for Google Search, Twitter preview, etc.
Row #3
Name
thumbnail_url
Type
String
Description
Sets the thumbnail image of the web page for Google Search, Twitter preview, etc.

Example

---
version: 1
page:
  title: My web page title
  description: This is my web page
  thumbnail_url: https://ammonite.dev/assets/abc.png
---