fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
307 stars 59 forks source link

MMD header key and value left in HTML head after conversion #111

Closed mn4367 closed 9 years ago

mn4367 commented 9 years ago

This document:

MMD Header:     abc.md
MMD Header:     xyz.md
MMD Footer:     123.md
MMD Footer:     789.md

Lorem ipsum ...

creates this HTML header:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="mmdheader" content="abc.md"/>
    <meta name="mmdheader" content="xyz.md"/>
</head>
<body>

...

This isn't really a problem, but I think that MMD header (like MMD footer) isn't meant to appear in the HTML <head>?

The release notes for 4.7 also mention mmd_header which probably should have been MMD header or mmd header.

May I append a feature request? It would be very nice if MMD header and MMD footer could be used multiple times, like it is already possible with LaTeX input. This would allow, for example, to create separate files with references, image definitions etc. in separate files. Especially for images one could create definitions with the same name but pointing to files with different resolutions.

Thanks, Michael

fletcher commented 9 years ago

Pushed a commit that won't include this in the meta. Thanks!

You can already use regular file transclusion (which is all that the mmd header/footer function is) to include multiple variations of files in the header/footer.

MultiMarkdown doesn't support multiple copies of the same metadata. latex input is the one exception, because other metadata(e.g. title) has to come after some commands, and before others. I don't think there's a good way around that. Otherwise, the last instance of any specific metadata key is the one that is used.

mn4367 commented 9 years ago

Thanks!

No problem, I just thought that it would be easy to support multiple metadata because in addition to latex input this already works for CSS and HTML header.

(The first instance of any metadata key is the one that is used, isn't it?)