hematite 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8764d5501c8a2e08a066ff8a3c595e6301544f302a3073505947faa226cd95d9
|
4
|
+
data.tar.gz: fd4b02059497fd70358abbd0dc7e753e4631c4c8c95347cb1cd201dc56ea9383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e00a63422072524a31554c16c036b0be5a30f3e344cb955354b452506cc735a8eaf48e3ffb77a0c553209bd74596603c44322bf1ec231f5eacea3ad6d9a2b15
|
7
|
+
data.tar.gz: ec4c74f00d80c83f563727b0415a88408285bf849b8792e454335b582ffb4905a9b06a1708f2ede5d39935b6a87531a6ba2088ccced0ac4c05d66b348ad94368
|
@@ -8,4 +8,37 @@
|
|
8
8
|
|
9
9
|
<!-- Page/site-specific imports and configuration -->
|
10
10
|
{{ site.additional_import_html | default: "" }}
|
11
|
+
{{ layout.additional_import_html | default: "" }}
|
11
12
|
{{ page.additional_import_html | default: "" }}
|
13
|
+
|
14
|
+
{% comment %}
|
15
|
+
Each [spec]=["key", { property: value, property2: value2, ... }]
|
16
|
+
{% endcomment %}
|
17
|
+
{% for spec in layout.additional_imports | concat: page.additional_imports %}
|
18
|
+
{% assign target = spec[1] %}
|
19
|
+
{% if target.type == 'js' or target.type == 'mjs' %}
|
20
|
+
{% assign tag="script" %}
|
21
|
+
{% assign url_spec = "src" %}
|
22
|
+
{% assign options = "" %}
|
23
|
+
{% else %}
|
24
|
+
{% assign tag="link" %}
|
25
|
+
{% assign options = "rel='stylesheet'" %}
|
26
|
+
{% assign url_spec = "href" %}
|
27
|
+
{% endif %}
|
28
|
+
|
29
|
+
{% if target.type == 'mjs' %}
|
30
|
+
{% assign options = "type = 'module'" %}
|
31
|
+
{% endif %}
|
32
|
+
|
33
|
+
{% if target.absolute_url %}
|
34
|
+
{% assign url = target.absolute_url %}
|
35
|
+
{% else %}
|
36
|
+
{% assign url = target.url | relative_url %}
|
37
|
+
{% endif %}
|
38
|
+
|
39
|
+
<{{ tag }} {{ options }}
|
40
|
+
{{ target.inline_options | default: "" }}
|
41
|
+
{{url_spec}}={{ url | jsonify }}
|
42
|
+
onload={{ target.onload | default: "" | jsonify }}></{{tag}}>
|
43
|
+
{% endfor %}
|
44
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
layout: remark_slideshow
|
3
|
+
additional_imports:
|
4
|
+
katex:
|
5
|
+
type: js
|
6
|
+
url: /assets/plugin/katex/katex.min.js
|
7
|
+
katex_auto_init_math:
|
8
|
+
type: js
|
9
|
+
url: /assets/plugin/katex/contrib/auto-render.min.js
|
10
|
+
onload: renderMathInElement(document.body)
|
11
|
+
inline_options: defer
|
12
|
+
comment: >-
|
13
|
+
We're passing 'defer' above because we want this script to load
|
14
|
+
_after_ the body.
|
15
|
+
katex_css:
|
16
|
+
type: css
|
17
|
+
url: /assets/plugin/katex/katex.min.css
|
18
|
+
|
19
|
+
remark_presentation_config:
|
20
|
+
navigation:
|
21
|
+
scroll: false
|
22
|
+
slideNumberFormat: "Slide %current% of %total%."
|
23
|
+
|
24
|
+
mermaid: true
|
25
|
+
remark_presentation_config_html: >-
|
26
|
+
Testing...
|
27
|
+
---
|
28
|
+
|
29
|
+
{% comment %}
|
30
|
+
This template is an example of how to customize remark slideshows
|
31
|
+
by creating a new template.
|
32
|
+
|
33
|
+
`additional_imports` can be used on any page. In this case, the imports
|
34
|
+
are included both in the remark presentation `iframe` and in the main page.
|
35
|
+
|
36
|
+
Of course, we could include `katex` or `mermaid` here by setting `katex: true`
|
37
|
+
or `mermaid: true` in the header`, but `additional_imports` is another way to
|
38
|
+
specify this.
|
39
|
+
|
40
|
+
Note that `remark_presentation_config` is passed directly to remark.
|
41
|
+
{% endcomment %}
|
42
|
+
|
43
|
+
{{ content }}
|
@@ -40,16 +40,26 @@ layout: default
|
|
40
40
|
presentationFrame.src = {{ frame_resource_url | jsonify }};
|
41
41
|
window.presentationFrameLoaded = false;
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
|
44
|
+
let siteConfig = {{ site.remark_presentation_config | jsonify }} ?? {};
|
45
|
+
let layoutConfig = {{ layout.remark_presentation_config | jsonify }} ?? {};
|
46
|
+
let pageConfig = {{ page.remark_presentation_config | jsonify }} ?? {};
|
47
|
+
let config = {};
|
48
|
+
|
49
|
+
// Merge the remark configurations. siteConfig has highest precedence.
|
50
|
+
for (let currentConfig of [siteConfig, layoutConfig, pageConfig]) {
|
51
|
+
for (let key in currentConfig) {
|
52
|
+
config[key] = currentConfig[key];
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
console.log(config);
|
46
57
|
|
47
58
|
// Escape the content to prevent liquid from rendering it.
|
48
59
|
config.source = document.querySelector("#source").value;
|
49
60
|
|
50
61
|
// Unwrap if surrounded by markdown-parser-disabling HTML
|
51
62
|
let markdownDisableMatches = config.source.match(WRAPPING_DIV_EXP);
|
52
|
-
console.log(markdownDisableMatches, config.source);
|
53
63
|
|
54
64
|
// Replace with first capture (contents of the wrapping element).
|
55
65
|
if (markdownDisableMatches && markdownDisableMatches.length > 0) {
|
@@ -82,7 +92,14 @@ layout: default
|
|
82
92
|
|
83
93
|
// Any additional configuration scripts/html specific to remark
|
84
94
|
presentationDoc.write(unescape(
|
85
|
-
{{
|
95
|
+
{{
|
96
|
+
page.remark_presentation_config_html | default: site.remark_presentation_config_html | default: "" | url_encode | replace: "+", " " | jsonify
|
97
|
+
}}
|
98
|
+
));
|
99
|
+
|
100
|
+
// If another layout extends this layout,
|
101
|
+
presentationDoc.write(unescape(
|
102
|
+
{{ layout.remark_presentation_config_html | default: "" | url_encode | replace: "+", " " | jsonify }}
|
86
103
|
));
|
87
104
|
|
88
105
|
presentationDoc.write(`
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hematite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Heino
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- _includes/settings.html
|
49
49
|
- _layouts/calendar.html
|
50
50
|
- _layouts/default.html
|
51
|
+
- _layouts/example_custom_remark_slideshow.html
|
51
52
|
- _layouts/home.html
|
52
53
|
- _layouts/page.html
|
53
54
|
- _layouts/post.html
|