Skip to content

Octofoo is a light and easy static blog/website generator written in PHP. It converts Markdown content, merges it with Twig layouts and generates static HTML files. It can also deploy these static files to github pages if you are publishing a blog.

License

Kandepet/OctoFoo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Q/A:

Requirements

Use

  • PHP 5.4+
  • Git (to deploy on GitHub Pages)

Install plugins

Development


Usage

Get OctoFoo

$ curl -SO http://hithub.com/HackerLabs/OctoFoo/master.zip

Initialize

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

Alias: $ php octofoo.php [folder] -i

Note: You can force initialization of an already initialized folder.

$ php octofoo.php [folder] --init=force

After --init, here's how the folder looks like:

[folder]
+-- _octofoo
    +-- assets
    |   +-- css
    |   +-- img
    |   +-- js
    +-- config.ini
    +-- content
    |   +-- *.md
    +-- layouts
    |   +-- *.html
    +-- router.php

config.ini

Website configuration file:

Site
Setting Description
name The name of your website
baseline The baseline of your website
description The description of your website
base_url The URL of your website
language The Language of your website (Use IETF format)
Author
Setting Description
name Your name
email Your e-mail address
home The URL of your own website
Deploy
Setting Description
repository The URL of the GitHub repository
branch The target branch name

layouts

Layouts folder: OctoFoo use Twig layouts (index.html by default) to generate static HTML files.

assets

Assets folder: CSS, Javascript, images, fonts, etc.

content

Content folder: Where you can put your content (in Markdown format).

Generate

Run the following command to generate your static website.

$ php octofoo.php [folder] --generate

Alias: $ php octofoo.php [folder] -g

After --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

Serve

Run the following command to launch the built-in server to test your website before deployment.

$ php octofoo.php [folder] --serve

Alias: $ 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

Deploy

Run the following command to deploy your website.

$ php octofoo.php [folder] --deploy

Alias: $ php octofoo.php [folder] -d

After --deploy, a "cached copy" of [folder] is created at the same level: [.folder].

You can chain options. For example, if you want to generate then deploy: $ php octofoo.php [folder] -gd

Note: This feature requires Git and a GitHub account.

About

Octofoo is a light and easy static blog/website generator written in PHP. It converts Markdown content, merges it with Twig layouts and generates static HTML files. It can also deploy these static files to github pages if you are publishing a blog.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages