ox-twbs icon indicating copy to clipboard operation
ox-twbs copied to clipboard

resouce file can be download local?

Open liuanxin opened this issue 9 years ago • 2 comments

three static file : botstrap.min.css, bootstrap.min.js, jquery.min.js just can be download with local ?

yep, It's cdn link, but sometimes, when the internet has problem...

can be set a variable like (setq org-twbs-static-resouce t) then download with local, default or nil with the https://cdnjs.cloudflare.com/ajax/libs/... prefix

Thans..

liuanxin avatar Jul 26 '16 10:07 liuanxin

I love the idea! But sadly at the moment I don't have much time to work on it. In the meantime you can set / customize the var found here.

marsmining avatar Aug 23 '16 19:08 marsmining

I'm trying to set up the assets with local paths as well. Since I want to have the exported site both online (GitHub pages) and accessible locally, I believe I should be using relative paths.

I can replace the current value of org-twbs-head

<link  href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>

with

<link  href="assets/bootstrap.min.css" rel="stylesheet">
<script src="assets/jquery.min.js"></script>
<script src="assets/bootstrap.min.js"></script>

but this would only work for example for the index.html and not for documents in subfolders.

Assuming a structure

index.html
assets/
|-- bootstrap.min.css
|-- ...
foo/
|-- example.html
|-- ...

the document foo/example.html would need

<link  href="../assets/bootstrap.min.css" rel="stylesheet">
...

in the <head>.

Any suggestions on how to best attack this? Am I overlooking a possibly simple solution here? Thank you!

felix11h avatar May 15 '20 17:05 felix11h