Configuration

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

Website configuration

Configuration exposed to layouts is 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 a trailing slash (/).

Example: http://localhost:8000/.

description

Site description (~ 250 characters).

taxonomies

List of vocabularies, paired by plural and singular value.

Example: projects: project.

Could be disabled with disabled: true.

menu

Each menu entry must have the following items:

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

PHPoole create a default menu (main) with home page and sections. A menu entry can be disabled with disabled: true.

Example:

site:
  menu:
    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:

  • max: maximum listed pages (integer).
  • path: path to paginated page (string). page by default.
  • disabled: enable or disable (boolean).
  • homepage: section pages listed on home page. section: blog 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.

Global 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).

drafts

Build website with drafts or not. false by default.

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.'
  taxonomies:
    tags: tag
    categories: category
  paginate:
    max: 5
    path: page
  date:
    format: 'j F Y'
    timezone: Europe/Paris
  fmpages:
    robotstxt:
      layout: robots.txt
      permalink: robots.txt
    sitemap:
      layout: sitemap.xml
      permalink: sitemap.xml
      changefreq: monthly
      priority: 0.5
    404:
      layout: 404.html
      permalink: 404.html
    rss:
      layout: rss.xml
      permalink: rss.xml
content:
  dir: content
  ext: [md, markdown, mdown, mkdn, mkd, text, txt]
frontmatter:
  format: yaml
body:
  format: md
static:
  dir: static
layouts:
  dir: layouts
  internal:
    redirect.html: ''
    robots.txt: ''
    sitemap.xml: ''
    googleanalytics.js: 'includes/'
    rss.xml: ''
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
  36: PHPoole\Generator\PagesFromConfig
Suggest a modification