Skip to content

Instantly share code, notes, and snippets.

@thomascenni
Last active June 23, 2020 20:54
Show Gist options
  • Save thomascenni/0e3cbb8273339140bd37b8692441dc91 to your computer and use it in GitHub Desktop.
Save thomascenni/0e3cbb8273339140bd37b8692441dc91 to your computer and use it in GitHub Desktop.
#!/bin/bash
php -v
curl -LO https://cecil.app/cecil.phar
chmod +x cecil.phar
./cecil.phar -V
./cecil.phar new:site mywebsite
cd mywebsite
# add a blog page
../cecil.phar new:page blog/my-first-post.md
# now add some tags
cat << EOF > ./content/blog/my-first-post.md
---
title: 'my-first-post'
date: '2020-06-22'
draft: true
tags: ["tag 1", "tag 2"]
categories: ["Data Science"]
---
This is my first post.
EOF
# add a contact page
../cecil.phar new:page contact.md
cat << EOF > ./content/contact.md
---
title: "Contact"
layout: contact
menu:
main:
weight: 1
---
EOF
# define a custom layout for contact page
cat << EOF > ./layouts/contact.html.twig
<html>
<body>
Static contact page
</body>
</html>
EOF
# now serve
../cecil.phar serve --drafts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment