The easiest way to create a Phaistos template is to install the Phaistos templating client and use your favorite code editor.
Installing the templating client
To install the templating client, you need to have Node.js installed. Then you can switch to an empty directory and run the following code on your terminal and fill in your Project ID and api key:
> npm install -g phaistos-cli > phaistos init > phaistos watch
This will install the Phaistos templating client, connect the current directory to your Phaistos project and will start watching for file changes in your template files.
You can also edit the template directly in the Phaistos Template editor.
Coding your template
All the changes you make will be immediately pushed to the development template of your project. You can also run
phaistos push instead of
phaistos watch to push your changes to the development template manually. All the changes you make won't be reflected on the live site at this point.
To see how a Phaistos template is built, please check the Template structure and other sections of our templating docs. Or simply check the default Phaistos template on Github.
Publishing and reverting your changes
Once you feel comfortable with your changes, you can publish it by executing
To see a list of all available commands you can run