Admin Page Front Matter

Admin Page Front Matter (admin)

Defines settings for a Toroidal webring’s administration page in the front matter.

JSON Schema

Definition
{
  "$id": "https://platen.io/schemas/toroidal/content/admin/schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Settings for a Toroidal webring's administration page.\n\nhttps://platen.io/schemas/toroidal/content/admin/",
  "properties": {
    "admin_details": {
      "default": "default",
      "description": "Specifies the partial to use for the \"About Member Administration\" details\n\nhttps://platen.io/schemas/toroidal/content/admin/#admin_details",
      "oneOf": [
        {
          "enum": [
            "default",
            "none"
          ]
        },
        {
          "type": "string"
        }
      ],
      "title": "Administration Details"
    },
    "outputs": {
      "default": [
        "html",
        "toroidal"
      ],
      "description": "Define output formats for a page\n\nhttps://platen.io/schemas/toroidal/content/admin/#outputs",
      "items": {
        "type": "string"
      },
      "title": "Output Formats",
      "type": "array"
    },
    "type": {
      "description": "Specifies the content type that makes this an administration page.\n\nhttps://platen.io/schemas/toroidal/content/admin/#type",
      "enum": "toroidal/admin",
      "title": "Content Type"
    }
  },
  "required": [
    "type",
    "outputs"
  ],
  "title": "Admin Page Front Matter",
  "type": "object"
}

Required Properties

Content Type (type)

Specifies the content type that makes this an administration page. If this value isn’t set, the Toroidal module won’t process the page correctly. A webring without an administration page won’t work properly.

Output Formats (outputs)

Uses Hugo’s output formats to ensure that the Toroidal module can display the administration page for members to get their HTML snippets from and the JSON for the webring’s main list is created. Without the JSON, members have no way of getting updated member definitions and the random link functionality won’t work.

<h3 id="outputs.default">Default Value</h3>

[
  &#34;html&#34;,
  &#34;toroidal&#34;
]

Administration Details (admin_details)

This setting defines the partial to use for the “About Member Administration” details element in a webring’s administration page. It inherits the site’s toroidal.admin_details setting. You can set it to none to intentionally exclude the details.

The pre-defined options are:

  • default - Defined in layouts/partials/toroidal/adminDetails/default.md
  • none - Defined in layouts/partials/toroidal/adminDetails/none.md
  • platen - Defined in layouts/partials/toroidal/adminDetails/platen.md

On Platen sites, when the default details would be used, platen is used instead to account for the differences between a Toroidal webring on a Platen site.

Defining and Overriding Details #

You can override the pre-defined options by creating a file of the same name and path in your own site or module. You can also define entirely new options, as long as your partial is valid.

The partial must return valid HTML or an empty string. If it returns an empty string, the details element isn’t rendered.

The partial gets the page context for the webring administration page as input.

By default, this partial assumes that the specified details partial is a markdown file unless the name ends with a file extension. It also assumes that the partial is in layouts/partials/toroidal/adminDetails unless it has a path prefix, like myWebring/details.

For example, consider the following mapping:

  • default => toroidal/adminDetails/default.md on non-Platen sites
  • default => toroidal/adminDetails/platen.md on Platen sites
  • none => toroidal/adminDetails/none.md
  • myWebring/details => myWebring/details.md
  • notMarkdown.thml => toroidal/adminDetails/notMarkdown.html`

If the partial file name has the .md or .markdown extension, the partial renders the Markdown to HTML.

Edit this page