Skip to content

Commit

Permalink
Use Pandoc and Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Mar 15, 2017
1 parent 432af3b commit dd658d2
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 51 deletions.
4 changes: 4 additions & 0 deletions bin/makesite
Expand Up @@ -5,6 +5,7 @@ use warnings;
use 5.010;

use Template;
use Pandoc;
use FindBin '$Bin';
use File::Find;
use File::Path 'make_path';
Expand All @@ -14,6 +15,9 @@ my $tt = Template->new(
INCLUDE_PATH => ["$Bin/../tt_lib", "$Bin/.." ],
OUTPUT_PATH => "$Bin/../docs",
WRAPPER => 'page',
FILTERS => {
markdown => sub { pandoc->convert(markdown => 'html', $_[0]) },
},
);

find({ wanted => \&do_this, no_chdir => 1 }, 'in');
Expand Down
57 changes: 22 additions & 35 deletions docs/index.html
Expand Up @@ -55,52 +55,39 @@
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1>Perl Web Advice</h1>
<p>Perl has been used to build dynamic web sites for a very long time.
Over time, the best way to build web sites with Perl has changed.
Unfortunately, a lot of the information out there on the World Wide
Web doesn't change and is, therefore, rather out of date.</p>
<p>This site aims to provide a place where you can find the best,
up-to-date advice for building web sites with Perl.</p>
<p>(And yes, we're well aware of the dangers of saying that this site
will always be up to date. That's why the code for this site is on
<a href="https://github.com/davorg/perlwebadvice">Github</a>.)</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>

<h1 id="perl-web-advice">Perl Web Advice</h1>
<p>Perl has been used to build dynamic web sites for a very long time. Over time, the best way to build web sites with Perl has changed. Unfortunately, a lot of the information out there on the World Wide Web doesn't change and is, therefore, rather out of date.</p>
<p>This site aims to provide a place where you can find the best, up-to-date advice for building web sites with Perl.</p>
<p>(And yes, we're well aware of the dangers of saying that this site will always be up to date. That's why the code for this site is on <a href="https://github.com/davorg/perlwebadvice">Github</a>.)</p>
<p>
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more »</a>
</p>
</div>
</div>

<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-md-4">
<h2>New Project</h2>
<p>Congratulations! You've decided to use Perl as the technology
to build your new web site. That means you have you pick from
a huge selection of modern tools that you can use on your project.
This section will help you to decide which tools are best for
you.</p>
<p><a class="btn btn-default" href="/greenfield/" role="button">View details &raquo;</a></p>

<h2 id="new-project">New Project</h2>
<p>Congratulations! You've decided to use Perl as the technology to build your new web site. That means you have you pick from a huge selection of modern tools that you can use on your project. This section will help you to decide which tools are best for you.</p>
<p>
<a class="btn btn-default" href="/greenfield/" role="button">View details »</a>
</p>
</div>
<div class="col-md-4">
<h2>Hosting</h2>
<p>You are looking for somewhere to host your new web site that
is built in Perl. This section will give you some suggestions of
the kinds of hosting options that are open to you. Or, if you're
running a hosting company, it has suggestions of what you can do
to make your hosting as attractive as possible to Perl projects.</p>
<p><a class="btn btn-default" href="/hosting/" role="button">View details &raquo;</a></p>

<h2 id="hosting">Hosting</h2>
<p>You are looking for somewhere to host your new web site that is built in Perl. This section will give you some suggestions of the kinds of hosting options that are open to you. Or, if you're running a hosting company, it has suggestions of what you can do to make your hosting as attractive as possible to Perl projects.</p>
<p>
<a class="btn btn-default" href="/hosting/" role="button">View details »</a>
</p>
</div>
<div class="col-md-4">
<h2>Project Maintenance</h2>
<p>Commiserations! You are maintaining an older web site that is
built in Perl. This section will help you to recognise exactly
which technologies are being used. It also has advice on moving
gradually towards a newer toolset.</p>
<p><a class="btn btn-default" href="/legacy/" role="button">View details &raquo;</a></p>

<h2 id="project-maintenance">Project Maintenance</h2>
<p>Commiserations! You are maintaining an older web site that is built in Perl. This section will help you to recognise exactly which technologies are being used. It also has advice on moving gradually towards a newer toolset.</p>
<p>
<a class="btn btn-default" href="/legacy/" role="button">View details »</a>
</p>
</div>
</div>

Expand Down
10 changes: 7 additions & 3 deletions tt_lib/green_blurb.tt
@@ -1,7 +1,11 @@
<h2>New Project</h2>
<p>Congratulations! You've decided to use Perl as the technology
[% FILTER markdown -%]
## New Project

Congratulations! You've decided to use Perl as the technology
to build your new web site. That means you have you pick from
a huge selection of modern tools that you can use on your project.
This section will help you to decide which tools are best for
you.</p>
you.

<p><a class="btn btn-default" href="/greenfield/" role="button">View details &raquo;</a></p>
[% END -%]
10 changes: 7 additions & 3 deletions tt_lib/hosting_blurb.tt
@@ -1,6 +1,10 @@
<h2>Project Maintenance</h2>
<p>Commiserations! You are maintaining an older web site that is
[% FILTER markdown -%]
## Project Maintenance

Commiserations! You are maintaining an older web site that is
built in Perl. This section will help you to recognise exactly
which technologies are being used. It also has advice on moving
gradually towards a newer toolset.</p>
gradually towards a newer toolset.

<p><a class="btn btn-default" href="/legacy/" role="button">View details &raquo;</a></p>
[% END -%]
20 changes: 13 additions & 7 deletions tt_lib/jumbo.tt
@@ -1,11 +1,17 @@
<h1>Perl Web Advice</h1>
<p>Perl has been used to build dynamic web sites for a very long time.
[% FILTER markdown -%]
# Perl Web Advice

Perl has been used to build dynamic web sites for a very long time.
Over time, the best way to build web sites with Perl has changed.
Unfortunately, a lot of the information out there on the World Wide
Web doesn't change and is, therefore, rather out of date.</p>
<p>This site aims to provide a place where you can find the best,
up-to-date advice for building web sites with Perl.</p>
<p>(And yes, we're well aware of the dangers of saying that this site
Web doesn't change and is, therefore, rather out of date.

This site aims to provide a place where you can find the best,
up-to-date advice for building web sites with Perl.

(And yes, we're well aware of the dangers of saying that this site
will always be up to date. That's why the code for this site is on
<a href="https://github.com/davorg/perlwebadvice">Github</a>.)</p>
[Github](https://github.com/davorg/perlwebadvice).)

<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>
[% END -%]
10 changes: 7 additions & 3 deletions tt_lib/legacy_blurb.tt
@@ -1,7 +1,11 @@
<h2>Hosting</h2>
<p>You are looking for somewhere to host your new web site that
[% FILTER markdown -%]
## Hosting

You are looking for somewhere to host your new web site that
is built in Perl. This section will give you some suggestions of
the kinds of hosting options that are open to you. Or, if you're
running a hosting company, it has suggestions of what you can do
to make your hosting as attractive as possible to Perl projects.</p>
to make your hosting as attractive as possible to Perl projects.

<p><a class="btn btn-default" href="/hosting/" role="button">View details &raquo;</a></p>
[% END -%]

0 comments on commit dd658d2

Please sign in to comment.