legumeinfo / jekyll-theme-legumeinfo

A Jekyll theme for the Legume Information System and related biodata websites
https://www.legumeinfo.org/
Apache License 2.0
1 stars 1 forks source link

Gem can't find legumeinfo-jekyll-theme #2

Closed sammyjava closed 3 years ago

sammyjava commented 3 years ago

Where do I put it? (I'm assuming that there IS a way for Jekyll to load it locally, rather than from the aether. Seems weird that it wouldn't be able to.)

shokin@morangie:~/sams-test-site$ ls
404.html  about.markdown  _config.yml  Gemfile  Gemfile.lock  index.markdown  legumeinfo-jekyll-theme  _posts  _site
shokin@morangie:~/sams-test-site$ bundle
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Could not find gem 'legumeinfo-jekyll-theme x86_64-linux' in any of the gem sources listed in your Gemfile.

shokin@morangie:~/sams-test-site$ gem install legumeinfo-jekyll-theme
ERROR:  Could not find a valid gem 'legumeinfo-jekyll-theme' (>= 0) in any repository

(I could probably figure it out, but since I'm following your instructions, you need to tell me in your instructions.)

adf-ncgr commented 3 years ago

I'm not sure this is relevant to how @alancleary wants to approach the short term solution to this but FWIW, here is the approach @nathanweeks took to solve this in the containerized version:

git diff 79c73421da19632123e3c21bb56b172d5742000e 9d7072e5d6febf7beaf42773612021d060ed3bb7 _config.yml
diff --git a/_config.yml b/_config.yml
index b0cde81..5a1c1e2 100644
--- a/_config.yml
+++ b/_config.yml
@@ -32,10 +32,9 @@ github_username: legumeinfo
 newsletter: http://eepurl.com/cX_JjL

 # Build settings
-remote_theme: legumeinfo/legumeinfo-jekyll-theme@1d0c318
+theme: legumeinfo-jekyll-theme
 plugins:
   - jekyll-feed
-  - jekyll-remote-theme

 # Exclude from processing.
 # The following items will not be processed, by default.
@@ -45,8 +44,7 @@ plugins:
 # Excluded items can be processed by explicitly listing the directories or
 # their entries' file path in the `include:` list.
 #
-exclude:
-  - docker-compose.yml
+# exclude:
 #   - .sass-cache/
sammyjava commented 3 years ago

I've got the theme: command in _config.yml. Gem doesn't find the theme. I presume it's just a location thing. I'm not using Docker, I'm rolling my own. (I'm not a huge fan of Docker for stuff like this, TBH, I like to build stuff from scratch for this sort of getting-to-know-the-code task.) NOTE: I'm assuming that there IS a way for Jekyll to load it locally, rather than from the aether. Seems weird that it wouldn't be able to.

# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
#
# If you need help with YAML syntax, here are some quick references for you: 
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
# https://learnxinyminutes.com/docs/yaml/
#
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.

title: Your awesome title
email: your-email@example.com
description: >- # this means to ignore newlines until "baseurl:"
  Write an awesome description for your new site here. You can edit this
  line in _config.yml. It will appear in your document head meta (for
  Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username:  jekyll

# Build settings
theme: minima
plugins:
  - jekyll-feed

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.
#
# exclude:
#   - .sass-cache/
#   - .jekyll-cache/
#   - gemfiles/
#   - Gemfile
#   - Gemfile.lock
#   - node_modules/
#   - vendor/bundle/
#   - vendor/cache/
#   - vendor/gems/
#   - vendor/ruby/

theme: legumeinfo-jekyll-theme
sammyjava commented 3 years ago

OK, I got it, I have to actually replace the local Jekyll files with the theme files, thereby breaking the theme repo. So it's not really designed to handle modular standalone themes. Basically, clone the theme repo first and then build the site from there. The Gem theme is really mandatory to keep things separate, which I consider being a slightly bad design.

https://jekyllrb.com/docs/themes/#converting-gem-based-themes-to-regular-themes

alancleary commented 3 years ago

@sammyjava You can build and install the theme's GEM locally instead of copying the files:

cd legumeinfo-jekyll-theme
gem build legumeinfo-jekyll-theme.gemspec
gem install ./legumeinfo-jekyll-theme-0.0.0.gem

Then it's just a matter of following the installation instructions in the Legumeinfo Jekyll Theme readme to make it the theme for your Jekyll site.

sammyjava commented 3 years ago

Cool. Thanks. That makes sense.