Been trying to implement the asciidoctor gem for emoji.
https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/lib/emoji-inline-macro.rb
I have moved this extension to the root directory under a new lib folder for now.
https://github.com/jMonkeyEngine/wiki
So far, the twemoji-awesome.css file is properly written into the gh-pages branch folders,
Any page using the emoji has it properly added to the icon tag of output document on commit.
For example emoji:smile[] emoji:smile[2x] emoji:smile[4x]
<i class="twa twa-smile"></i> <i class="twa twa-2x twa-smile"></i> <i class="twa twa-4x twa-smile"></i>
But the hangup it seems is the stylesheet link tag or at least that's what I am thinking.
For this example the emoji is called from https://wiki.jmonkeyengine.org/jme3/advanced/custom_controls.html#usage. All three are sitting to the right of the text :smile:
<link rel="stylesheet" href="/home/travis/build/jMonkeyEngine/wiki/build/asciidoc/html5/jme3/advanced/twemoji-awesome.css">
I am pretty sure that if I can get the style link to read
<link rel="stylesheet" href="./twemoji-awesome.css">
emoji will be implemented.
I think the problem lies here in the template helpers.rb file with this line.
|
styles << { text: read_asset(normalize_system_path(stylesheet, stylesdir), true) } |
The emoji ruby extension file has a similar line.
|
destination = doc.normalize_system_path stylesheet_name, stylesoutdir, (doc.safe >= SafeMode::SAFE ? outdir : nil) |
So I think its expecting to read the twemoji-awesome.css located in the same folder as the output html file. Trouble is I dont understand how to get this to set the correct stylsheet link.
I can use the attribute for setting the stylesheet in the header of the adoc file and emoji works,
:stylesheet: twemoji-awesome.css
but that overrides the default style, which is not wanted. I could just combine the default stylesheet with the twemoji-awesome.css but thats a hack.
@davidB or anyone for that matter, can you help?
Edit: Forgot to mention, setup in the gradle file,
|
// Add requirement on Ruby extension. |
|
requires './lib/emoji-inline-macro.rb' |
Been trying to implement the asciidoctor gem for emoji.
https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/lib/emoji-inline-macro.rb
I have moved this extension to the root directory under a new
libfolder for now.https://github.com/jMonkeyEngine/wiki
So far, the twemoji-awesome.css file is properly written into the gh-pages branch folders,
Any page using the emoji has it properly added to the icon tag of output document on commit.
For example emoji:smile[] emoji:smile[2x] emoji:smile[4x]
But the hangup it seems is the stylesheet link tag or at least that's what I am thinking.
For this example the emoji is called from https://wiki.jmonkeyengine.org/jme3/advanced/custom_controls.html#usage. All three are sitting to the right of the text
:smile:I am pretty sure that if I can get the style link to read
emoji will be implemented.
I think the problem lies here in the template helpers.rb file with this line.
wiki/src/templates/slim/html5/helpers.rb
Line 438 in 5a52fdb
The emoji ruby extension file has a similar line.
wiki/lib/emoji-inline-macro/extension.rb
Line 53 in 5a52fdb
So I think its expecting to read the twemoji-awesome.css located in the same folder as the output html file. Trouble is I dont understand how to get this to set the correct stylsheet link.
I can use the attribute for setting the stylesheet in the header of the adoc file and emoji works,
but that overrides the default style, which is not wanted. I could just combine the default stylesheet with the twemoji-awesome.css but thats a hack.
@davidB or anyone for that matter, can you help?
Edit: Forgot to mention, setup in the gradle file,
wiki/build.gradle
Lines 21 to 22 in 5a52fdb