Closed antass closed 10 years ago
There should be a better way to toggle off the plugin, but for now you have to manually remove the line <p style="font-style:italic"> pageviews: {% pageviews %}{{post.url}}{% endpageviews %} </p>
that appears in _includes/postexcerpt.html
and _includes/sidebar.html
Slight tweak from above, note that pageviews is now added simply by {{ post.pageviews }}
so that's the line you'll want to remove in both those files. Will see about adding a toggle.
I fetched all recent changes, deleted the lines you suggested, as well as flipped the toggle for pageviews
in _config.yaml
to no
, but Google Analytics is still being loaded and fails:
jekyll build
Configuration from /Users/antass/GitHub/labnotebook/_config.yml
loaded config
Building site: /Users/antass/GitHub/labnotebook -> build
Generating page path metadata with base_name.rb
Storing raw md versions as post metadata with raw_content.rb
Getting Google Analytics data
/Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/garb-0.9.7/lib/garb/model.rb:98:in `build_default_params': undefined method `id' for nil:NilClass (NoMethodError)
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/garb-0.9.7/lib/garb/model.rb:34:in `results'
from /Users/antass/GitHub/labnotebook/_plugins/jekyll-labnotebook-plugins/google_analytics.rb:74:in `generate'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:190:in `block in generate'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:189:in `each'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:189:in `generate'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/lib/jekyll/site.rb:40:in `process'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/gems/jekyll-0.12.1/bin/jekyll:264:in `<top (required)>'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/jekyll:23:in `load'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/jekyll:23:in `<main>'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/antass/.rvm/gems/ruby-2.0.0-p195/bin/ruby_noexec_wrapper:14:in `<main>'
it appears you haven't deleted the plugin that is causing the trouble. You see it being called in your return log:
from /Users/antass/GitHub/labnotebook/_plugins/jekyll-labnotebook-plugins/google_analytics.rb:74:in `generate'
Try removing the google_analytics.rb
plugin directly.
Thanks so much for making your labnotebook open source!
I have recently moved from an Ubuntu installation to a Mac, and I am experiencing problems with compiling the labnotebook at the Google Analytics plugin stage. I have double-checked the credentials, reissued API key, etc.. This is what I get:
Here's the list of installed gems:
Is there a way to avoid loading the Google Analytics plugin when compiling the notebook? I don't have a use for it anyway.