Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to data-dir for URL options. #1191

Closed
dashed opened this issue Mar 11, 2014 · 4 comments
Closed

Fallback to data-dir for URL options. #1191

dashed opened this issue Mar 11, 2014 · 4 comments

Comments

@dashed
Copy link

dashed commented Mar 11, 2014

If an option has option for URL, it'd be nice if pandoc somehow includes --data-dir in its 'path' for searching the appropriate file if it's not available 'locally'.

Unsure if pandoc seems to be doing this. But, I find this to be potentially useful for options such as --css and --mathjax. So the following would search via ~/.pandoc/:

pandoc --css=style.css --mathjax=js/mathjax.min.js -t html5 file.md

@ickc
Copy link
Contributor

ickc commented Oct 2, 2016

👍

I think pandoc should embed the CSS if it found the "URL" in data-dir. I think the current behavior is to link to it which will be useless if it is local (and not used locally).

I think there's a need for data-dir to do more than currently did. As shown in #3127 and #3138 (indirectly related).

@jgm
Copy link
Owner

jgm commented Oct 3, 2016

+++ ickc [Oct 02 16 14:51 ]:

👍

I think pandoc should embed the CSS if it found the "URL" in data-dir.
I think the current behavior is to link to it which will be useless if
it is local (and not used locally).

You can always use --self-contained if you're not going to
provide the CSS on the server.

@ickc
Copy link
Contributor

ickc commented Oct 3, 2016

You're right. I forgot about it. This gives me an idea on another way to write template fragments. Thanks!

@tarleb
Copy link
Collaborator

tarleb commented May 12, 2021

Pandoc 2.0 introduced the --resource-path option which allows to control the search path, which is more fine-grained than checking the data-dir. Also, always checking the data-dir could turn into security issue.

@tarleb tarleb closed this as completed May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants