public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: How to prevent CSS from being embedded?
Date: Tue, 20 Jun 2023 18:27:03 -0700	[thread overview]
Message-ID: <7D726040-F99B-44F5-A9CD-B256F4BD1AE5@gmail.com> (raw)
In-Reply-To: <CAPfJ9TiL1sEvMaMOa_Z1UVW_u6=Dz8xZOMaN_vqw36SP+A1EzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2701 bytes --]

Does adding data-external="1" to your <link> tag for the stylesheet do the trick?

If it's true, though, that browsers can't handle data URIs in the <link> tag, then we should change how pandoc embeds stylesheets.  I hadn't heard that before.  It would be worth putting up an issue on the tracker.


> 7@gmail.com> wrote:
> 
> Hello.
> I am using pandoc to convert some markdown study notes to html.
> The final html is hosted on GitHub pages so that I can access it from anywhere.
> Becuase my notes contain images, I have to use the 
> --embed-resources option with pandoc in order for the html to display correctly.
> 
> The problem arises when I went to add CSS to style the notes.
> I have found many css sheets to style the html. (https://markdowncss.github.io/)
> 
> However, because of the --embed-sources pandoc encodes the CSS as base 64 and somehow the CSS in the rendered HTML does not render on any browsers.
> I know the raw CSS itself works because I manually added the CSS to the html and it formats the page properly.
> 
> I feel that if I can prevent the CSS from being encoded (even when using the --embed- resources option) and preserve it as a link to an external css, my page should display properly. 
> I have searched for possible solutions and some posts suggest using a 
> data-external="1" flag to prevent a source from being embedded.
> 
> See here: https://github.com/jgm/pandoc/issues/8362#issuecomment-1272612851
> 
> But that describes how to do it for mathjax, not css. 
> Could someone show me an example of how to do the same thing for css?
> 
> Thank you!
> 
> 
> -- 
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAPfJ9TiL1sEvMaMOa_Z1UVW_u6%3DDz8xZOMaN_vqw36SP%2BA1EzQ%40mail.gmail.com <https://groups.google.com/d/msgid/pandoc-discuss/CAPfJ9TiL1sEvMaMOa_Z1UVW_u6%3DDz8xZOMaN_vqw36SP%2BA1EzQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7D726040-F99B-44F5-A9CD-B256F4BD1AE5%40gmail.com.

[-- Attachment #2: Type: text/html, Size: 4008 bytes --]

      parent reply	other threads:[~2023-06-21  1:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-10 16:31 Mahela Munasinghe
     [not found] ` <CAPfJ9TiL1sEvMaMOa_Z1UVW_u6=Dz8xZOMaN_vqw36SP+A1EzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-06-21  1:27   ` John MacFarlane [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7D726040-F99B-44F5-A9CD-B256F4BD1AE5@gmail.com \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).