jekyll plugin not work on github
Github pages does not support plugins. From jekyll's documentation:
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.
The same documentation page also gives you a workaround:
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.
How do I configure GitHub to use non-supported Jekyll site plugins?
Depending if you deal with a User/Organization (UO) site or a Project site (P), do :
- from your working folder
git init
git remote add origin git@github.com:userName/userName.github.io.git
(UO) orgit remote add origin git@github.com:userName/repositoryName.git
(P)jekyll new .
creates your code base- in _config.yml, set the baseurl parameter to
baseurl: ''
(UO) orbaseurl: '/repositoryName'
(P) - in .gitignore add _site, it will be versioned in the other branch
jekyll build
will create the destination folder and build site.git checkout -b sources
(UO) orgit checkout master
(P)git add -A
git commit -m "jekyll base sources"
commit your source codegit push origin sources
(UO) orgit push origin master
(P) push your sources in the appropriate branchcd _site
touch .nojekyll
, this file tells gh-pages that there is no need to buildgit init
init the repositorygit remote add origin git@github.com:userName/userName.github.io.git
(UO) orgit remote add origin git@github.com:userName/repositoryName.git
(P)git checkout master
(UO) orgit checkout -b gh-pages
(P) put this repository on the appropriate branchgit add -A
git commit -m "jekyll first build"
commit your site codegit push origin master
(UO) orgit push origin gh-pages
(P)
You now have something like Octopress does. Look at their rake file, there are some nice comments inside.
Jekyll plugin not working
GitHub doesn't allow Jekyll plugins, turns out we don't want you running arbitrary code on our servers :)
Simple Jekyll converter plugin not working
Problem solved. It turns out that there's nothing wrong with the above code.
The problem was that at some point, the github-pages gem had been added to our Gemfile (unneeded). Apparently, with the github-pages plugin, Jekyll is always started in safe mode and the plugin_dir
is a random string.
Removing the github-pages gem from our Gemfile fixed it!
How to Install/Use Jekyll Plugins in GitHubPages?
I'm the developer of Jekyll Target Blank. GH Pages only support some plugins https://help.github.com/articles/adding-jekyll-plugins-to-a-github-pages-site/. I have requested for this plugin to become supported but they their response was a maybe.
Related Topics
Algorithm to Shuffle an Array Randomly Based on Different Weights
Chrome Asks to "Select a Certificate" for Ssl on My Rails App Using Thin
Rails 4 Wysiwyg Bootsy Not Displaying Formatting
Failing to Enable User-Env-Compile on Heroku
Can a Ruby Module Be Described as a Singleton Class
How to Emit Yaml in Ruby Expanding Aliases
How to Check If a Resource Exists in an Aws S3Bucket
How to Test Order-Conscious Equality of Hashes
Enforce File Upload Size on Heroku
Secure Erasing of Password from Memory in Ruby
Installing Ruby Using Rvm Fails, Without Trace
How to Fix Ruby Script Which Fails with Encoding Error: "\Xd8" on Us-Ascii
How to Create a "Clone"-Able Enumerator for External Iteration
Access 'Self' of an Object Through the Parameters
-Bash: /Usr/Local/Bin/Heroku: /Usr/Local/Bin/Ruby: Bad Interpreter: No Such File or Directory