Unclear how to access the gemfile on github pages

I am using jekyll through github pages to host a personal (academic) website. I have two problems, one with plugins and one with building my website locally, in which I cannot find any gemfile or use plugins besides the default that come with github pages. I built my website using this guide: A Guide to Creating and Hosting a Personal Website on GitHub | Jonathan McGlone | Librarian, Front-End Developer, Digital Publisher, Project Manager, Music Enthusiast, Web Noodler.


Plugins problem on with github pages.

I have been able to use some plugins by adding them to my _config.yml, things like seo-tag have worked so far. However, I want to add a new plugin that isnā€™t included by default in github pages - the ā€œLast Modified At Pluginā€ for Jekyll. I tried just adding a line in _config.yml to include but I get an error when the website builds:

Liquid Exception: Liquid syntax error (line 34): Unknown tag ā€˜last_modified_atā€™ in /_layouts/default.html

I decided this must be because I havenā€™t properly installed the plugin. There is a guide that describes something to do with gemfiles but I donā€™t see any gemfiles in my github repo. How can I add this nonstandard plugin to my jekyll site?


Hosting github pages locally

To try to fix the above problem I tried to build my website locally. I see that I should install Ruby, Bundler, Jekyll, etc. and I was able to successfully do this. I have git installed and I have my repo on my local machine. When I go to this folder, though, and I try to run install bundle install or bundle exec jekyll serve, I get errors about inability to find GemFiles or .bundle directories. Is there a way to locate these files?


  1. GH only allows some plugins, I donā€™t see the modified at plugin there (Dependency versions | GitHub Pages) that means to use GH for hosting you will probably have to use GH actions (?) .
  2. running locally, I think the purpose of the gemfile is for Bundler to know what to install. I think you need to have plugins in the config for jekyll to know what to do with them and also in the gemfile so bundler can install them.
  3. Post the entire console output when you try to run bundle install and bundle execute jekyll serve. Canā€™t really tell much without that.

I donā€™t use plugins or bundler, and I havenā€™t used GH Actions so I am not real knowledgeable on how they work but I think the above is correct.

I would break down you issues into separate things, first get a basic minimal site with no plugins to work locally and then build up from there. With no plugins you should be able to skip bundler and just do jekyll serve. Bundler is not required, it is highly recommended though to keep your dependencies under control.

As @rdyar suggests, you probably cannot run the plugin because GH Pages does not support that. You might be thinking that since you are trying to run the code locally then it should work, but if you have GH Pages enabled in your _config.yml, then it likely wonā€™t run on your computer either.

Please share the entire output from your logs, your _config.yml file, and your gemfile (usually in the root folder of your repo.

Also, please share the link to the specific plugin you are referring to (there might be more than one last modified at plugin, so it would be good to know which one you are using.

I know this all seems complicated, and I wish GitHub Pages just allowed you to use any plugins, so as @rdyar says, you may need to create a GitHub Action, which would replace how GitHub Pages works.

Can you please share the use case that requires the last modified at plugin? Perhaps there is another GH Pages way to accomplish what you are looking for.

Hi guys, Iā€™m experiencing a similar problem. My github site worked fine. But now it does not show my profile picture.

This is an error I get when deploying the page:

build

github-pages canā€™t satisfy your Gemfileā€™s dependencies.

Here you can find the whole log: pages build and deployment Ā· omarvd/omarvd.github.io@28deb63 Ā· GitHub

Thanks in advance for your help!

Your Gemfile contains the following Jekyll plugins:

group :jekyll_plugins do
  # gem "jekyll-archives"
  gem "jekyll-feed"
  gem 'jekyll-sitemap'
  gem 'hawkins'
end

Since you are using GitHub Pages (and not pure Jekyll), you are limited to the supported plugins and versions.

I am guessing if you remove hawkins, it will build.

1 Like