Creating full web pages
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
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
1 Posted by Michel Charpent... on 18 May, 2014 12:25 AM
(Trying my message again.)
My goal is to use mmd to create pages with a body structured somewhat like this:
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
Support Staff 2 Posted by fletcher on 18 May, 2014 04:40 AM
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.
You could also use the file transclusion features to wrap stuff around your content:
Depending on exactly what you're trying to accomplish you can use everything you suggested -- SSI, external scripts, XSLT, MMD alone...
3 Posted by Michel Charpent... on 18 May, 2014 07:33 PM
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
Support Staff 4 Posted by fletcher on 19 May, 2014 01:46 PM
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]