Configuration

The configuration is defined in a YAML file named phpoole.yml, stored at the root of the Website (see an example).

Site configuration

Site configuration's keys must be set under the site key.
Example:

site:
    key: value
    googleanalytics: GA-123456

title

Main title of the site.

baseline

Short description (~ 20 characters).

baseurl

Base URL, must end with /. ie: http://localhost:8000/.

description

Site description (~ 250 characters).

taxonomies

List of vocabularies, paired by plural and singular value. ie: projects: project.

Could be disabled with disabled: true.

menu

PHPoole create a default menu named main.

Each menu entry must have:

  • id: unique identifier.
  • name: name used in layouts.
  • url: relative or absolute URL.
  • weight: used to order entries.

Menu entry can be disabled with disabled: true.

Example:

main:
    index:
        id: index
        name: Da home!
        url:
        weight: 1
    about:
        id: about
        disabled: true
secondary:
    narno:
        id: narno
        name: narno.org
        url: http://narno.org
        weight: 999

paginate

Pagination options:

  • disabled: enable or disable (boolean).
  • max: maximum pages by page (integer).
  • path: path to paginated page (string). page by default.

date

Date format and timezone:

  • date: The format specifier is the same as supported by date.
  • timezone: The date timezone. ie: Europe/Paris.

PHPoole configuration

content

  • dir: content (pages) directory.
  • ext: content files extensions.

frontmatter

  • format: front matter format. ie: yaml.

body

  • format: page body format. ie: md (for Markdown).

static

  • dir: static files directory.
  • exclude: list of files to exclude from copy.

layouts

  • dir: layouts directory.

output

  • dir: directory where rendered page are stored.
  • filename: index.html.

themes

  • dir: themes directory.

theme

If used, the name of the theme (sub-directory of themes).

Default configuration

This is a default configuration used by PHPoole on running. The local website configuration file owerride those keys if exists.

site:
    title: PHPoole
    baseline: 'A PHPoole website'
    baseurl: 'http://localhost:8000/'
    description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
    taxonomies: { tags: tag, categories: category }
    paginate: { max: 5, path: page }
    date: { format: 'j F Y', timezone: Europe/Paris }
content:
    dir: content
    ext: [md, markdown, mdown, mkdn, mkd, text, txt]
frontmatter:
    format: yaml
body:
    format: md
static:
    dir: static
layouts:
    dir: layouts
output:
    dir: _site
    filename: index.html
themes:
    dir: themes
generators:
    10: PHPoole\Generator\Section
    20: PHPoole\Generator\Taxonomy
    30: PHPoole\Generator\Homepage
    40: PHPoole\Generator\Pagination
    50: PHPoole\Generator\Alias
    35: PHPoole\Generator\ExternalBody
Suggest a modification