Paragraphs and html integration.
Sherwood Botsford
sgbotsford at gmail.com
Tue Jun 19 09:41:07 EDT 2012
As a work around, look at Template Toolkit 2.
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 %]
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
Sherwood Botsford
Sherwood's Forests -- http://Sherwoods-Forests.com
780-848-2548
50042 Range Rd 31
Warburg, Alberta T0C 2T0
On 19 June 2012 04:40, Boris Le Ninivin <boris.leninivin at gmail.com> wrote:
> On 06/19/2012 02:00 AM, Waylan Limberg wrote:
>
>> On Mon, Jun 18, 2012 at 7:31 PM, Boris Le Ninivin
>> <boris.leninivin at gmail.com> wrote:
>>
>>> On 06/18/2012 09:27 PM, Michel Fortin wrote:
>>>
>>> Le 2012-06-18 à 6:26, Boris Le Ninivin a écrit :
>>> In the end, on the df website, it is said that "Markdown is smart enough
>>> not
>>> to add extra (unwanted) |<p>| tags around HTML block-level tags.". So I
>>> don't know if it's an implementation problem (related to the PHP port,
>>> maybe?), or if it's a design problem, but as far as I know, Markdown is
>>> not
>>> smart enough to not add unwanted<p> tags.
>>>
>>> That's only true for known HTML tags, and only the block-level ones.
>>>
>>> Does that mean that<html> and<!doctype> tags will be enclosed
>>> between<p>
>>> ?
>>>
>> Yes. More specifically, known block-level tags that would only ever
>> appear inside the<body> of a valid HTML4/XHTML1 document are
>> recognized by Markdown. So any new tags introduced by HTML5 would also
>> not be recognized - although some implementations may be starting to
>> add them.
>>
> I guess there are valid reasons for that behavior, even if I don't see
> them already.
>
> Also remember that those tags must begin at the start of a line. No
>> indentation allowed - or they not recognized as block level tags. Yes,
>> this is documented - so most implementations follow it.
>>
> Okay. That seems to match what I've seen in the code.
>
> If your adding<html> stuff to your documents, that is generally
>> handled after markdown is run on the body. For example, most
>> frameworks and template systems will use a template which generates
>> all the stuff outside the<body> and perhaps a header/footer inside
>> the body, and then use a template variable to insert the already
>> converted markdown into the document.
>>
> Well, I really want to have the markdown document containing inclusion
> tags. So I'll try the method that Sir Fortin pointed out.
>
> Markdown does not generally
>> expect to have the already generated document run through it -
>> although I know some people have had success using it that way in
>> specific controlled environments.
>>
> I guessed that, that's why I gave up with the idea of replacing any
> non-markup content before running the markdown process.
>
> Many thanks you for your help, I'll try to correct my code using your help
> and ideas, and I'll tell you if it works :)
>
> Boris.
>
> ______________________________**_________________
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.**net <Markdown-Discuss at six.pairlist.net>
> http://six.pairlist.net/**mailman/listinfo/markdown-**discuss<http://six.pairlist.net/mailman/listinfo/markdown-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20120619/18a1ef13/attachment.htm>
More information about the Markdown-Discuss
mailing list