GithubHelp home page GithubHelp logo

jekyll / jekyll-seo-tag Goto Github PK

View Code? Open in Web Editor NEW
1.6K 36.0 290.0 579 KB

A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.

Home Page: https://jekyll.github.io/jekyll-seo-tag

License: MIT License

Ruby 93.57% Shell 1.16% HTML 5.27%
jekyll-plugin seo search-engine-optimization jekyll open-graph json-ld social-media

jekyll-seo-tag's Introduction

About Jekyll SEO Tag

A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.

Gem Version Build Status

What it does

Jekyll SEO Tag adds the following meta tags to your site:

While you could theoretically add the necessary metadata tags yourself, Jekyll SEO Tag provides a battle-tested template of crowdsourced best-practices.

What it doesn't do

Jekyll SEO tag is designed to output machine-readable metadata for search engines and social networks to index and display. If you're looking for something to analyze your Jekyll site's structure and content (e.g., more traditional SEO optimization), take a look at The Jekyll SEO Gem.

Jekyll SEO tag isn't designed to accommodate every possible use case. It should work for most site out of the box and without a laundry list of configuration options that serve only to confuse most users.

Documentation

For more information, see:

jekyll-seo-tag's People

Contributors

8parth avatar aarongustafson avatar aav7fl avatar ashmaroli avatar benbalter avatar boturnbow avatar cgarces avatar coliff avatar dirtyf avatar jekyllbot avatar kemenaran avatar michaelcurrin avatar miguelfrde avatar mpchadwick avatar numist avatar parkr avatar pathawks avatar petergoldstein avatar ptcodes avatar pzmarzly avatar renshuki avatar samtrion avatar scottwater avatar seafr avatar set0gut1 avatar suriyaakudoisc avatar tfe avatar tordans avatar wsdjeg avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-seo-tag's Issues

Use image in post if metadata image not provided

If I write a post that has an image declared in the body, it'd be nice for this plugin to just pull the first image right out of the post instead of having to declare an image in the metadata.

That might be beyond the scope of this plugin's functionality or be too complex to maintain, so feel free to reject and close, but figured it was worth mentioning and proposing.

Cheers!

Strip html from meta property

Hi there,

Is there anyway to strip html from meta property like og:title, og:description and so on? I have some html code in my output like   and would like to remove it.

Make Jekyll SEO Tag an "official" Jekyll plugin?

After doing significant copy pasta to add some search engine metadata to choosealicense.com over in github/choosealicense.com#300, I realized every time I stand up a new Jekyll site, I basically copy the seo.html include from my personal site, which feels silly.

Like jekyll-sitemap and jekyll-feed which uses the magic of open source to crowd source a best-of-the-best template, I figured it's simple enough to do the same with an include for SEO metadata (including Twitter cards and open graph tags) and spiked out this tiny Gem, which essentially gemifies the include.

@parkr do you think there's any community interest in seeing this be a community maintained (e.g. Jekyll owned plugin)? Since it's just a template in user land, assuming the render logic is sound, I believe it should be easy enough to add to Pages.

/cc @leereilly because SEO 😄

Suport for BlogPosting

The template is defined as NewsArticle, but in some sites BlogPosting is more accurate.

Both types inherit from Article, change the @type based on the value at _config.yml should work.

Something like

seo:
  schema: BlogPosting

idea: SEO/SMO linter

Imagine linter for checking SEO/SMO tags in frontmatter.
Something like:

jekyll lint-seo-tags
  _posts/2016-07-02-my-post.md
    title too long: use 50 chars max
    no description and no excerpt
    image ratio for facebook inappropriate, expecting 2:1
    image size for twitter too big, expecting not more than 2mb

Support Twitter summary card with large image

Hi,

Support of large image in Twitter Summary Cards would be nice.

The only difference with the actual summary card seems to be the content attribute value:

<meta name="twitter:card" content="summary_large_image">

I manually added the meta:
https://github.com/sudweb/2016/blob/gh-pages/_includes/head.html#L8

I tested it on http://sudweb.github.io/2016/
It seems that if both twitter meta are present, Twitter use the large image version:

