Looks like your error message is coming from the jekyll-analytics plugin. I tried to build your site and added --verbose --trace and got this output.
E:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-analytics-0.1.6/lib/jekyll-analytics.rb:7:in `inject': undefined method `keys' for nil:NilClass (NoMethodError)
Disabling that plugin in the Gemfile stops the error.
I didn’t dig much deeper into your repo but did notice your _layouts/default.html is a little screwy. It needs YAML Front Matter so that could potentially bite you later.
@flamant I have looked at your source code and found a few things that I have been able to fix (including jekyll_analytics gem). Just sent out a pull request with my changes (including screenshots as a proof that it somewhat works).
Why would that be a problem in the future, can you give an example or two on the subject? I’m really curious to find out your take on that.
You have quite a bit of experience crafting your own themes (widely used BTW) and probably have seen things going wrong direction more than the rest of us!
I know there was a reason I started adding empty YAML Front Matter to my default.html layouts, but completely forget why. Could have been some edge case I hit with one off my themes and this solved it.
Looking at a few other themes most don’t do it. So maybe it’s not as necessary as I led on.
Hi mmistake and pabloduo, thank you for your answers.
I have several questions
when you say that you tried to build the site what’s the command you think of ? It’s strange, I hadn’t any issue with any kind of command considering jekyll-analytics.
To remove this plugins, is the folowing process correct ?
uninstall the plugin by the command gem uninstall jekyll-analytics in the project directory (inger)
remove the gem "jekyll-analytics" command from the Gemfile
remove the jekyll-analytics line under DEPENDENCIES title
Why the following lines have been removed from the Gemfile.lock file ?
jekyll-paginate (1.1.0)
jekyll-rss (1.0.0alpha7)
jekyll-paginate (~> 1.0)
Why _layouts/default.html is screwy ? Can you give me an example of a proper version ?
considering the _config.yml file, why should I remove url: "https://localhost". I can have that line for development purpose without breaking anything. In production environment, I will have just to replace this variable ?
considering the _config.yml file, why did you add those lines ?
jekyll_analytics:
GoogleAnalytics: # Add, if you want to track with Google Analytics
id: UA-123-456 # Required - replace with your tracking id
anonymizeIp: false # Optional - Default: false - set to true for anonymized tracking
Does it replace the jekyll-analytics plugin that was removed in Gemfile ?
Why did you suggest to add those lines in file ?
Piwik: # Add, if you want to track with Piwik
url: piwik.example.com # Required - url to piwik installation without trailing /
siteId: “1234” # Required - replace with your piwik site id (Write id as string)
MPulse: # Add if you want to track performance with mPulse
apikey: XXXXX-YYYYY-ZZZZZ-AAAAA-23456 # Required - replace with your mPulse API key
Are they other plugins to use ? And could you give me an example of their goals ?
how do you understand this piece of code in footer.html file ?
{% if page.path contains ‘_posts’ %}
link rel=“amphtml” href="/inger/toto.html">
{% endif %}
What does that link tag mean and what is the purpose
Otherwise I am really confused about the src error in header.html
2. Yes, that should be enough to remove jekyll_analytics gem;
3. After you run bundle update or bundle install some of the gems that not used might be removed by the bundler and it is up to you whether to accept the change or keep Gemfile.lock intact;
5. I’ve tried to document the advice in _config.yml and again, feel free to disagree - I suggested it based on my experience with Jekyll, web servers, HTML, and CSS;
6. Since your Jekyll configuration had jekyll_analytics gem, my assumption was that you somehow need the gem and couldn’t make it work. Hence, I glanced over gem’s documentation & source code and the reason why gem wasn’t working was missing piece of configuration of jekyll_analytics in _config.yml; No, it doesn’t replace the gem - it configures it to work properly;
Currently, there doesn’t seem to be a system to “accept” an answer. You can however show your appreciation by clicking the “heart” symbol underneath the answer…