19 Jun 2012 17:13
Re: Paragraphs and html integration.
Boris Le Ninivin <boris.leninivin <at> gmail.com>
2012-06-19 15:13:57 GMT
2012-06-19 15:13:57 GMT
On 06/19/2012 03:41 PM, Sherwood Botsford wrote:
About the rest of your template system, I do not really like the parameters in a template, the markdown is aimed to be simple and easy to write and read. Which your syntax is not ;)
Boris.
As a work around, look at Template Toolkit 2.I like this filter concept.
Here's the template for my home page:
[% INCLUDE header.inc
Title = "Sherwood's Forests Home"
Desc = "Sherwood's Forests Tree Farm home page, and site overview"
ExtraMetaContent = "<meta name=\"verify-v1\" content=\"1TmuWV5qz7Z+uVP9MZMrq+IiHOqa2tBiOy6E+L7f+aM=\" />"
%]
[% INCLUDE sidenav.inc %]
<div id=content>
[% FILTER markdown %]
Well, thanks for your input. I've already resolved my problem by matching .* <at> include .* and then stripping all the html tags with php. But if I ever go for a re-implementation, I'll consider the filter stuff.
Regular MD stuff goes here.
[% INSERT Copyright.inc %]
[% END %]
</div>
[% INCLUDE footer.inc %]
(END)
****
Notes:
One of the features I like about TT2 is that you can do substitutions on inclusions.
Writing header.inc wasn't easy, as it also reads in an external file and processes it into the navigation menu. But I never modify it, so that's a non-issue.
Creating a new page consists of:
* Making a copy of an existing page.
* Putting in new markdown stuff in the middle of the file
* If I do nothing else, it will show up in alphabetical order in the directory it's in. E.g. /Home/Trees/Leaf_Trees/Poplars/Swedish_Aspen.tt2 will show up in the menu system as
Home -> Trees -> Leaf Trees -> Poplars -> Swedish Aspen
run my update program, which rebuilds the entire site, and reposts it. (Got burned by one of these spam trojans, so the site gets rebuilt twice a day. )
There is a file where I can overwrite the the order for how names appear in the menu.
Respectfully,
Sherwood of Sherwood's Forests
About the rest of your template system, I do not really like the parameters in a template, the markdown is aimed to be simple and easy to write and read. Which your syntax is not ;)
Boris.
_______________________________________________ Markdown-Discuss mailing list Markdown-Discuss <at> six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
RSS Feed