twitter-card-summary-large

I can try to submit a PR if you agree adding this.

Thanks.

Extra slashes in logo output

Hi there,

In my _config.yml file I have:

# Setup
url: http://www.iloveip.ru/
logo: /images/logo_XL.png

But in the output for logo there are some extra slashes:

<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Organization",
      "url": "http://www.iloveip.ru/",
      "logo": "http://www.iloveip.ru///images/logo_XL.png"
    }
  </script>

Is there any way to fix it?

Add Config to Prevent Site Name from Being appended to Title

It would be fantastic to have something in config that would prevent this.

Currently if site.title is absent it has a fallback to site.name - removing both breaks a lot of other functionality.

It would be great to be able to have the meta title tag be post.title without - bar on the end - is this possible to add?

(if only I had a better understanding of ruby I would fork and PR this myself)

JSON-LD Refinement

Hi all. I've been recently working with Schema data in various formats and testing the results with the official Structured Data Testing Tool from Google. After testing the jekyll-seo-tag gem on my GitHub Pages I noticed that a few errors are shown from the JSON-LD.

TL;DR

Use the Google Structured Data Testing Tool to test the following files:

You can find all my examples in the following gist.

Edit: I realise that there are a few values that can't be determined automatically, specifically the height and width values of images. Best to leave them out but provide a way for users to add them via front matter(?).

Sorry to blast all this at you, but I really like this tool and I just wanted to help make it better ✌️

gsub undefined error if title is a number

If I add {% seo %} to the head I get this error

Configuration file: G:/_data/projects/Test/Blog/src/_config.yml Source: G:/_data/projects/Test/Blog/src Destination: G:/_data/projects/Test/Blog/src/_site Incremental build: disabled. Enable with --incremental Generating... Liquid Exception: undefined method gsub' for 404:Fixnum in _includes/head.html, included in _layouts/default.html
C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/tags/include.rb:132:in rescue in render': undefined method gsub' for 404:Fixnum (Jekyll::Tags::IncludeTagError)
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/tags/include.rb:124:in render' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/block.rb:151:in render_token'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/profiler/hooks.rb:5:in block in render_token_with_profiling' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/profiler.rb:80:in profile_token_render'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/profiler/hooks.rb:4:in render_token_with_profiling' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/block.rb:135:in block in render_all'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/block.rb:122:in each' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/block.rb:122:in render_all'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/block.rb:108:in render' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/template.rb:210:in block in render'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/template.rb:262:in with_profiling' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/template.rb:209:in render'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/liquid-3.0.6/lib/liquid/template.rb:222:in render!' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:28:in block (2 levels) in render!'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:36:in measure_bytes' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:27:in block in render!'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:43:in measure_time' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:26:in render!'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/renderer.rb:106:in render_liquid' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/renderer.rb:146:in place_in_layouts'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/renderer.rb:70:in run' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:179:in block in render'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:177:in each' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:177:in render'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/site.rb:59:in process' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/command.rb:26:in process_site'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:60:in build' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:33:in process'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:16:in block (2 levels) in init_with_program' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in call'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in block in execute' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in each'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in execute' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in go'
from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in program' from C:/tools/ruby22/lib/ruby/gems/2.2.0/gems/jekyll-3.1.6/bin/jekyll:13:in <top (required)>'
from C:/tools/ruby22/bin/jekyll:23:in load' from C:/tools/ruby22/bin/jekyll:23:in

'`

I've added all elements to the config as described in the readme.

Support "robots" field in YAML front matter

The idea being that if the field robots exists in a document's YAML front matter, we'd put the contents in the head meta, e.g., robots: noindex, nofollow. Obviously, if it wasn't there, we wouldn't do anything.

Issue with showing post or page image in generated tag script

I have installed Jekyll-SEO-tag as per the specification and my config is as follows:

# Site settings
title: Ray Besiga
email: [email protected]
description: > # this means to ignore newlines until "baseurl:"
  I’m Ray Besiga, a product engineer and designer. I'm a Front-End User Experience Engineer at Catalpa. I co-founded Sparkplug.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://raybesiga.com" # the base hostname & protocol for your site
twitter:
  username: raybesiga
github:
  username: raybesiga

social:
  type: person
  name: Ray Besiga
  links:
    instagram: https://instagram.com/raybesiga
    twitter: https://www.twitter.com/raybesiga

author:
  twitter: raybesiga
  picture: /public/images/ray2-akabbo.png


# Build settings
markdown: kramdown

permalink:        /blog/:year/:month/:day/:title.html
highlighter: pygments
gems:
  - jekyll-seo-tag

I configure my head file this way, to compare the hard-coded meta with the generated meta

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="author" content="Ray Besiga">
  <meta name="google-site-verification" content="hCqw44bSMvFzmWy2huAlYHbMHKdIkdvm8aiOR3VwMAo" />

  <meta property="og:author" content="Ray Besiga">
  <meta property="og:title" content="{{ page.title }}">
  <meta property="og:url" content="{{ site.url }}{{ page.url }}">
  <meta property="og:description" content="{% if page.description %}{{ page.description | truncate: 160 }}{% else %}{{ page.excerpt }}{% endif %}">
  <meta property="og:site_name" content="Ray Besiga">
  <meta property="og:image" content="{{ site.url }}{{ page.image }}">

  <!-- Twitter Tags -->
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="{{ site.url }}{{ page.url }}">
    <meta name="twitter:title" content="{{ page.title }}">
    <meta name="twitter:description" content="{% if page.description %}{{ page.description | truncate: 160 }}{% else %}{{ page.excerpt }}{% endif %}">
    <meta name="twitter:image" content="{{ site.url }}{{ page.image }}">
    <meta property="twitter:domain" value="raybesiga.com"/>



  <title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
  <meta name="description" content="{% if page.description %}{{ page.description | truncate: 160 }}{% else %}{{ page.excerpt }}{% endif %}">
  <meta name="language" content="english">

  <link rel="shortcut icon" href="/public/favicon.ico">


  <link rel="stylesheet" href="{{ "/css/style.min.css" | prepend: site.baseurl }}">
  <link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl }}">
  <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
  <link rel="alternate" type="application/rss+xml" title="{{ site.title }} Feed" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
  {% seo %}
</head>

On inspection, the Image URL is not defined right:

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="author" content="Ray Besiga">
  <meta name="google-site-verification" content="hCqw44bSMvFzmWy2huAlYHbMHKdIkdvm8aiOR3VwMAo" />

  <meta property="og:author" content="Ray Besiga">
  <meta property="og:title" content="A basic Django app with the Github API">
  <meta property="og:url" content="http://raybesiga.com/blog/2016/02/23/basic-django-app-github-api.html">
  <meta property="og:description" content="A basic Django app with the Github API">
  <meta property="og:site_name" content="Ray Besiga">
  <meta property="og:image" content="http://raybesiga.com/public/images/Github_Yokogao.png">

  <!-- Twitter Tags -->
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="http://raybesiga.com/blog/2016/02/23/basic-django-app-github-api.html">
    <meta name="twitter:title" content="A basic Django app with the Github API">
    <meta name="twitter:description" content="A basic Django app with the Github API">
    <meta name="twitter:image" content="http://raybesiga.com/public/images/Github_Yokogao.png">
    <meta property="twitter:domain" value="raybesiga.com"/>



  <title>A basic Django app with the Github API</title>
  <meta name="description" content="A basic Django app with the Github API">
  <meta name="language" content="english">

  <link rel="shortcut icon" href="/public/favicon.ico">


  <link rel="stylesheet" href="/css/style.min.css">
  <link rel="stylesheet" href="/css/syntax.css">
  <link rel="canonical" href="http://raybesiga.com/blog/2016/02/23/basic-django-app-github-api.html">
  <link rel="alternate" type="application/rss+xml" title="Ray Besiga Feed" href="http://raybesiga.com/feed.xml">
  <!-- Begin Jekyll SEO tag v3.0.3 -->
<title>A basic Django app with the Github API - Ray Besiga</title>
<meta property="og:title" content="A basic Django app with the Github API" />
<meta name="description" content="A basic Django app with the Github API" />
<meta property='og:description' content="A basic Django app with the Github API" />
<link rel="canonical" href="http://raybesiga.com/blog/2016/02/23/basic-django-app-github-api.html" />
<meta property='og:url' content='http://raybesiga.com/blog/2016/02/23/basic-django-app-github-api.html' />
<meta property="og:site_name" content="Ray Besiga" />
<script type="application/ld+json">
    {
      "@context" : "http://schema.org",
      "@type" : "WebSite",
      "name" : "Ray Besiga",
      "url" : "http://raybesiga.com"
    }
  </script>
<meta property="og:image" content="http://raybesiga.com//public/images/Github_Yokogao.png" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2016-02-23T00:00:00+00:00" />
<link rel="prev" href="http://raybesiga.com/blog/2015/12/04/stylish-side-transform-africa-conference.html" title="The fun side to Transform Africa 2015" />
<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "NewsArticle",
      "headline": "A basic Django app with the Github API",
      "image": "/public/images/Github_Yokogao.png",
      "datePublished": "2016-02-23T00:00:00+00:00",
      "description": "A basic Django app with the Github API"
    }
  </script>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@raybesiga" />
<meta name="twitter:title" content="A basic Django app with the Github API - Ray Besiga" />
<meta name="twitter:description" content="A basic Django app with the Github API" />
<meta name="twitter:image" content="/public/images/Github_Yokogao.png" />
<meta name="twitter:creator" content="@raybesiga" />
<script type="application/ld+json">
    {
      "@context" : "http://schema.org",
      "@type" : "person",
      "name" : "Ray Besiga",
      "url" : "http://raybesiga.com",
      "sameAs" : {"instagram":"https://instagram.com/raybesiga","twitter":"https://www.twitter.com/raybesiga"}
    }
  </script>
<!-- End Jekyll SEO tag -->
</head>

Is there a configuration I am getting wrong?

Poor Man’s Smartypants

{% assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once %}

What we are doing here is rolling our own SmartyPants implementation in Liquid, which is not great.

Redcarpet has a fantastic SmartyPants implementation, and is even already included in GitHub Pages.

We could implement our own Liquid filter (visible only to this plugin) that will call Redcarpet::Render::SmartyPants.render. This way, we could do all of this in one filter instead of four. Additionally, this will properly output the title #Hashtag instead of (currently) changing it to Hashtag (because Markdown treats the # as an <h1> tag, which is then stripped).

The only reason I open this as an issue instead of a PR is because requiring Redcarpet gives me pause.

Define image (og:image) globally in _config.yml or layouts

Hi,
Actually image: need to be specified in a (post/page/document) YAML front matter. It would be nice if this parameter could be added globally to the _config.yml file (with the possibility to overwrite it afterwards via YAML front matter if needed).

jekyll-feed

I don't know how to give better title.

jekyll-feed use site.name:, not site.title:

# Should I use this ?
# Look funny ;)
title:     'Jekyll'
name: 'Jekyll'

Author

# post front-matter

# jekyll-seo-tag
author: John Doe

# jekyll-feed
author:
  name: John Doe
  uri: john-doe.com

Will there be a conflict?

Add meta name="author"

It seems:
<meta name="author" content="">
is not added even if an author is specified in YAML front matter of a post/page/document.

Maybe useful to add?

Use page.excerpt for og:description

There is any possibility to use the page.excerpt if page description not is available?
I think that is a better approach that use the site.description.
This is my current code that cam be adapted is some way

    <meta property="og:description" content="{% if page.layout != "post" %}{{ site.description | strip_html }}{% else %}{{ page.excerpt | strip_html }}{% endif %}"/>

Consolidate and clean up JSON-LD

Right now, we are outputting (potentially) four JSON-LD blocks on a single page, each claiming the page to be a different @type, any many containing redundant data.

I believe we could consolidate these into a single block with a single @type and still convey all the same information.

Author name == Twitter Username?

We are currently assuming that, if an author is provided for a post, the author is a string that corresponds to a Twitter username.

