Amadeus Builder Documentation

Making Websites


Prerequisite - to have amadeus running locally as per the setup.

Starting a New Website

  • Add a folder matching the name of your domain (yoursite for instance) to localhost and prepare to copy over multiple files from the amadeus folder.
  • Copy index.php file in the root folder and adjust the relative path of the entry.php (add a "../amadeus/" to it).
  • Copy .htaccess also from the root
  • Amadeus has the concept of "safeName", configured in cms.php which usually matches the site's folder name and is used for the logo / icon which files are expected. Therefore, if your safeName is "yoursite" then pls add icon-yoursite.png | logo-yoursite@2x.png | logo-yoursite.png.
  • Now create a "code" folder and copy the cms.php from it and make an empty functions.php
  • Open cms.php and change the name | byline | safeName, reset the version to 1 with the current date, include contact information, comment out image-in-logo for now and styles and scripts also update the social items
  • It is good to remember the fact that the urls inside the app are either relative (in content) or absolute (in the menu). It is mixed because the home page is one level up from the inner urls (we always end with a trailing slash). Hence change the url variable to match the site folder name for local and your domain name for the other. Do note that ternary conditions are used and it's a double ternary when maintaining preview subdomains separately.
  • Please also remove the section on "standalone.php". With this, the work on the code folder is done.
  • Add a "content" folder to the site root with and file and use the markdown syntax for it's content.
  • Add other file names in kebab casing and keep watching as they get added to the menu automatically on refresh. In the root content folder, Amadeus will recognize (in it's renderFile method) .html, .md, .php and .txt, using wordpress' wpautop (auto paragraph) function for txt files unless # or are detected.