App-Dapper
view release on metacpan or search on metacpan
1. **Simple**. Learning Dapper is easy -- it gets out of the way so you can
write content, develop layouts, and deploy to production the way you
want.
2. **Flexible**. Content is written in
[Markdown](http://search.cpan.org/~bobtfish/Text-MultiMarkdown/), and
templates are written using the TT3 mini-language from
[Template::Alloy](http://search.cpan.org/~abw/Template-Toolkit/) for
maximum flexibility.
3. **Pragmatic**. The easy things are easy and the hard things are
possible. Dapper was created to solve problems in a straight-forward
and intuitive way.
Why static? Decent question. Here are some reasons:
1. **Fast**. Static pages are fast to load and easy to cache. Content
management systems, on the other hand, may contact the database at
least one time per page request, process the results, merge with a
templating system, and serve the result to the user's web browser.
2. **Cheap**. Having a static website means that options for hosting those
static files also just got a lot more simple. No database is needed and
no real processing power for scripting is needed. For example, with a
static website, it becomes possible to host the site on
[Github Pages](https://pages.github.com/) for free, or
[Amazon S3](http://aws.amazon.com/s3/) for very modest fees.
3. **Secure**. It's much more secure to host a static website than a
dynamic one. Content management systems that use scripting languages
such as Perl, Python, or Ruby, all are more susceptible to being hacked
than a static website is. Simply stated, why use a dynamic content-
management system if a static setup will do?
4. **Portable**. With a static website, it's way easier to move the site
to a new host in the future. All web hosts now and in the future
support serving up a static website -- think of it as the lowest common
denominator -- and so there's no need to pick a premium host with
premium services.
Dapper was first written in 2002 to facilitate the creation of a series
of static websites that each had their own look and feel, but shared
content. Since then, Dapper has been used to create websites for speakers,
artists, authors, illusionists, web designers, piano tuners,
photographers, entertainment agencies, and API documentation for
industrial sensing equipment. In addition, it is the tool that powers
[markbenson.io](http://markbenson.io/).
In 2014, Dapper was submitted as a Perl module (App::Dapper) to
[CPAN](http://cpan.org/) under the MIT license for anyone to use for any
purpose.
**Features**
* Written in perl, available as a command line utility after installing.
* Content is written in Markdown.
* Layouts are developed using TT3 from the Template::Alloy templating engine.
* Configuration files and attributes are encoded with YAML.
The rest of this document shows you how to get your site up and running,
how to manage the content and the way it looks, and how to deploy the
result to your favorite web host.
# Getting Started
The following sections show you how to install, upgrade, and downgrade the
version of Dapper you have, as well as how to use the `dapper` command-
line utility and work with the directory structure it depends on.
## Install
Install Dapper in seconds:
$ cpanm App::Dapper
Then, create a new site, build it, and view it locally like so:
$ mkdir new-site && cd new-site
$ dapper init
$ dapper build
$ dapper serve
After that, browse to [http://localhost:8000](http://localhost:8000) to
see your site. To modify the content, look at `_source/index.md`. To
modify the layout, edit `_layout/index.html`.
### Upgrade
Find out which version of Dapper you have, by using the `-v` option:
$ dapper -v
You can compare this with the latest version from CPAN like this:
$ cpan -D App::Dapper
...
M/MD/MDB/App-Dapper-0.13.tar.gz
/Library/Perl/5.16/App/Dapper.pm
Installed: 0.12
CPAN: 0.13 Not up to date
Mark Benson (MDB)
mark@markbenson.io
In this example, you can see there is a newer version available. Upgrade
like this:
$ cpan App::Dapper
Stable releases are available on CPAN, but development happens at
[Github](https://github.com/markdbenson/dapper). If you like living on the
edge, install from the latest development tip like this:
$ cpanm git://github.com/markdbenson/dapper.git
A list of recent commits can also be
[viewed on Github](https://github.com/markdbenson/dapper/commits/master).
### Downgrade
If you want to install an older version of Dapper, first find the link on
( run in 1.155 second using v1.01-cache-2.11-cpan-39bf76dae61 )