Skip to content

3. Configure site wide settings

Dashpilot edited this page Jul 14, 2022 · 8 revisions

Settings

You can easily create site-wide settings, that users will be able to change via the interface. To create a new setting, just add a key/value pair under settings in data.json, for example:

"website_tagline": "Not Just Another Wordpress site"

Note that currently all settings will appear as a single-line input field in the interface.

Some settings come pre-configured with the CMS:

  • site_title - (optional) The website's title
  • preview_url - (optional) Link to the live site. Shown when the user clicks the "view site"-button. Leave empty if you don't want the "view site" button to show.
  • image_width - (required for image upload) Width that images should be resized to. The aspect ratio of the original image is preserved
  • gallery_image_width - (required for image upload) Width that gallery images should be resized to. The aspect ratio of the original image is preserved

UI settings

Unlike the site-wide settings above, the UI settings can not be edited by the user. You can edit them directly in data.json > ui_settings.

  • add_category - Defines if the user is allowed to add new categories (Boolean)
  • delete_category - Defines if the user is allowed to delete categories (Boolean)
  • add_post - Defines if the user is allowed to add new posts (Boolean)
  • delete_post - Defines if the user is allowed to delete posts (Boolean)
  • edit_content_types - Enable or disable the option to edit content types (forms and fields) through the UI (Boolean)
  • image_title: - Defines if gallery images can have a title. Optionally you can give the field a different name. Leave empty to hide the field (String)
  • image_alt: - Defines if gallery images can have an alt text. Optionally you can give the field a different name. Leave empty to hide the field (String)
  • saving_duration - Defines for how long the saving-spinner should be shown after pressing "save". This can be useful if publishing your site involves Git integration and/or a build step. Set it to the average time a each build step takes. Default 2000 (ms)
  • rte_buttons - Configure the button-toolbar of the TipTap rich text editor. Current options: ["bold", "italic", "link", "list", "h1", "h2", "h3", "image"] (Array)
  • custom_button and custom_button2 - add custom buttons in the left sidebar. Define as an object with properties title, link and (optional) icon. The icon can be any Font Awesome icon class. Example:
  "custom_button": {
      "title": "My Custom Button",
      "link": "#",
      "icon": "fas fa-flag"
  }
Clone this wiki locally