Jekyll: How to use custom plugins with GitHub pages
up vote
4
down vote
favorite
It turns out that custom ruby plugins don't work on GitHub pages because of security concerns.
I'm trying to add a plugin (this one) to the _plugins
folder of my Jekyll project, but when I deploy it to GitHub it is ignored.
Question: Is there a way to workaround this? Has anyone found a solution?
Note: Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
ruby jekyll github-pages
add a comment |
up vote
4
down vote
favorite
It turns out that custom ruby plugins don't work on GitHub pages because of security concerns.
I'm trying to add a plugin (this one) to the _plugins
folder of my Jekyll project, but when I deploy it to GitHub it is ignored.
Question: Is there a way to workaround this? Has anyone found a solution?
Note: Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
ruby jekyll github-pages
1
You can use an hosting like Netlify.
– David Jacquel
Nov 9 at 8:18
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
It turns out that custom ruby plugins don't work on GitHub pages because of security concerns.
I'm trying to add a plugin (this one) to the _plugins
folder of my Jekyll project, but when I deploy it to GitHub it is ignored.
Question: Is there a way to workaround this? Has anyone found a solution?
Note: Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
ruby jekyll github-pages
It turns out that custom ruby plugins don't work on GitHub pages because of security concerns.
I'm trying to add a plugin (this one) to the _plugins
folder of my Jekyll project, but when I deploy it to GitHub it is ignored.
Question: Is there a way to workaround this? Has anyone found a solution?
Note: Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
ruby jekyll github-pages
ruby jekyll github-pages
asked Nov 8 at 20:06
Oleksandr Shpota
3,30511329
3,30511329
1
You can use an hosting like Netlify.
– David Jacquel
Nov 9 at 8:18
add a comment |
1
You can use an hosting like Netlify.
– David Jacquel
Nov 9 at 8:18
1
1
You can use an hosting like Netlify.
– David Jacquel
Nov 9 at 8:18
You can use an hosting like Netlify.
– David Jacquel
Nov 9 at 8:18
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
Without a plugin
A reading time script does not require a plugin. I have created a collection of scripts that can be added without using a plugin. You can find them here. A reading time script is one of them.
Here you find the code:
{% capture words %}
{{ content | number_of_words | minus: 180 }}
{% endcapture %}
{% unless words contains '-' %}
{{ words | plus: 180 | divided_by: 180 | append: ' minutes to read' }}
{% endunless %}
Note that this code contains only Liquid and no Ruby. Therefore it can be used in your layout or in an include (without a plugin).
Optimizing the script
Suppose you have something like this:
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
Then you could remove the above code blocks like this:
{% assign preprocessed_content=post.content | replace: '<p>', '__p__' %}
{% assign preprocessed_content=preprocessed_content | replace: '</p>', '__/p__' %}
{% assign truncated_content=preprocessed_content | strip_html %}
{% assign cleaned_content=truncated_content | replace: '__p__', '<p>' %}
{% assign cleaned_content=cleaned_content | replace: '__/p__', '</p>' %}
Ofcourse this can be extended to support more tags.
Using the plugin anyway
If you REALLY want to use a plugin you can let your local machine or CloudCannon build your site and push the result to Github Pages. See also: https://learn.cloudcannon.com/jekyll/using-jekyll-plugins/
Thank you.number_of_words
was the first thing I tried. Unfortunately it doesn't satisfy my needs. My articles often contain code blocks butnumber_of_words
doesn't provide any mechanism to filter page content. Excludingcode
,pre
,script
etc might help but it is currently not possible. That's why for some articles it shows 2-3times more words than needed. Do you know how to fix this?
– Oleksandr Shpota
Nov 11 at 18:12
You could try to split your content on code blocks. Are you sure that you can read code faster than normal words? I would say the opposite is true.
– JoostS
Nov 11 at 19:05
It is not about performance. I don't want my code to be included to words count, it doesn't make sense. For instance, this article of mine sashashpota.com/2018/10/30/… contains around 800 words, butnumber_of_words
shows 1400 words as it counts code blocks as well.
– Oleksandr Shpota
Nov 11 at 19:20
No, it is not about performance. It is about the speed at which humans read text and code. I do not think that you can read code faster than normal words/text. Code blocks are no images and should not be considered as such (IMO).
– JoostS
Nov 11 at 19:30
1
Thank you for suggestingreplace
andstrip_html
. I solved my problem using your suggestion github.com/Shpota/shpota.github.io/commit/… It is not ideal but it works.
– Oleksandr Shpota
Nov 15 at 10:02
|
show 2 more comments
up vote
0
down vote
You need an alternative to those plugins.
As detailed in "Building a Series List with Hugo Shortcodes":
Ruby plugin execution is disabled altogether on Github pages:
Plugins on GitHub Pages GitHub Pages is powered by Jekyll.
However, all Pages sites are generated using the-safe
option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.
I understand you mention:
Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
Still, a static website generator (compatible with GitHub pages) like Hugo is to be considered in your case.
R.J Lorimer adds:
Hugo has the concept of Shortcodes, which are much like “Liquid Tags” in Jekyll.
Also like Jekyll, you can create custom shortcode tags.
However, the major difference is that in Hugo you can create them without resorting to actually writing Go code - see Create Your Own Shortcodes.
Because Hugo uses Go Templates for rendering the pages, shortcodes can use any and all Go template functions inside of them, as well as a whole list of custom Hugo functions added to help. This makes it arguably more powerful than a liquid-template solution, but still in a template file that can be easily updated on the fly.
Plus, Hugo does support MathJax, as seen in this article.
Thank you for proposing an alternative solution. But I'm afraid switching from Jekyll to Hugo is even bigger pain. Alternatively I could host my blog on GitLab where custom plugins are supported.
– Oleksandr Shpota
Nov 11 at 8:08
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Without a plugin
A reading time script does not require a plugin. I have created a collection of scripts that can be added without using a plugin. You can find them here. A reading time script is one of them.
Here you find the code:
{% capture words %}
{{ content | number_of_words | minus: 180 }}
{% endcapture %}
{% unless words contains '-' %}
{{ words | plus: 180 | divided_by: 180 | append: ' minutes to read' }}
{% endunless %}
Note that this code contains only Liquid and no Ruby. Therefore it can be used in your layout or in an include (without a plugin).
Optimizing the script
Suppose you have something like this:
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
Then you could remove the above code blocks like this:
{% assign preprocessed_content=post.content | replace: '<p>', '__p__' %}
{% assign preprocessed_content=preprocessed_content | replace: '</p>', '__/p__' %}
{% assign truncated_content=preprocessed_content | strip_html %}
{% assign cleaned_content=truncated_content | replace: '__p__', '<p>' %}
{% assign cleaned_content=cleaned_content | replace: '__/p__', '</p>' %}
Ofcourse this can be extended to support more tags.
Using the plugin anyway
If you REALLY want to use a plugin you can let your local machine or CloudCannon build your site and push the result to Github Pages. See also: https://learn.cloudcannon.com/jekyll/using-jekyll-plugins/
Thank you.number_of_words
was the first thing I tried. Unfortunately it doesn't satisfy my needs. My articles often contain code blocks butnumber_of_words
doesn't provide any mechanism to filter page content. Excludingcode
,pre
,script
etc might help but it is currently not possible. That's why for some articles it shows 2-3times more words than needed. Do you know how to fix this?
– Oleksandr Shpota
Nov 11 at 18:12
You could try to split your content on code blocks. Are you sure that you can read code faster than normal words? I would say the opposite is true.
– JoostS
Nov 11 at 19:05
It is not about performance. I don't want my code to be included to words count, it doesn't make sense. For instance, this article of mine sashashpota.com/2018/10/30/… contains around 800 words, butnumber_of_words
shows 1400 words as it counts code blocks as well.
– Oleksandr Shpota
Nov 11 at 19:20
No, it is not about performance. It is about the speed at which humans read text and code. I do not think that you can read code faster than normal words/text. Code blocks are no images and should not be considered as such (IMO).
– JoostS
Nov 11 at 19:30
1
Thank you for suggestingreplace
andstrip_html
. I solved my problem using your suggestion github.com/Shpota/shpota.github.io/commit/… It is not ideal but it works.
– Oleksandr Shpota
Nov 15 at 10:02
|
show 2 more comments
up vote
1
down vote
Without a plugin
A reading time script does not require a plugin. I have created a collection of scripts that can be added without using a plugin. You can find them here. A reading time script is one of them.
Here you find the code:
{% capture words %}
{{ content | number_of_words | minus: 180 }}
{% endcapture %}
{% unless words contains '-' %}
{{ words | plus: 180 | divided_by: 180 | append: ' minutes to read' }}
{% endunless %}
Note that this code contains only Liquid and no Ruby. Therefore it can be used in your layout or in an include (without a plugin).
Optimizing the script
Suppose you have something like this:
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
Then you could remove the above code blocks like this:
{% assign preprocessed_content=post.content | replace: '<p>', '__p__' %}
{% assign preprocessed_content=preprocessed_content | replace: '</p>', '__/p__' %}
{% assign truncated_content=preprocessed_content | strip_html %}
{% assign cleaned_content=truncated_content | replace: '__p__', '<p>' %}
{% assign cleaned_content=cleaned_content | replace: '__/p__', '</p>' %}
Ofcourse this can be extended to support more tags.
Using the plugin anyway
If you REALLY want to use a plugin you can let your local machine or CloudCannon build your site and push the result to Github Pages. See also: https://learn.cloudcannon.com/jekyll/using-jekyll-plugins/
Thank you.number_of_words
was the first thing I tried. Unfortunately it doesn't satisfy my needs. My articles often contain code blocks butnumber_of_words
doesn't provide any mechanism to filter page content. Excludingcode
,pre
,script
etc might help but it is currently not possible. That's why for some articles it shows 2-3times more words than needed. Do you know how to fix this?
– Oleksandr Shpota
Nov 11 at 18:12
You could try to split your content on code blocks. Are you sure that you can read code faster than normal words? I would say the opposite is true.
– JoostS
Nov 11 at 19:05
It is not about performance. I don't want my code to be included to words count, it doesn't make sense. For instance, this article of mine sashashpota.com/2018/10/30/… contains around 800 words, butnumber_of_words
shows 1400 words as it counts code blocks as well.
– Oleksandr Shpota
Nov 11 at 19:20
No, it is not about performance. It is about the speed at which humans read text and code. I do not think that you can read code faster than normal words/text. Code blocks are no images and should not be considered as such (IMO).
– JoostS
Nov 11 at 19:30
1
Thank you for suggestingreplace
andstrip_html
. I solved my problem using your suggestion github.com/Shpota/shpota.github.io/commit/… It is not ideal but it works.
– Oleksandr Shpota
Nov 15 at 10:02
|
show 2 more comments
up vote
1
down vote
up vote
1
down vote
Without a plugin
A reading time script does not require a plugin. I have created a collection of scripts that can be added without using a plugin. You can find them here. A reading time script is one of them.
Here you find the code:
{% capture words %}
{{ content | number_of_words | minus: 180 }}
{% endcapture %}
{% unless words contains '-' %}
{{ words | plus: 180 | divided_by: 180 | append: ' minutes to read' }}
{% endunless %}
Note that this code contains only Liquid and no Ruby. Therefore it can be used in your layout or in an include (without a plugin).
Optimizing the script
Suppose you have something like this:
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
Then you could remove the above code blocks like this:
{% assign preprocessed_content=post.content | replace: '<p>', '__p__' %}
{% assign preprocessed_content=preprocessed_content | replace: '</p>', '__/p__' %}
{% assign truncated_content=preprocessed_content | strip_html %}
{% assign cleaned_content=truncated_content | replace: '__p__', '<p>' %}
{% assign cleaned_content=cleaned_content | replace: '__/p__', '</p>' %}
Ofcourse this can be extended to support more tags.
Using the plugin anyway
If you REALLY want to use a plugin you can let your local machine or CloudCannon build your site and push the result to Github Pages. See also: https://learn.cloudcannon.com/jekyll/using-jekyll-plugins/
Without a plugin
A reading time script does not require a plugin. I have created a collection of scripts that can be added without using a plugin. You can find them here. A reading time script is one of them.
Here you find the code:
{% capture words %}
{{ content | number_of_words | minus: 180 }}
{% endcapture %}
{% unless words contains '-' %}
{{ words | plus: 180 | divided_by: 180 | append: ' minutes to read' }}
{% endunless %}
Note that this code contains only Liquid and no Ruby. Therefore it can be used in your layout or in an include (without a plugin).
Optimizing the script
Suppose you have something like this:
<p>lorem ipsum</p>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
<code>lorem ipsum</code>
<p>lorem ipsum</p>
Then you could remove the above code blocks like this:
{% assign preprocessed_content=post.content | replace: '<p>', '__p__' %}
{% assign preprocessed_content=preprocessed_content | replace: '</p>', '__/p__' %}
{% assign truncated_content=preprocessed_content | strip_html %}
{% assign cleaned_content=truncated_content | replace: '__p__', '<p>' %}
{% assign cleaned_content=cleaned_content | replace: '__/p__', '</p>' %}
Ofcourse this can be extended to support more tags.
Using the plugin anyway
If you REALLY want to use a plugin you can let your local machine or CloudCannon build your site and push the result to Github Pages. See also: https://learn.cloudcannon.com/jekyll/using-jekyll-plugins/
edited Nov 11 at 21:56
answered Nov 11 at 18:03
JoostS
5,89721536
5,89721536
Thank you.number_of_words
was the first thing I tried. Unfortunately it doesn't satisfy my needs. My articles often contain code blocks butnumber_of_words
doesn't provide any mechanism to filter page content. Excludingcode
,pre
,script
etc might help but it is currently not possible. That's why for some articles it shows 2-3times more words than needed. Do you know how to fix this?
– Oleksandr Shpota
Nov 11 at 18:12
You could try to split your content on code blocks. Are you sure that you can read code faster than normal words? I would say the opposite is true.
– JoostS
Nov 11 at 19:05
It is not about performance. I don't want my code to be included to words count, it doesn't make sense. For instance, this article of mine sashashpota.com/2018/10/30/… contains around 800 words, butnumber_of_words
shows 1400 words as it counts code blocks as well.
– Oleksandr Shpota
Nov 11 at 19:20
No, it is not about performance. It is about the speed at which humans read text and code. I do not think that you can read code faster than normal words/text. Code blocks are no images and should not be considered as such (IMO).
– JoostS
Nov 11 at 19:30
1
Thank you for suggestingreplace
andstrip_html
. I solved my problem using your suggestion github.com/Shpota/shpota.github.io/commit/… It is not ideal but it works.
– Oleksandr Shpota
Nov 15 at 10:02
|
show 2 more comments
Thank you.number_of_words
was the first thing I tried. Unfortunately it doesn't satisfy my needs. My articles often contain code blocks butnumber_of_words
doesn't provide any mechanism to filter page content. Excludingcode
,pre
,script
etc might help but it is currently not possible. That's why for some articles it shows 2-3times more words than needed. Do you know how to fix this?
– Oleksandr Shpota
Nov 11 at 18:12
You could try to split your content on code blocks. Are you sure that you can read code faster than normal words? I would say the opposite is true.
– JoostS
Nov 11 at 19:05
It is not about performance. I don't want my code to be included to words count, it doesn't make sense. For instance, this article of mine sashashpota.com/2018/10/30/… contains around 800 words, butnumber_of_words
shows 1400 words as it counts code blocks as well.
– Oleksandr Shpota
Nov 11 at 19:20
No, it is not about performance. It is about the speed at which humans read text and code. I do not think that you can read code faster than normal words/text. Code blocks are no images and should not be considered as such (IMO).
– JoostS
Nov 11 at 19:30
1
Thank you for suggestingreplace
andstrip_html
. I solved my problem using your suggestion github.com/Shpota/shpota.github.io/commit/… It is not ideal but it works.
– Oleksandr Shpota
Nov 15 at 10:02
Thank you.
number_of_words
was the first thing I tried. Unfortunately it doesn't satisfy my needs. My articles often contain code blocks but number_of_words
doesn't provide any mechanism to filter page content. Excluding code
, pre
, script
etc might help but it is currently not possible. That's why for some articles it shows 2-3times more words than needed. Do you know how to fix this?– Oleksandr Shpota
Nov 11 at 18:12
Thank you.
number_of_words
was the first thing I tried. Unfortunately it doesn't satisfy my needs. My articles often contain code blocks but number_of_words
doesn't provide any mechanism to filter page content. Excluding code
, pre
, script
etc might help but it is currently not possible. That's why for some articles it shows 2-3times more words than needed. Do you know how to fix this?– Oleksandr Shpota
Nov 11 at 18:12
You could try to split your content on code blocks. Are you sure that you can read code faster than normal words? I would say the opposite is true.
– JoostS
Nov 11 at 19:05
You could try to split your content on code blocks. Are you sure that you can read code faster than normal words? I would say the opposite is true.
– JoostS
Nov 11 at 19:05
It is not about performance. I don't want my code to be included to words count, it doesn't make sense. For instance, this article of mine sashashpota.com/2018/10/30/… contains around 800 words, but
number_of_words
shows 1400 words as it counts code blocks as well.– Oleksandr Shpota
Nov 11 at 19:20
It is not about performance. I don't want my code to be included to words count, it doesn't make sense. For instance, this article of mine sashashpota.com/2018/10/30/… contains around 800 words, but
number_of_words
shows 1400 words as it counts code blocks as well.– Oleksandr Shpota
Nov 11 at 19:20
No, it is not about performance. It is about the speed at which humans read text and code. I do not think that you can read code faster than normal words/text. Code blocks are no images and should not be considered as such (IMO).
– JoostS
Nov 11 at 19:30
No, it is not about performance. It is about the speed at which humans read text and code. I do not think that you can read code faster than normal words/text. Code blocks are no images and should not be considered as such (IMO).
– JoostS
Nov 11 at 19:30
1
1
Thank you for suggesting
replace
and strip_html
. I solved my problem using your suggestion github.com/Shpota/shpota.github.io/commit/… It is not ideal but it works.– Oleksandr Shpota
Nov 15 at 10:02
Thank you for suggesting
replace
and strip_html
. I solved my problem using your suggestion github.com/Shpota/shpota.github.io/commit/… It is not ideal but it works.– Oleksandr Shpota
Nov 15 at 10:02
|
show 2 more comments
up vote
0
down vote
You need an alternative to those plugins.
As detailed in "Building a Series List with Hugo Shortcodes":
Ruby plugin execution is disabled altogether on Github pages:
Plugins on GitHub Pages GitHub Pages is powered by Jekyll.
However, all Pages sites are generated using the-safe
option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.
I understand you mention:
Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
Still, a static website generator (compatible with GitHub pages) like Hugo is to be considered in your case.
R.J Lorimer adds:
Hugo has the concept of Shortcodes, which are much like “Liquid Tags” in Jekyll.
Also like Jekyll, you can create custom shortcode tags.
However, the major difference is that in Hugo you can create them without resorting to actually writing Go code - see Create Your Own Shortcodes.
Because Hugo uses Go Templates for rendering the pages, shortcodes can use any and all Go template functions inside of them, as well as a whole list of custom Hugo functions added to help. This makes it arguably more powerful than a liquid-template solution, but still in a template file that can be easily updated on the fly.
Plus, Hugo does support MathJax, as seen in this article.
Thank you for proposing an alternative solution. But I'm afraid switching from Jekyll to Hugo is even bigger pain. Alternatively I could host my blog on GitLab where custom plugins are supported.
– Oleksandr Shpota
Nov 11 at 8:08
add a comment |
up vote
0
down vote
You need an alternative to those plugins.
As detailed in "Building a Series List with Hugo Shortcodes":
Ruby plugin execution is disabled altogether on Github pages:
Plugins on GitHub Pages GitHub Pages is powered by Jekyll.
However, all Pages sites are generated using the-safe
option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.
I understand you mention:
Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
Still, a static website generator (compatible with GitHub pages) like Hugo is to be considered in your case.
R.J Lorimer adds:
Hugo has the concept of Shortcodes, which are much like “Liquid Tags” in Jekyll.
Also like Jekyll, you can create custom shortcode tags.
However, the major difference is that in Hugo you can create them without resorting to actually writing Go code - see Create Your Own Shortcodes.
Because Hugo uses Go Templates for rendering the pages, shortcodes can use any and all Go template functions inside of them, as well as a whole list of custom Hugo functions added to help. This makes it arguably more powerful than a liquid-template solution, but still in a template file that can be easily updated on the fly.
Plus, Hugo does support MathJax, as seen in this article.
Thank you for proposing an alternative solution. But I'm afraid switching from Jekyll to Hugo is even bigger pain. Alternatively I could host my blog on GitLab where custom plugins are supported.
– Oleksandr Shpota
Nov 11 at 8:08
add a comment |
up vote
0
down vote
up vote
0
down vote
You need an alternative to those plugins.
As detailed in "Building a Series List with Hugo Shortcodes":
Ruby plugin execution is disabled altogether on Github pages:
Plugins on GitHub Pages GitHub Pages is powered by Jekyll.
However, all Pages sites are generated using the-safe
option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.
I understand you mention:
Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
Still, a static website generator (compatible with GitHub pages) like Hugo is to be considered in your case.
R.J Lorimer adds:
Hugo has the concept of Shortcodes, which are much like “Liquid Tags” in Jekyll.
Also like Jekyll, you can create custom shortcode tags.
However, the major difference is that in Hugo you can create them without resorting to actually writing Go code - see Create Your Own Shortcodes.
Because Hugo uses Go Templates for rendering the pages, shortcodes can use any and all Go template functions inside of them, as well as a whole list of custom Hugo functions added to help. This makes it arguably more powerful than a liquid-template solution, but still in a template file that can be easily updated on the fly.
Plus, Hugo does support MathJax, as seen in this article.
You need an alternative to those plugins.
As detailed in "Building a Series List with Hugo Shortcodes":
Ruby plugin execution is disabled altogether on Github pages:
Plugins on GitHub Pages GitHub Pages is powered by Jekyll.
However, all Pages sites are generated using the-safe
option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.
I understand you mention:
Obviously I can generate html files locally and commit them to my repository. But that's not what I want.
Still, a static website generator (compatible with GitHub pages) like Hugo is to be considered in your case.
R.J Lorimer adds:
Hugo has the concept of Shortcodes, which are much like “Liquid Tags” in Jekyll.
Also like Jekyll, you can create custom shortcode tags.
However, the major difference is that in Hugo you can create them without resorting to actually writing Go code - see Create Your Own Shortcodes.
Because Hugo uses Go Templates for rendering the pages, shortcodes can use any and all Go template functions inside of them, as well as a whole list of custom Hugo functions added to help. This makes it arguably more powerful than a liquid-template solution, but still in a template file that can be easily updated on the fly.
Plus, Hugo does support MathJax, as seen in this article.
answered Nov 11 at 0:30
VonC
821k28425793094
821k28425793094
Thank you for proposing an alternative solution. But I'm afraid switching from Jekyll to Hugo is even bigger pain. Alternatively I could host my blog on GitLab where custom plugins are supported.
– Oleksandr Shpota
Nov 11 at 8:08
add a comment |
Thank you for proposing an alternative solution. But I'm afraid switching from Jekyll to Hugo is even bigger pain. Alternatively I could host my blog on GitLab where custom plugins are supported.
– Oleksandr Shpota
Nov 11 at 8:08
Thank you for proposing an alternative solution. But I'm afraid switching from Jekyll to Hugo is even bigger pain. Alternatively I could host my blog on GitLab where custom plugins are supported.
– Oleksandr Shpota
Nov 11 at 8:08
Thank you for proposing an alternative solution. But I'm afraid switching from Jekyll to Hugo is even bigger pain. Alternatively I could host my blog on GitLab where custom plugins are supported.
– Oleksandr Shpota
Nov 11 at 8:08
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53215356%2fjekyll-how-to-use-custom-plugins-with-github-pages%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
You can use an hosting like Netlify.
– David Jacquel
Nov 9 at 8:18