Creating full web pages

Michel Charpentier's Avatar

Michel Charpentier

18 May, 2014 12:24 AM

My goal is to use mmd to create pages with a body structured somewhat like this:

... header, navigation, etc


here goes the content generated my mmd

... footer, etc

What's the best approach to do that? Generate the whole thing with mmd? (how?) Assemble the parts together with external scripts? Use some form of server-side includes?

Thanks,

MC

  1. 1 Posted by Michel Charpent... on 18 May, 2014 12:25 AM

    Michel Charpentier's Avatar

    (Trying my message again.)

    My goal is to use mmd to create pages with a body structured somewhat like this:

    <div>  ... header, navigation, etc </div>
    <div class=...>
       here goes the content generated my mmd
    </div>
    <div> ... footer, etc </div>
    

    What's the best approach to do that? Generate the whole thing with mmd? (how?) Assemble the parts together with external scripts? Use SSI?

    Thanks,

    MC

  2. Support Staff 2 Posted by fletcher on 18 May, 2014 04:40 AM

    fletcher's Avatar

    If you're looking to wrap the content in all sorts of HTML goodness, you can take a look at the MultiMarkdown CMS. It uses MMD to convert text to HTML, and then uses XSLT to modify the HTML and wrap in footer, etc.

    http://fletcherpenney.net/multimarkdown/cms/
    

    You could also use the file transclusion features to wrap stuff around your content:

    http://fletcher.github.io/MultiMarkdown-4/transclusion
    

    Depending on exactly what you're trying to accomplish you can use everything you suggested -- SSI, external scripts, XSLT, MMD alone...

  3. 3 Posted by Michel Charpent... on 18 May, 2014 07:33 PM

    Michel Charpentier's Avatar

    I try to keep things as simple as possible. In particular, I don’t have full control over the web site and I’d rather not have to go on my knees and beg the sysadmin for any feature they deem non-standard. I also stopped reading the CMS documentation once it mentions XHTML (I assume everything is HTML 5 these days).

    File transclusion looks tempting, but I can’t see how to make it do what I need. The problem is that HTML content is not processed by mmd. So, how can I do <div> mmd-generated content </div> ? <div> {{include.txt}} </div> won’t work. This would be ideal for me, but otherwise, I think I’ll go the custom script route.

    Thanks,

    MC

  4. Support Staff 4 Posted by fletcher on 19 May, 2014 01:46 PM

    fletcher's Avatar

    Might I humbly suggest not aborting the directions until *after* one understands what's going on? ;)

    HTML 5 and XHTML are effectively the same from the perspective of XSLT processing. You can use whatever you like. I use HTML 5.

    HTML content can be processed by MMD. Either via the command line or the `markdown="1"` attribute on the HTML tag in question.

    F-

    --
    Fletcher T. Penney
    [email blocked]

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

11 Dec, 2022 09:57 PM
11 Dec, 2022 07:57 PM
26 Sep, 2022 02:40 AM
21 Jul, 2022 10:22 AM
11 Jan, 2022 02:33 PM

Recent Articles