Rentry Metadata Docs

Metadata is Rentry's system that allows for full page customization while keeping its minimalistic style. It works by letting you add commands and values that each will modify the page in some way. See the Example tab for quick reference.

Each Option is part of a group that defines what it modifies. These groups are:

  • PAGE: Metadata for the web page, such as page title.
  • SHARE: Metadata for the web page to be used as snippets by other websites, such as Twitter or Google.
  • OPTION: Options that control how the page functions.
  • ACCESS: Accesibility options or view preferences.
  • CONTAINER: Controls for the box surrounding the content on the page.
  • CONTENT: Controls for the content itself.
  • SECURITY: Coming soon!
  • CONTROL: Coming soon!

Options always start with their respective group name, for example: SHARE_TITLE

Each Option may have a fixed list or range of Values, explained on this page. If you get it wrong, the error message should provide detailed feedback.

General Use

To list a metadata option, you must add it to a new line in the metadata box with the format: OPTION = value

A single Option can have multiple values, separated by spaces, that will control it in more detail or for different situations. For example, giving two values to CONTENT_TEXT_COLOR will set the color for light and then dark mode.

Value Mapping: Some Options with multiple values will behave slightly differently depending on how many values you give. For example, CONTAINER_PADDING can be given one, two, three or four values. Using fewer than 4 will re-use the same values again for different sides of the container. To describe this we will provide a value mapping for each Option and count, to show you what the behavior will be.
If giving CONTAINER_PADDING 4 values, these will be applied in the following way:
Top Right Bottom Left
CONTAINER_PADDING = 5px 10px 20px 40px
This is how it will be applied: top = 5px, right = 10px, bottom = 20px, left = 40px

Value Lists: Other Options with multiple values will affect more things as values are added. For example, FONT_SIZE will change more types of content as more values are added.
Within this helpsheet, we will list what each value does and in what order. Content font looks like this (commas just for clarity here, don't use them):
CONTENT_FONT = base, p, h1, h2, h3, h4, h5, h6, li, link, quotes, code
And as a real world example:
CONTENT_FONT = 12px 1.5rem 5rem 4rem 3.5rem 3rem 2.8rem 2.5rem 1.5rem 1.5rem 2rem 1.3rem

Units: Each Option has a set list of possible values that are then validated to ensure they are permitted. When these values are numbers they may be qualified by a unit, such as px: 4px. Each Option has a list of available units and a range of available values for each unit. This means that it might be possible to set as high as 1500px but only up to 100%.

Decimals: Some Values can be decimals and each have a limit to the amount of numbers allowed after the decimal place.

Require and Require one tell you when an Option must be paired with another Option. With Require, all listed Options must be present. With Require one, only one of them must be present.

Validations

Each Value submitted is validated according to an internal checking system that is re-used between different Options. This means that we can explain them here:

  • max_length: All Options have a max length. This is the total number of characters that can be submitted for this option.
  • color_name: A color listed within this page (this is the same as the available colors for inline text color) /rentry-text-colors
  • color_hex: A color defined as a hex (base16). These start with a # and have exactly 3, 6 or 8 letters or numbers afterwards, in the range 0-9 and A-F. When there are 3, the characters are repeated to make them 6 internally. When there are 8, the last two control transparency.
    For example: #abc123
    Color picker that supports transparency and outputs as a hex
  • color_rgba: A color defined as a RGBA (red green blue alpha). These have the format RGBA(0, 0, 0, 1). Each of the first three numbers can be between 0 and 255. The fourth number can be a decimal between 0 and 1.
    For example: RGBA(255, 0, 120, 0.9)
    Color picker that outputs RGBA
  • css_size: A number followed by one of the listed units, within the listed range. If no-unit, then this requires a bare number.
  • whitelisted_string: One of the words listed.
  • font_name: A name of a Google font, with all spaces replaced with underscores. https://fonts.google.com/
  • url: A link, optionally starting with https:// or http://, followed by any number of subdomains, a domain, a page location, a dot and a TLD.
  • bool: true or false
  • rentry_url: A full rentry URL or a /shorthand-url
  • rentry_url_exists: A check to see if the entered URL ever existed
  • rentry_url_enabled: A check to ensure the entered URL is currently active and not deleted or disabled.

Tips

You may not list the same option more than once.

The metadata validator is ultra-strict, meaning you can only put in information that is permitted.

Most Options do not have default values. To use the default, just delete the Option.

Metadata Options