HTML Footer

Kolen's Avatar


18 Feb, 2016 03:09 AM

Currently there are metadata like HTML Header, LaTeX Header, LaTeX Footer, but no HTML Footer. But sometimes it is desirable to put a certain script in the footer. e.g. just before the </body>.

In my case I want to use the jQuery.sidenotes. But the script has to be put below the footnotes. It means that I cannot put the script at the end of the md file (and I suspect the MMD footer won't either because it is just a transclusion).

Would you consider adding this new metadata in the future version?

  1. Support Staff 1 Posted by fletcher on 18 Feb, 2016 02:54 PM

    fletcher's Avatar

    Why won't the MMD footer do what you want? Have you tried it?


  2. 2 Posted by Kolen on 19 Feb, 2016 12:27 AM

    Kolen's Avatar

    I tried that. Basically what the MMD footer is effective doing is functionally equivalent to putting the text at the end of the file. Looking at the HTML generated, it put the MMD footer before <div class="footnotes">.

    But in order to use the jQuery.sidenotes I mentioned, the code has to be put after the footnotes (before the </body>.

    And I think that location is generally expected for an HTML footer: the footer should be just before the </body>. Say, if the footer contain some copyright info, loads some javascript (that without the use of async is where it should be put in some/most cases), etc. But if the footnotes comes after the "footer" (say, by MMD footer), that kind of defeat the purpose of calling it a footer. But I understand that MMD footer is not suppose to be an HTML footer, hence the feature request of the HTML Footer metadata (similar to how LaTeX Header and LaTeX Footer come in pairs).

    Edit: There's no such thing as LaTeX Header but the LaTeX Input can be used effectively as a header, and there's a LaTeX Footer, HTML Header, but there's no such thing as the HTML Footer or any other things to provide a functionality expected from HTML footer as explained above.

  3. Support Staff 3 Posted by fletcher on 24 Feb, 2016 03:14 PM

    fletcher's Avatar

    Just pushed a commit to the develop branch that includes support for the
    HTML Footer metadata. It will be included in the next release, or you
    can compile for yourself now.

    Thanks for the suggestion.


  4. 4 Posted by Kolen on 28 Feb, 2016 02:38 AM

    Kolen's Avatar

    Thank you!

  5. Kolen closed this discussion on 02 Mar, 2016 02:51 AM.

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

Keyboard shortcuts


? 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

19 Feb, 2018 10:29 PM
17 Nov, 2017 03:20 PM
19 Sep, 2017 02:19 PM
06 Sep, 2017 07:18 AM
31 Jul, 2017 11:21 PM

Recent Articles