Skip to content

toastfront.json structure

Jemy SCHNEPP edited this page Aug 10, 2022 · 2 revisions

toastfront.json

Description

This is the toastfront configuration file

Structure

  • unsafe_vars (bool) [default: false] If set to true toastfront will not strip html tags present in the vars files
  • build_directory (string:folder) [default: build] The output build folder, will be created if it doesn't exist
  • source_directory (string:folder) [default: src] The sources folder, where your code is located
  • html_directory (string:folder) [default: html] The html sources folder relative to the source_directory folder, can be set to "." if you prefer having your html files at the root of your sources
  • languages (array:string) [default: ["en","fr"]] Every language in which your project will be built, set this to a single value if you only want to build the website in one language.
  • root_language (string) [default: ""] The main language of the website, if set, every other language will be built in a subfolder, if not set it will create a subfolder for each language
  • serve_config (object) Only used for toastfront serve
    • redirect_404 (string) [default: ""] If set server will not respond with 404 on page not found and will instead respond with 200 and serve the provided path
    • port (int) [default: 9100] The port on which the server will listen
  • builder_config (object) Undocumented: still subject to modifications
    • html (object)
      • vars_folder (string:folder) [default: vars] The html vars folder relative to the html_directory folder (mostly used for internationalization)
Clone this wiki locally