Settings

Repository Settings (settings)

Platen is designed with version control in mind. These settings inform Platen about the version control host you’re using

JSON Schema

Definition
{
  "$id": "https://platen.io/modules/platen/config/site/repository/settings/schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Settings defining how the Platen site is version controlled\n\nhttps://platen.io/modules/platen/config/site/repository/settings/",
  "properties": {
    "commit_path": {
      "default": "commit",
      "description": "Sets the repository-relative path for the \"See this page's source\" link.\n\nhttps://platen.io/modules/platen/config/site/repository/settings/#commit_path",
      "title": "Commit Path",
      "type": "string"
    },
    "content_root": {
      "description": "Specifies the path to the content folder relative to the repository root.\n\nhttps://platen.io/modules/platen/config/site/repository/settings/#content_root",
      "title": "Repository-Relative Content Folder",
      "type": "string"
    },
    "edit_path": {
      "default": "edit/main",
      "description": "Sets the repository-relative path for the \"Edit this page\" link.\n\nhttps://platen.io/modules/platen/config/site/repository/settings/#edit_path",
      "title": "Edit Path",
      "type": "string"
    },
    "mounted_paths": {
      "description": "Specifies maps for mounted content paths from repository-relative to site-relative.\n\nhttps://platen.io/modules/platen/config/site/repository/settings/#mounted_paths",
      "items": {
        "$ref": "https://platen.io/modules/platen/config/site/repository/mounted_path/schema.json"
      },
      "title": "Mounted Content Paths",
      "type": "array"
    },
    "url": {
      "description": "Defines the URL to the root of the repository on your version control host.\n\nhttps://platen.io/modules/platen/config/site/repository/settings/#url",
      "title": "Repository URL",
      "type": "string"
    }
  },
  "title": "Repository Settings",
  "type": "object"
}

Repository URL (url)

Defines the URL to the root of the repository on your version control host.

Commit Path (commit_path)

Sets the repository-relative path for the “See this page’s source” link.

Edit Path (edit_path)

Sets the repository-relative path for the “Edit this page” link.

Repository-Relative Content Folder (content_root)

Specifies the path to the content folder relative to the repository root. This is different from Hugo’s contentDir setting, which specifies the path to the content folder relative to the Hugo project’s root.

This value is useful for defining the URLs for the “Edit this page” links, which need to point to where the file is located in the repository, not in the site layout. If your Hugo site isn’t defined in a subfolder in your repository, you don’t need to use this setting.

Platen will attempt to use Hugo’s contentDir parameter to resolve the file paths for you if it’s set. It will trim any leading ../ from the value. If the automatic resolution for the value still gives you an incorrect URL, use this setting to define it explicitly.

Mounted Content Paths (mounted_paths)

Specifies maps for mounted content paths to enable accurate and functional URLs for the “Edit this page” links when your site has mounted content. If you’re not using Hugo modules to mount content from outside of your content directory, this setting does nothing.

You can use this setting to correctly map to files in the same repository, another repository, or skip them entirely for a set of mounted content.

Edit this page