App-Dapper

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

    # Dapper configuration file.
    ---
    name: My Site

Note that lines beginning with `#` are comments. Lines with `---` mark the
beginning/end of a YAML "document". What follows are `<key>:<value>`
pairs or arrays, arranged hierarchically:

    # Dapper config file
    ---
    name: Mark Benson Portfolio
    url: http://markbenson.io/
    source : _source/
    output : _output/
    layout : _layout/
    links :
        Preface : /preface/
        Amazon : http://amazon.com/author/markbenson
        Github : http://github.com/markdbenson
        LinkedIn : http://linkedin.com/in/markbenson
        Twitter : https://twitter.com/markbenson
    ignore :
        - ^\.
        - ^_
        - ^design$
        - ^README.md$
        - ^Makefile$

Any variable specified in `_config.yml` can be used in a template. In the
example above, name can be used like this:

    [% site.name %]

URL can be used like this:

    <a href="[% site.url %]">[% site.name %]</a>

The links (key/value pairs) can be listed like this:

    [% for link in site.links %]
        <a href="[% link.value %]">[% link.key %]</a><br />
    [% end %]

All of the items in the `ignore` array can be shown like this:

    <ul>
    [% for i in site.ignore %]
        <li>[% i %]</li>
    [% end %]
    </ul>

See the official [YAML](http://yaml.org/) specification, or the
[YAML::PP](https://metacpan.org/pod/YAML::PP) Perl module
documentation (Dapper's YAML parsing engine) for more information.

# Source

Source files in Dapper are written in
[Markdown](https://daringfireball.net/projects/markdown/). Markdown is a
markup language that allows you to write content in a natural way, and
have that text converted to XHTML for displaying on the web.

Writing with Markdown allows you to separate the content and structure of
your document from the formatting which allows you to focus on the actual
writing.

All source files must contain [YAML](http://yaml.org/) at the beginning.
The YAML at the beginning of the source files is denoted by leading
and trailing lines that each contain a sequence of three dashes. Example:

```
---
layout: post
title: Post Title
---

Here is the text of the post.
```

The variables specified as YAML are available under the `page` namespace
in layouts. The body of the page (`Here is the text of
the post.`) in the above example, is available as `content` in Template
Toolkit templates.

Variable definitions in source files that carry special meaning are as
follows:

* `extension: .html` is the default used if not specified. To override,
  specify a new value for `extension` for that particular page. `extension`
  may also be specified in the `_config.yml` file to apply it globally.

* `urlpattern: /:category/:year/:month/:slug/` defines the URL path for
  the file. This may also be specified in `_config.yml` as well. If not
  specified, the following is used: `/:category/:year/:month/:slug/`. A
  full list of pattern options are as follows:

    - `:category` - The category of the page as defined by the page's
      YAML.
    - `:year` - The year the page was published as defined either by the
      `date` field in the page's YAML part, or from the file modification
      timestamp.
    - `:month` - The month the page was published as defined either by
      the
      `date` field in the page's YAML part, or from the file modification
      timestamp.
    - `:day` - The day the page was published as defined either by the
      `date` field in the page's YAML part, or from the file modification
      timestamp.
    - `:hour` - The hour the page was published as defined either by the
      `date` field in the page's YAML part, or from the file modification
      timestamp.
    - `:minute` - The minute the page was published as defined either by
      the `date` field in the page's YAML part, or from the file
      modification timestamp.
    - `:second` - The second the page was published as defined either by
      the `date` field in the page's YAML part, or from the file
      modification timestamp.
    - `:slug` - The title of the page with all non-ASCII characters
      removed, all non-word characters removed, all spaces converted to
      hyphens (`-`), and converted to lowercase.



( run in 1.250 second using v1.01-cache-2.11-cpan-995e09ba956 )