This guide walks you through creating your first Cecil website, previewing it locally, then building and deploying it.
You can create a new website from scratch in a few minutes.
Follow the steps below to create your first Cecil website.
:::info Demo of the expected result: https://cecilapp.github.io/skeleton/. :::
- PHP 8.3+
- Terminal (a basic understanding of the terminal)
- Text editor, such as VS Code and/or Typora
::::steps
Download cecil.phar from your terminal:
curl -LO https://cecil.app/cecil.pharYou can also download Cecil manually, or install it globally with a package manager, then run cecil instead of php cecil.phar:
:::code-group
brew install cecilapp/tap/cecilscoop install https://cecil.app/scoop/cecil.json:::
See Installation for other methods.
Create a directory for the website (e.g. <mywebsite>), put cecil.phar in it, then run the new:site command:
php cecil.phar new:siteRun the new:page command:
php cecil.phar new:pageNow you can edit the newly created page with your Markdown editor: <mywebsite>/pages/<new-page>.md.
:::tip We recommend using Typora to edit your Markdown files. :::
Run the following command to create a preview of the website:
php cecil.phar serveThen navigate to http://localhost:8000.
:::info
The serve command runs a local HTTP server and a watcher: if a file (a page, a template or the config) is modified, the browser’s current page is automatically reloaded.
:::
When you are satisfied with the result, you can generate the website in order to deploy it to the Web.
Run the following command to build the website:
php cecil.phar buildYou can now copy the content of the _site directory to a Web server 🎉
::::
:::tip To deploy automatically on each push to your Git repository, see Deploy. :::
