[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Add TITLE export to ox-md

From: Jay Kamat
Subject: Re: [O] [PATCH] Add TITLE export to ox-md
Date: Thu, 24 Aug 2017 10:41:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

>  I'm not so sure about it. Vanilla Markdown does not support title.
>  Neither does "ox-md.el"

I agree that vanilla markdown does not support title, but if ox-md does not
support any form of title, then there is disparity between the output of other
org exports and the markdown exporter. I would like to solve that disparity if

> Correct, vanilla Markdown does not support title. The file name is the title.

I'm not entirely sure about that (file name being the title). Unfortunately
markdown is very fragmented, so it's hard to tell what the 'standard' is. From
the markdown that I've worked with, this isn't the case. The original markdown
tool (https://daringfireball.net/projects/markdown/) dosen't seem to output
filename titles in it's export, so I wouldn't think it's part of the vanilla

>  But then you would need to shift all headlines 1 or 2 levels down.
>  `setext' style becomes unusable because there is no room left for other
>  headlines.

Is there a reason we need to move all the other header under the title header? I
was thinking of leaving the rest of the headlines as they are. So:

#+TITLE: My Title

* One
** Two

Would export to

# My Title

# One

## Two

It's a little bit ugly to have two h1 headings right next to each other, though.

Another option is to take advantage of html features of markdown to format the
title in a way that does not alter the headings (similar to how the TOC is
exported now). For example, we could add

  <title>My Title</title>

to the start of the markdown, but that seems to break the github markdown
renderer. Does anyone who knows more html have any ideas here (besides adding h1
headings in html)?

I don't like the idea of shifting headlines down a level to accommodate the
title since people would then be unable to create new H1 headings in markdown
files with a title.

> Maybe we eventually end up with 3 options (something like below):
> - org-md-title-as-h1
> - org-md-subtitle-as-h2
> - org-md-heading-offset

that's probably the best idea I've heard so far, since I would imagine most
people would either not want to have two H1 headings right after each other, or
not want to have their headings shifted. Having such options would allow people
to pick the scenario they want (shifting headings under the title, including the
title but no offset, or not including the title at all).

Does creating these options (defaulting to nil) sound like a good plan to move
forward on? Other ideas and feedback would be appreciated, (since this is a
tricky situation, standards wise).


PS: ox-hugo looks very nice, and I look forward to trying it out! :)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]