-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
Replace custom seo.html with Jekyll SEO Tag plugin #324
Comments
Sort of. I originally planned to use the Jekyll SEO Tag plugin that comes along with GitHub Pages but it didn't fully support everything the theme does (eg: Twitter Summary cards with large images). So I took what the plugin did and baked it into the theme so I could enhance and build off of it. If for whatever reason you'd rather use the native plugin instead of my customizations you can rip out |
Followup. The Jekyll SEO Tag plugin has made a lot of nice updates and now supports everything I was custom rolling into the theme and would love to swap it in. Only thing is it would be a bit more work if you want to include feature images as meta data for Twitter Cards and Open Graph. The variable names are different so you'd have to manually specify them and edit any old content.
I tried using some Liquid {% if page.header.image contains "://" %}
{% assign page.image = page.header.image %}
{% else %}
{% assign page.image = page.header.image | prepend: "/images/" | prepend: base_path %}
{% endif %}
{% if site.og_image contains "://" %}
{% assign site.logo = site.og_image %}
{% else %}
{% assign site.logo = site.og_image | prepend: "/images/" | prepend: base_path %}
{% endif %}
{% seo %} If anyone has any ideas of how to pull in images to be used with |
Workaround. Use YAML anchors to avoid duplicating values. Example: header:
image: &image /assets/images/filename.jpg
image: *image or header:
image: &image /assets/images/filename.jpg
image:
path: *image |
Added dasper theme
@mmistakes need a hand with this? It'd be great to get this into the theme. Related discussion occurring here: jekyll/jekyll-seo-tag#159 |
Sure @JHabdas if you want to work on a PR. I've been putting if off because I didn't want to deal with disrupting the current behavior and any issues that are going to flood in over "why aren't my Twitter cards showing up anymore" due to the |
@mmistakes cool. gimme a few minutes. I'll work on it now. |
That and it's going to deprecate the configurable |
@JHabdas RE: auto-adding the {% if site.gems contains 'jekyll-seo-tag' %}
{% comment %}
Add metadata for search engines and social networks if jekyll-seo-tag plugin is enabled
{% endcomment %}
{% include head-seo.html %}
{% else %}
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
{% endif %} _includes/head-seo.html {% seo %} |
There's an open issue against the SEO tag for title separator customization: jekyll/jekyll-seo-tag#121 Be great if you could upvote the issue. |
Upvoted. I'm picky about the visual appearance of that stuff so that's why I originally baked it into the theme. In the grand scheme of SEO it probably doesn't matter in the least so I can see why it might not make it into the plugin. |
I took a good long look at this and reached the conclusion there's not much to gain from adding support for Jekyll SEO Tag to this theme. Here's why:
For the adventurous using the gemified theme, you can add support for Jekyll Tag gem by doing the following:
😅 |
@JHabdas Pretty much the same conclusions I drew which is part of the reason I've held off tackleling this. My main motivation was to leverage the plugin so I wouldn't have to maintain the SEO portion of the theme and piggy back on improvements they were regularly making. But I agree, probably too many things to fight against to do it and likely lose a few custom additions the theme accounts for. Is there anything there plugin does the theme doesn't that we should add? |
👍 None that I'm aware of. There're some additional JSON-LD support in the works, though, as we're seeing, mixing several different structured data formats into one plug-in can get a little hairy. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue webpage https;\(Basic)-www. |
Comment |
Recently announced by GitHub: https://github.com/blog/2162-better-discoverability-for-github-pages-sites
The text was updated successfully, but these errors were encountered: