Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jekyll-seo-tag dependency #139

Merged
merged 7 commits into from
Aug 17, 2017
Merged

Add jekyll-seo-tag dependency #139

merged 7 commits into from
Aug 17, 2017

Conversation

DirtyF
Copy link
Member

@DirtyF DirtyF commented Jul 5, 2017

From Jeyll 3.5, gem-based themes can declare plugin dependencies.

Let's improve SEO for all minima users.

fix #138 #96

@DirtyF DirtyF requested a review from benbalter July 5, 2017 20:51
@DirtyF DirtyF changed the title Add jekyll-seo-tag depedency Add jekyll-seo-tag dependency Jul 5, 2017
Copy link
Contributor

@benbalter benbalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ashawley
Copy link
Contributor

ashawley commented Jul 6, 2017

For completeness, list it as a plugin in the config?

@ashmaroli
Copy link
Member

For completeness, list it as a plugin in the config?

@ashawley this isn't necessary, Jekyll 3.5 will look into the .gemspec and automatically require the seo plugin.

@ashmaroli
Copy link
Member

@DirtyF Can we remove the whitespace around the <link> tags?
Also, it'd be nice if the README mentioned this enhancement and advising users there's no need for additionally adding the seo-plugin to their config file / Gemfile

@ashmaroli ashmaroli mentioned this pull request Jul 6, 2017
@ashawley
Copy link
Contributor

ashawley commented Jul 6, 2017

this isn't necessary, Jekyll 3.5 will look into the .gemspec and automatically require the seo plugin.

I recognize it's not necessary. Just seems worth documenting in the default config, as well as the README

@ashmaroli
Copy link
Member

seems worth documenting in the default config, as well as the README

I'm fine with appending to the README but on the fence about documenting in the config file because IMO it wouldn't matter if users add the seo-plugin to their config file because Ruby may not call require on the same plugin twice (currently demonstrated with a plugin added to both :jekyll_plugins in Gemfile and plugins in config file.)

@ashawley
Copy link
Contributor

ashawley commented Jul 6, 2017

it wouldn't matter if users add the seo-plugin to their config file because Ruby may not call require on the same plugin twice

Are you saying that plugins listed under plugins in the config automatically get pulled in by Ruby? I didn't think it did that. It only gives an error. Maybe I'm missing something.

@ashmaroli
Copy link
Member

Are you saying that plugins listed under plugins in the config automatically get pulled in by Ruby?

Plugins listed under plugins: in the config file get pulled in by Ruby if the plugin-gem is available for loading. Jekyll raises errors under following situations:

  • The plugin is not installed on the local system
  • When there's a Gemfile, and the installed plugin is not included in it.
    The error in this case is due to Bundler selectively masking the installed gems based on the Gemfile, ergo to Jekyll, your plugin-gem is not installed if its not in the Gemfile

GitHub Pages ignores a Gemfile, so it loads plugins based on the config file alone. Once it gets upgraded to Jekyll 3.5, it will additionally load whitelisted plugins from a theme's .gemspec

@ashawley
Copy link
Contributor

ashawley commented Jul 6, 2017

When there's a Gemfile, and the installed plugin is not included in it.

Ah, this is the piece I was missing. Thanks.

@DirtyF DirtyF requested a review from ashmaroli July 6, 2017 14:15
Copy link
Member

@ashmaroli ashmaroli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor corrections.
Otherwise, this is good-to-go once GitHub Pages is on Jekyll 3.5

README.md Outdated
@@ -65,6 +65,9 @@ Contains the `main.scss` that imports sass files from within the `_sass` directo

This directory can include sub-directories to manage assets of similar type, and will be copied over as is, to the final transformed site directory.

### Plugins

minima includes [`jekyll-seo-tag`](https://github.com/jekyll/jekyll-seo-tag) plugin, to make sure your website gets the most useful meta tags. See [usage](https://github.com/jekyll/jekyll-seo-tag#usage) to set it up.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer title-case Minima on L#70, in line with elsewhere in this doc.
IMO ...to set it up may imply installation to some. So let's replace the phrase with a more verbose ...for a list of supported properties

Also, I think we need to state that users need not add this plugin to their config file.

@DirtyF DirtyF force-pushed the jekyll-seo-tag-dependency branch from bf42b7b to d237b68 Compare July 6, 2017 14:43
@DirtyF DirtyF merged commit 4d08714 into master Aug 17, 2017
@DirtyF DirtyF deleted the jekyll-seo-tag-dependency branch August 17, 2017 14:14
@DirtyF
Copy link
Member Author

DirtyF commented Aug 17, 2017

@benbalter For now it works locally with GitHub Pages gem when pointing to minima master branch but not on GitHub Pages, build failed:

The tag seo on line 5 in _includes/head.html, is not a recognized Liquid tag.

@benbalter
Copy link
Contributor

@DirtyF if we cut a new version of minima and bump it in the GitHub Pages Gem, it should build properly (lest any user could add a runtime dependency to a theme and whitelist any gem for use on GitHub Pages).

@ashmaroli
Copy link
Member

@DirtyF Since you did not invoke JekyllBot to merge this, you'll have to manually update History.markdown to document this enhancement.

ashmaroli added a commit to ashmaroli/minima that referenced this pull request Aug 17, 2017
ashmaroli added a commit to ashmaroli/minima that referenced this pull request Aug 17, 2017
DirtyF added a commit that referenced this pull request Aug 17, 2017
Update history to reflect merge of #139 [ci skip]
@jekyll jekyll locked and limited conversation to collaborators Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Open Graph tags
5 participants