That is to say, author: "Pat Hawks" would cause false data to be rendered, because my Twitter username has no space in it, but I do include a space in the name I include on my site.

Not sure of the best path forward. We could assume author is a hash that has keys twitter and name. We could look up the provided author name in a hash in _data/, or something...

Document how to use front matter defaults

is it possible to set a default image for the image: frontmatter? would be great to be able to set a default (or you might call it fallback) setting for images. It just does not feel right to add the same image to all posts/articles

using

image: <the image value>

does not change any page at the moment

Prev/next links are more appropriate for pagination?

Quote from this google blogpost:

Throughout the web, a paginated series of content may take many shapes—it can be an article divided into several component pages, or a product category with items spread across several pages, or a forum thread divided into a sequence of URLs.

I am not sure that it is good to use prev/next meta links on posts because content on each of them may be completely different and not related at all. However, I am sure that these links must be enabled on pages with pagination. What do you think?

Question about Google Analytics

Hi there,

I see that jekyll-seo-tag generates <script async="" src="//www.google-analytics.com/analytics.js"></script> in the <head> of the site. Do I need to include the standard Google Analytics script to the site additionally? If not, how do I add Google Analytics ID code (UA-XXXXXXXX-X) to the script above?

Issues with the plugin

So, I'm trying to get the plugin in Bootstrap v4-dev branch and I notice the following (sorry for not splitting them)

  1. <meta name="twitter:description" content="" /> while <meta name="description" content="Bootstrap, a sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.">. The description is set in _config.yml
  2. The title is wrong if I set title=false. <meta property="og:title" content="Introduction" /> and "headline": "Introduction", vs <title>Introduction &middot; Bootstrap</title>.

The branch for testing is here: twbs/bootstrap@v4-dev...v4-dev-xmr-jekyll-social-tag

Ability to support Facebook and Twitter specific images, set image height and width

Via @leereilly, Facebook and Twitter require different sized images, and for Facebook, if height and width is passed, it saves Facebook from making an async call, and thus the image loads faster. Isn't the internet a wonderful place?

I'm thinking that the image property should continue to work as it does today, if it's passed a string, e.g., image: /foo.png.

However, if the image property is an object (the "advanced usage"), we can look to and output the following (optional) properties:

  • path - same as passing a string, but allows you to also specify height and width
  • twitter - the path to the Twitter image
  • facebook - the path to the facebook image
  • height - the explicit image height
  • width - the explicit image width

Add "keywords"

site.keywords can be join'd by a , to yield the keywords meta tag.

Leveraging new (jekyll 3) `layout` metadata when `page` front-matter not present

Sometimes I use layout front-matter/metadata instead of page front-matter when I have multiple pages that have mostly the same content. However, since Jekyll 3 no longer merges the layout metadata with page front-matter, title and description on a layout don't get populated by jekyll seo tag. What do you think about:

{% if page.title || layout.title %}
  {% assign seo_title = page.title || layout.title %}
  ...
{% endif %}

For context, I create api docs with urls/pages like:
/docs/api/ruby.html
/docs/api/python.html
/docs/api/java.html
/docs/api/node.html
/docs/api/...
All those pages use the same layout, and should have the same title, description, and corresponding metadata.

Tests fail

I was starting to make a pull request for #24, but after forking and cloning master all tests fail with:

NoMethodError:
       private method `new' called for Jekyll::SeoTag:Class

I tried several things (ruby versions, gem re-installs) and then tested the 0.1.4 tag with the same test failures. Just to be sure I pushed a small readme change to travis and the build failed on travis, too: https://travis-ci.org/boturnbow/jekyll-seo-tag/builds/106609578. I cloned jekyll/jekyll and benbalter/jekyll-avatar and ran tests locally - all passed. So, that leads me to believe that the problem is not entirely a local-to-my-machine problem.

Any insights?

Integration with jekyll-assets?

Do you have any plans to provide integration with jekyll-assets so that if somebody's using that gem with jekyll-seo-tag, they can specify the name of an image in "site.logo" or "page.image" and have everything "just work"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.