Re: [Templates] Multimarkdown

2014-01-28 Thread Sherwood Botsford
I think so.  I've got Template::Plugin::MultiMarkdown installed and I call
it in my templates

[% USE String %]
[% USE MultiMarkdown %]

in header.inc

Then

[% FILTER multimarkdown %]

just before the mmd part of the template.

The new version of mmd lives in /usr/local/bin and reports version as

==> multimarkdown -v
peg-multimarkdown version 3.6
portions Copyright (c) 2010-2012 Fletcher T. Penney.
portions Copyright (c) 2011 Daniel Jalkut, MIT licensed.
original Copyright (c) 2008-2009 John MacFarlane.  License GPLv2+ or MIT.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.





Respectfully,

Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests --  http://Sherwoods-Forests.com
780-848-2548
50042 Range Rd 31
Warburg, Alberta T0C 2T0



On 24 January 2014 17:30, Richard Thomas  wrote:

>
> On 25 Jan 2014, at 9:06 am, Sherwood Botsford 
> wrote:
>
> >
> > For years I've used an older version of multimarkdown.  Now it is no
> longer a perl program but a binary.
> >
> > I am not much of a programmer, and my limited programming is procedural
> and not object oriented.
> >
> > I build my website with ttree and simple scripts.
> >
> > Would someone point me to a simple explanation of what I go through to
> use an external program as a filter, and which files I need to edit.  I've
> found an example of one calling an external perl program, but it wasn't
> clear to me if the modifcations were made in the template, in ttree or in
> some other file.
> >
> > Thanks!
> >
>
> Hi Sherwood,
>
> Are you using a plug-in to handle the MultiMarkdown parsing, or doing
> something else?
>
> I use [Template::Plugin::MultiMarkdown](
> https://metacpan.org/pod/Template::Plugin::MultiMarkdown), which supports
> the XS version of MM - in fact it uses it by default.
>
> And you use it like this in your template(s):
>
> [% USE MultiMarkdown %]
>
> ...
> [% FILTER multimarkdown %]
>
> ### My Markdown.
>
> Here's my **MultiMarkdown** text.
>
> [% END %]
>
> ...
>
> Hope that's helpful.
>
> cheers
> RET
> ___
> templates mailing list
> templates@template-toolkit.org
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


[Templates] Why doesn't this work: INSERT in PROCESS block.

2014-01-28 Thread Sherwood Botsford
[% PROCESS header.inc
Title = "Instant Trees -- Just add water"
Desc = "Sherwood's Forests advice on getting your own forest quickly."
[% INSERT last-modified-gmt.inc %]
%]

When I run ttree it fusses:

 ! file error - parse error - Solutions/Instant_Forest.tt2 line 1-5:
unexpected token (%)
  [% PROCESS header.inc
Title = "Instant Trees -- Just add water"
Desc = "Sherwood's Forests advice on getting your own forest quickly."
Last_Major_Modification = "Tue 28 Jan 2014 20:23:42 MST"
[% INSERT last-modified-gmt.inc %]



Respectfully,

Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests --  http://Sherwoods-Forests.com
780-848-2548
50042 Range Rd 31
Warburg, Alberta T0C 2T0
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] Why doesn't this work: INSERT in PROCESS block.

2014-01-28 Thread Kiss Gabor (Bitman)
> [% PROCESS header.inc
> Title = "Instant Trees -- Just add water"
> Desc = "Sherwood's Forests advice on getting your own forest quickly."
> [% INSERT last-modified-gmt.inc %]
> %]
> 
> When I run ttree it fusses:
> 
>  ! file error - parse error - Solutions/Instant_Forest.tt2 line 1-5:
> unexpected token (%)
>   [% PROCESS header.inc
> Title = "Instant Trees -- Just add water"
> Desc = "Sherwood's Forests advice on getting your own forest quickly."
> Last_Major_Modification = "Tue 28 Jan 2014 20:23:42 MST"
> [% INSERT last-modified-gmt.inc %]

I guess nesting is not allowed. The inner %] closed the outer [%.
Outer %] caused syntax error in parser.
Try to omit inner [% %].

Gabor

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates


Re: [Templates] Why doesn't this work: INSERT in PROCESS block.

2014-01-28 Thread Tom Molesworth

On 29/01/14 05:55, Sherwood Botsford wrote:

[% PROCESS header.inc
Title = "Instant Trees -- Just add water"
Desc = "Sherwood's Forests advice on getting your own forest quickly."
[% INSERT last-modified-gmt.inc %]
%]


You have nested [% %] in there, try this:

[% PROCESS header.inc
Title = "Instant Trees -- Just add water"
Desc = "Sherwood's Forests advice on getting your own forest quickly.";
INSERT last-modified-gmt.inc
%]

cheers,

Tom

___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates