mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Trying to get JavaScript switchable between local and cloudflare
Not working for two reasons:
1. `lein npm install` does not build packages on MacOS;
2. `{% ifequal js-from ":cloudflare" %}` breaks Selmer in wiki.html but not in edit.html - WTF?
This commit is contained in:
parent
ecd9d5a270
commit
e00beaf790
8 changed files with 1371 additions and 19 deletions
|
|
@ -37,7 +37,9 @@
|
|||
"backticks" smeagol.formatting/process-backticks}
|
||||
:log-level :info ;; the minimum logging level; one of
|
||||
;; :trace :debug :info :warn :error :fatal
|
||||
:js-from :cloudflare ;; where to load JavaScript libraries
|
||||
;; from: options are :local, :cloudflare
|
||||
:passwd "resources/passwd"
|
||||
;; where the password file is stored
|
||||
:site-title "Smeagol"} ;; overall title of the site, used in
|
||||
:site-title "Smeagol"} ;; overall title of the site, used in
|
||||
;; page headings
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
{% extends "templates/base.html" %}
|
||||
{% block extra-headers %}
|
||||
{% style "/vendor/simplemde/dist/simplemde.min.css" %}
|
||||
{% script "/vendor/simplemde/dist/simplemde.min.js" %}
|
||||
{% ifequal js-from ":cloudflare" %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2/simplemde.min.js"></script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2/simplemde.min.css" rel="stylesheet" type="text/css" />
|
||||
{% else %}
|
||||
{% style "/vendor/simplemde/dist/simplemde.min.css" %}
|
||||
{% script "/vendor/simplemde/dist/simplemde.min.js" %}
|
||||
{% endifequal %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
{% extends "templates/base.html" %}
|
||||
|
||||
{% block extra-headers %}
|
||||
{% style "vendor/mermaid/dist/mermaid.css" %}
|
||||
<!-- there's at the time of writing (20170731) a problem with the dependencies of the Bower
|
||||
package for vega-embed, so we're currently not installing either it or Vega locally.
|
||||
TODO: fix -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega/3.0.0-rc2/vega.js"></script>
|
||||
{% script "/vendor/vega-lite/build/vega-lite.js" %}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/3.0.0-beta.19/vega-embed.js"></script>
|
||||
|
||||
{% script "vendor/mermaid/dist/mermaid.js" %}
|
||||
<!-- ifequal js-from ":cloudflare" -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.4.6/mermaid.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega/5.9.1/vega.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/4.1.1/vega-lite.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/6.2.2/vega-embed.min.js"></script>
|
||||
<!-- else -->
|
||||
<!-- TODO: currently `lein npm install` fails to build packages on all platforms, and
|
||||
fails SILENTLY. Consequently setting js-from to local is not advised. Investigting. -->
|
||||
<!-- script "vendor/mermaid/dist/mermaid.js" %}
|
||||
<!-- endifequal -->
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue