lisawilliams / lisa

Lisa Williams' Jekyll-based blog with essays, commentary, notes and guides.
http://lisawilliams.github.io/lisa/
0 stars 1 forks source link

Jekyll serve does not seem to show layouts/themes #46

Closed lisawilliams closed 6 years ago

lisawilliams commented 6 years ago

Running jekyll serve generates a site with no themes/layouts:

Build Warning: Layout 'post' requested in 2017-03-26-eulogy-for-a-fairy-princess-heather-adels.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-08-18-art-collector.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-08-18-future-posts.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-08-18-gallery-report-chelsea-nyc.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-08-19-art-collection.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-08-23-PEM-report.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-08-29-Hurricane-Harvey-Senior-Tracker.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-08-31-heather.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-09-01-Alstroemeria.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-09-02-Creating-A-Companion-RSS-Reader.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-09-03-Recent-Reads-September-2017.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-09-06-learning-to-look.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-09-25-long-look-epigraph-damascus-julie-mehretu.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-10-04-Building-The-Trollbusters-Bot.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-10-04-Guide-To-Real-News-For-Regular-People.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-11-10-shows-to-see-dec17-jan18.markdown does not exist.
     Build Warning: Layout 'post' requested in 2017-12-08-falling-blue.markdown does not exist.
...done in 0.300402 seconds.

Visiting localhost:4000 shows a site where neither the index page nor individual blog pages seem to have layouts.

Figure out how to fix this.

This is pursuant to this commit (https://github.com/lisawilliams/lisa/commit/d9b05920332cfe56e017a5a9a7ea662fe46d1d3e) -- I updated Ruby, and it appeared to kill Jekyll (the gem did not appear available and I had to run gem install jekyll. After that, jekyll serve ran, but all the layouts were gone. Ugh!

lisawilliams commented 6 years ago

I suspect that this problem MIGHT be solved by jekyll build.

After investigating, I noticed that there ARE no previous commits that have folders with themes and layouts -- the theme, minima, is referenced by config.yml here:

# Build settings
markdown: kramdown
theme: minima
plugins:
  - jekyll-feed
future: true  

However, it's late and I'm tired, so I want to be sharp when I run these commands -- and do some reading of docs first. The published blog is in a stable state, even if the localhost version isn't -- so if I don't push changes, it keeps the current blog in a stable, available state for users for now.

lisawilliams commented 6 years ago

This might help too:

https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/

Another symptom: there is a new post in the gh-pages branch that Github knows about, but it's not in the published blog. Something's up.

Before moving on, download the repo and archive it, so I can load all the posts in case I want to start with a fresh Jekyll install.

lisawilliams commented 6 years ago

Okay, more clues:

Running jekyll serve works in the _pages directory, but not in the root directory.

This means I probably ran gem install jekyll in the _pages directory and not in the root directory. Not good! It also, however, explains why the localhost version of the site can't see the theme -- the config.yml file is one directory up and probably inaccessible to Jekyll.

I am going to try running gem install jekyll in the root directory & pray that doesn't screw things up too bad. 🙏

lisawilliams commented 6 years ago

Okay, here's what happened:

~/wdi/projects/lisa (gh-pages)
$ gem install jekyll
Successfully installed jekyll-3.6.2
1 gem installed

But then I ran:

~/wdi/projects/lisa (gh-pages)
$ jekyll serve
/Users/lisawilliams/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
    from /Users/lisawilliams/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/lisawilliams/.rvm/gems/ruby-2.4.1/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:48:in `require_from_bundler'
    from /Users/lisawilliams/.rvm/gems/ruby-2.4.1/gems/jekyll-3.6.2/exe/jekyll:11:in `<top (required)>'
    from /Users/lisawilliams/.rvm/gems/ruby-2.4.1/bin/jekyll:23:in `load'
    from /Users/lisawilliams/.rvm/gems/ruby-2.4.1/bin/jekyll:23:in `<main>'
    from /Users/lisawilliams/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
    from /Users/lisawilliams/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'

Not good. So, reading the notes about bundler, I thought: "perhaps the new install of Ruby blew away the bundler gem. I did the following:

$ gem install bundler
Fetching: bundler-1.16.0.gem (100%)
Successfully installed bundler-1.16.0
1 gem installed

I then ran bundle exec rake build with the following results:

Could not find public_suffix-2.0.5 in any of the sources
Run `bundle install` to install missing gems.

So ok, I'll run bundle install:

~/wdi/projects/lisa (gh-pages)
$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching public_suffix 2.0.5
Installing public_suffix 2.0.5
Fetching addressable 2.5.1
Installing addressable 2.5.1
Using bundler 1.16.0
Using colorator 1.1.0
Using ffi 1.9.18
Using forwardable-extended 2.6.0
Using rb-fsevent 0.10.2
Using rb-inotify 0.9.10
Using sass-listen 4.0.0
Fetching sass 3.5.1
Installing sass 3.5.1
Fetching jekyll-sass-converter 1.5.0
Installing jekyll-sass-converter 1.5.0
Fetching listen 3.0.8
Installing listen 3.0.8
Fetching jekyll-watch 1.5.0
Installing jekyll-watch 1.5.0
Fetching kramdown 1.14.0
Installing kramdown 1.14.0
Using liquid 4.0.0
Using mercenary 0.3.6
Fetching pathutil 0.14.0
Installing pathutil 0.14.0
Fetching rouge 1.11.1
Installing rouge 1.11.1
Using safe_yaml 1.0.4
Fetching jekyll 3.5.2
Installing jekyll 3.5.2
Fetching jekyll-feed 0.9.2
Installing jekyll-feed 0.9.2
Fetching minima 2.1.1
Installing minima 2.1.1
Bundle complete! 4 Gemfile dependencies, 22 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

Having done that, I run jekyll serve. Voilà! The Jekyll server runs on localhost:4000 and the resulting site picks up theme/formatting. Now, onward to see if we can successfully add a new post.

Once that is done, I will commit/push all changes to gh-pages and merge it into master to keep both these branches in sync.

lisawilliams commented 6 years ago

New setup successfully pushes changes to the public-facing version of the blog. Hooray!

https://lisawilliams.github.io/lisa/art/2017/12/08/falling-blue.html

Now I have to actually write that blog post :D

lisawilliams commented 6 years ago

Closing issue after merge/sync with master branch.