App-Templer
view release on metacpan or search on metacpan
lib/Templer/Site/New.pm view on Meta::CPAN
else
{
print "WARNING: Refusing to over-write $base/$name\n";
}
$name = undef;
$marker = undef;
$tmp = undef;
}
else
{
$tmp .= $line . "\n";
}
}
}
}
$created;
}
1;
__DATA__
mkdir input
mkdir output
mkdir plugins
mkdir layouts
mkdir includes
file input/robots.txt EOF
User-agent: *
Crawl-delay: 10
Disallow: /cgi-bin
Disallow: /stats
EOF
file input/index.wgn EOF
title: Welcome!
----
<p>Welcome to my site.</p>
EOF
file input/about.wgn EOF
title: About my site
----
<p>This is my site, it was generated by <a href="https://github.com/skx/templer">templer</a>.</p>
EOF
file layouts/default.layout EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- tmpl_if name='title' -->
<title><!-- tmpl_var name='title' escape='html' --></title>
<!-- tmpl_else -->
<title>Untitled Page</title>
<!-- /tmpl_if -->
</head>
<body>
<!-- tmpl_var name='content' -->
<p>This is site was generated by <a href="https://github.com/skx/templer">templer</a> on <!-- tmpl_var name='date' -->.</p>
</body>
</html>
EOF
file templer.cfg EOF
##
#
# The first section of the configuration file refers to the
# input and output paths.
#
# Templer will process all files matching "*.skx" beneath a
# particular directory. That directory is the input directory.
#
input = ./input/
#
##
##
#
# Within the input directory we'll process files that match
# a given suffix.
#
# By default this is ".skx", so we'll template-expand files
# named "index.skx", "about.skx", etc.
#
suffix = .wgn
#
##
##
#
# By default all pages will be written in HTML.
#
# If you have the appropriate depedencies installed you can instead
# write your input pages in textile/markdown. Just add to the page
#
# Title: my title
# Format: textile
# ----
# ... your content here ..
#
# If all pages are going to be setup in one format you may prefer
# to change this default
#
format = html
# format = markdown
# format = perl
# format = textile
#
##
( run in 0.541 second using v1.01-cache-2.11-cpan-39bf76dae61 )