OctoFoo is a light and easy static website generator written in PHP. THis is a heavily hacked fork of PHPoole by Arnaud Ligny (https://github.com/Narno/PHPoole). It takes your content (written in Markdown format), merges it with layouts (Twig templates) and generates static HTML files that can be used for any website or blog. It also has the ability to deploy the static HTML directly to github pages.
- Why the name OctoFoo? It is based on the popular static blog generator OctoPress. The Foo signifies that this can be used to publish any static site, not just a blog.
- Is OctoFoo is stable? It is still in development, be careful!
- Is there a demo? Yes there is, see http://hackerlabs.org/. The source for that is located at http://github.com/HackerLabs/HackerLabs.github.io
- How to get support? Through GitHub issues system
- Can I contribute? Yes you could submit a Pull Request on GitHub
- Composer (to install and update)
$ curl -SO http://hithub.com/HackerLabs/OctoFoo/master.zip
Once OctoFoo is downloaded, run the following command to build all files you need (in the curent or target folder).
$ php octofoo.php [folder] --init
$ php octofoo.php [folder] -i
Note: You can force initialization of an already initialized folder.
$ php octofoo.php [folder] --init=force
--init, here's how the folder looks like:
[folder] +-- _octofoo +-- assets | +-- css | +-- img | +-- js +-- config.ini +-- content | +-- *.md +-- layouts | +-- *.html +-- router.php
Website configuration file:
||The name of your website|
||The baseline of your website|
||The description of your website|
||The URL of your website|
||The Language of your website (Use IETF format)|
|Your e-mail address|
||The URL of your own website|
||The URL of the GitHub repository|
||The target branch name|
Layouts folder: OctoFoo use Twig layouts (
index.html by default) to generate static HTML files.
Content folder: Where you can put your content (in Markdown format).
Run the following command to generate your static website.
$ php octofoo.php [folder] --generate
$ php octofoo.php [folder] -g
--generate, here's how the folder looks like:
[folder] +-- _octofoo | +-- [...] +-- _octofoo_static_site | +-- assets | | +-- css | | +-- img | | +-- js +-- robots.txt +-- sitemap-index.xml +-- sitemap.xml +-- *.html
Run the following command to launch the built-in server to test your website before deployment.
$ php octofoo.php [folder] --serve
$ php octofoo.php [folder] -s
Then browse http://localhost:8000 or [http://<YOUR HOST/IP>:8000](http://<YOUR HOST/IP>:8000).
You can chain options. For example, if you want to generate then serve:
$ php octofoo.php [folder] -gs
Run the following command to deploy your website.
$ php octofoo.php [folder] --deploy
$ php octofoo.php [folder] -d
--deploy, a "cached copy" of
[folder] is created at the same level:
You can chain options. For example, if you want to generate then deploy:
$ php octofoo.php [folder] -gd