public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* convert markdown to HTML with header and footer
@ 2015-01-23 22:44 Gus
       [not found] ` <220ac959-ca06-458a-9b77-5d439b94ad20-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Gus @ 2015-01-23 22:44 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 1288 bytes --]

Hi

I have the following:

pandoc test.md -B before.html -A after.html -o output.html

This converts the md file to HTML and inserts some header and footer HTML 
like this:

<body>
<div>BEFORE</div>
Some content..
<div>
  AFTER
</div>
</body>

However, pandoc puts it's own HTML header onto the fragment. What I really 
want to do it convert the file to a fragment and then have my own
content from before.html and after.html wrapped around it.

Is this possible with pandoc?

I notice that this:

pandoc README <http://johnmacfarlane.net/pandoc/demo/README> -o example1.html <http://johnmacfarlane.net/pandoc/demo/example1.html>

Does not appear to put  html header etc around the fragment as the above 
does.

Gus

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/220ac959-ca06-458a-9b77-5d439b94ad20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2463 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: convert markdown to HTML with header and footer
       [not found] ` <220ac959-ca06-458a-9b77-5d439b94ad20-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-01-27 16:23   ` Matthew Pickering
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Pickering @ 2015-01-27 16:23 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi Gus,

The proper way to do this would be a template.[1]

[1]: http://johnmacfarlane.net/pandoc/demo/example9/templates.html

Matt

On Fri, Jan 23, 2015 at 10:44 PM, Gus <gus-kjAhe6CN51rpVLaUnt/cCQC/G2K4zDHf@public.gmane.org> wrote:
> Hi
>
> I have the following:
>
> pandoc test.md -B before.html -A after.html -o output.html
>
> This converts the md file to HTML and inserts some header and footer HTML
> like this:
>
> <body>
> <div>BEFORE</div>
> Some content..
> <div>
>   AFTER
> </div>
> </body>
>
> However, pandoc puts it's own HTML header onto the fragment. What I really
> want to do it convert the file to a fragment and then have my own
> content from before.html and after.html wrapped around it.
>
> Is this possible with pandoc?
>
> I notice that this:
>
> pandoc README -o example1.html
>
> Does not appear to put  html header etc around the fragment as the above
> does.
>
> Gus
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/220ac959-ca06-458a-9b77-5d439b94ad20%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-27 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 22:44 convert markdown to HTML with header and footer Gus
     [not found] ` <220ac959-ca06-458a-9b77-5d439b94ad20-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-27 16:23   ` Matthew Pickering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).