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

Author object tags showing at top of page #289

Closed
padraic7a opened this Issue Apr 27, 2016 · 23 comments

Comments

Projects
None yet
3 participants
@padraic7a

padraic7a commented Apr 27, 2016

I know this must mean I've done something silly but I can't see what it is.

When I build the site it displays as follows:
selection_004

Any hints as to what I've done?

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Apr 27, 2016

Owner

Not exactly sure but all those variables are author ones in _config.yml. Maybe you have some improperly formatted YAML there.

Owner

mmistakes commented Apr 27, 2016

Not exactly sure but all those variables are author ones in _config.yml. Maybe you have some improperly formatted YAML there.

@padraic7a

This comment has been minimized.

Show comment
Hide comment
@padraic7a

padraic7a Apr 27, 2016

That must be it. Thanks for your time and the theme.

padraic7a commented Apr 27, 2016

That must be it. Thanks for your time and the theme.

@padraic7a padraic7a closed this Apr 27, 2016

@padraic7a padraic7a reopened this Apr 27, 2016

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Apr 27, 2016

Owner

I think you found a bug.
In _config.yml. Quick fix is to add a Twitter account under author

author:
  twitter: "padraicst"

There's a conditional in the <head> that I need to improve. It's getting confused by the fact that you set site twitter.username but not author.twitter as well.

Owner

mmistakes commented Apr 27, 2016

I think you found a bug.
In _config.yml. Quick fix is to add a Twitter account under author

author:
  twitter: "padraicst"

There's a conditional in the <head> that I need to improve. It's getting confused by the fact that you set site twitter.username but not author.twitter as well.

@mmistakes mmistakes added the Type: Bug label Apr 27, 2016

@mmistakes mmistakes added this to the 3.1.3 milestone Apr 27, 2016

@mmistakes mmistakes self-assigned this Apr 27, 2016

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Apr 27, 2016

Owner

Bug fix, change *_includes/seo.html line 28

{% assign seo_author = page.author | default: page.author[0] | default: site.author[0] %}
Owner

mmistakes commented Apr 27, 2016

Bug fix, change *_includes/seo.html line 28

{% assign seo_author = page.author | default: page.author[0] | default: site.author[0] %}
@padraic7a

This comment has been minimized.

Show comment
Hide comment
@padraic7a

padraic7a Apr 27, 2016

Ah, I was just drafting a response saying that it only triggers with a twitter username. I thought it might be because I put some extra gems in the gemfile.

Thanks again for your help!

padraic7a commented Apr 27, 2016

Ah, I was just drafting a response saying that it only triggers with a twitter username. I thought it might be because I put some extra gems in the gemfile.

Thanks again for your help!

mmistakes added a commit that referenced this issue Apr 27, 2016

Fix SEO author bug
- If `twitter.username` is set and `author.twitter` is nil bad things happen.
- Close #289

@mmistakes mmistakes closed this in a01f5db Apr 27, 2016

sobkowiak added a commit to sobkowiak/sobkowiak.github.io-new that referenced this issue Apr 29, 2016

Fix SEO author bug
- If `twitter.username` is set and `author.twitter` is nil bad things happen.
- Close mmistakes#289

sobkowiak added a commit to sobkowiak/sobkowiak.github.io-new that referenced this issue Apr 29, 2016

Fix SEO author bug
- If `twitter.username` is set and `author.twitter` is nil bad things happen.
- Close mmistakes#289

sobkowiak added a commit to sobkowiak/sobkowiak.github.io-new that referenced this issue Apr 29, 2016

Fix SEO author bug
- If `twitter.username` is set and `author.twitter` is nil bad things happen.
- Close mmistakes#289

cjmadsen pushed a commit to cjmadsen/cjmadsen.github.io that referenced this issue Dec 7, 2016

jluccisano added a commit to jluccisano/jluccisano.github.io that referenced this issue May 6, 2017

Fix SEO author bug
- If `twitter.username` is set and `author.twitter` is nil bad things happen.
- Close mmistakes#289
@viktorsmari

This comment has been minimized.

Show comment
Hide comment
@viktorsmari

viktorsmari Jan 8, 2018

I have a related bug. I was using the Jekyll Wordpress importer tool and it creates the front matter yaml:

author:
  display_name: Someone
  login: someone
  email: someone@gmail.com
  url: ''

As a result I get this:

a

I traced the error to this line:
https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/seo.html#L42

Any ideas?

I am using this theme as a remote_theme in the _config.yml

viktorsmari commented Jan 8, 2018

I have a related bug. I was using the Jekyll Wordpress importer tool and it creates the front matter yaml:

author:
  display_name: Someone
  login: someone
  email: someone@gmail.com
  url: ''

As a result I get this:

a

I traced the error to this line:
https://github.com/mmistakes/minimal-mistakes/blob/master/_includes/seo.html#L42

Any ideas?

I am using this theme as a remote_theme in the _config.yml

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@viktorsmari The theme expects author to be a string not an array, that's why it's outputted that garbage at the top of your posts.

This is the way the theme expects post author's to be specified.

Owner

mmistakes commented Jan 8, 2018

@viktorsmari The theme expects author to be a string not an array, that's why it's outputted that garbage at the top of your posts.

This is the way the theme expects post author's to be specified.

@viktorsmari

This comment has been minimized.

Show comment
Hide comment
@viktorsmari

viktorsmari Jan 8, 2018

Thank you.

Because I was migrating a Wordpress site with hundreds of posts with the same front matter format, where the author is an array. Do I need to change each post or is there a simpler way?
I am trying not to mess with the theme defaults.

viktorsmari commented Jan 8, 2018

Thank you.

Because I was migrating a Wordpress site with hundreds of posts with the same front matter format, where the author is an array. Do I need to change each post or is there a simpler way?
I am trying not to mess with the theme defaults.

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@viktorsmari I don't think there is an easy way forward. I'll take a look at the templates and see if there is something I can adjust. jekyll/feed and jekyll/jekyll-seo-tag both use author in a similar way as this theme. I'll take a look and see what their solution is to accept author as a string or object.

Owner

mmistakes commented Jan 8, 2018

@viktorsmari I don't think there is an easy way forward. I'll take a look at the templates and see if there is something I can adjust. jekyll/feed and jekyll/jekyll-seo-tag both use author in a similar way as this theme. I'll take a look and see what their solution is to accept author as a string or object.

@mmistakes mmistakes reopened this Jan 8, 2018

@mmistakes mmistakes changed the title from Meta tags showing at top of page to Author object tags showing at top of page Jan 8, 2018

mmistakes added a commit that referenced this issue Jan 8, 2018

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@viktorsmari I pushed some updates. Try changing remote_theme to the fix branch and see if that takes care of the issue.

remote_theme: "mmistakes/minimal-mistakes@seo-fixes"

Owner

mmistakes commented Jan 8, 2018

@viktorsmari I pushed some updates. Try changing remote_theme to the fix branch and see if that takes care of the issue.

remote_theme: "mmistakes/minimal-mistakes@seo-fixes"

@viktorsmari

This comment has been minimized.

Show comment
Hide comment
@viktorsmari

viktorsmari Jan 8, 2018

Hmm does not seem to work, if you want to try it yourself it is an open source project:

https://github.com/piratar/piratar-jekyll

Remember to remove the _includes/seo.html, or uncomment line ~42.

I start the project with the ./server.sh

viktorsmari commented Jan 8, 2018

Hmm does not seem to work, if you want to try it yourself it is an open source project:

https://github.com/piratar/piratar-jekyll

Remember to remove the _includes/seo.html, or uncomment line ~42.

I start the project with the ./server.sh

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@viktorsmari Quick look you didn't update remote_theme in your _config.yml. You need to use the line above so it pulls from the git branch with the fix. Otherwise it'll continue to use the current version on master.

remote_theme: "mmistakes/minimal-mistakes@seo-fixes"
Owner

mmistakes commented Jan 8, 2018

@viktorsmari Quick look you didn't update remote_theme in your _config.yml. You need to use the line above so it pulls from the git branch with the fix. Otherwise it'll continue to use the current version on master.

remote_theme: "mmistakes/minimal-mistakes@seo-fixes"
@viktorsmari

This comment has been minimized.

Show comment
Hide comment
@viktorsmari

viktorsmari Jan 8, 2018

I tried that locally, which did not work. I just did not push this change to Github.

viktorsmari commented Jan 8, 2018

I tried that locally, which did not work. I just did not push this change to Github.

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@viktorsmari Hmmm. Define not working. I'm not seeing the author object array text on any of your pages like before.

image

Owner

mmistakes commented Jan 8, 2018

@viktorsmari Hmmm. Define not working. I'm not seeing the author object array text on any of your pages like before.

image

@viktorsmari

This comment has been minimized.

Show comment
Hide comment
@viktorsmari

viktorsmari Jan 8, 2018

If you scroll at the bottom of the frontpage, there are many pages you can try.

Like the last one "Styrkja Pirata", does that one work?

Did you also undo/uncomment the SEO I wrote above?

viktorsmari commented Jan 8, 2018

If you scroll at the bottom of the frontpage, there are many pages you can try.

Like the last one "Styrkja Pirata", does that one work?

Did you also undo/uncomment the SEO I wrote above?

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@viktorsmari Yup. I removed your local version of _includes/seo.html so it doesn't override the fixed one in the theme.

All the pages, including that last one work as expected. No erroneous text printing on the pages from author.

image

Owner

mmistakes commented Jan 8, 2018

@viktorsmari Yup. I removed your local version of _includes/seo.html so it doesn't override the fixed one in the theme.

All the pages, including that last one work as expected. No erroneous text printing on the pages from author.

image

@viktorsmari

This comment has been minimized.

Show comment
Hide comment
@viktorsmari

viktorsmari Jan 8, 2018

Weird, this is my setup:
2018-01-08_441x93
2018-01-08_677x98

viktorsmari commented Jan 8, 2018

Weird, this is my setup:
2018-01-08_441x93
2018-01-08_677x98

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@padraic7a And you deleted your copy of _includes/seo.html?

Owner

mmistakes commented Jan 8, 2018

@padraic7a And you deleted your copy of _includes/seo.html?

@viktorsmari

This comment has been minimized.

Show comment
Hide comment
@viktorsmari

viktorsmari Jan 8, 2018

Haha, that was it!

Thank you for your patience!

viktorsmari commented Jan 8, 2018

Haha, that was it!

Thank you for your patience!

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

@viktorsmari OK good.

FYI - When I merge in this change you'll want to remove @seo-fixes from the remote theme line. It can pull from master at that point since that SEO branch will eventually be deleted.

Owner

mmistakes commented Jan 8, 2018

@viktorsmari OK good.

FYI - When I merge in this change you'll want to remove @seo-fixes from the remote theme line. It can pull from master at that point since that SEO branch will eventually be deleted.

@padraic7a

This comment has been minimized.

Show comment
Hide comment
@padraic7a

padraic7a Jan 8, 2018

Hi @mmistakes , I haven't updated or even looked at the site since April 2016. I'll check this thread out when I get to update again.

Do you need me to close this issue?

padraic7a commented Jan 8, 2018

Hi @mmistakes , I haven't updated or even looked at the site since April 2016. I'll check this thread out when I get to update again.

Do you need me to close this issue?

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jan 8, 2018

Owner

Nah don't worry about it @padraic7a, I reopened it today to deal with a sort of related issue.

It'll close automatically when I merge in the fix 176261c

A lot has changed with the theme since then, if/when you get around to updating give the docs a look. It's much easier to install/upgrade the theme once you migrate.

Owner

mmistakes commented Jan 8, 2018

Nah don't worry about it @padraic7a, I reopened it today to deal with a sort of related issue.

It'll close automatically when I merge in the fix 176261c

A lot has changed with the theme since then, if/when you get around to updating give the docs a look. It's much easier to install/upgrade the theme once you migrate.

@padraic7a

This comment has been minimized.

Show comment
Hide comment
@padraic7a

padraic7a Jan 8, 2018

padraic7a commented Jan 8, 2018

@mmistakes mmistakes closed this in 51544d5 Jan 9, 2018

antonizoon pushed a commit to antonizoon/antonizoon.github.io that referenced this issue Jul 27, 2018

Fix SEO author bug
- If `twitter.username` is set and `author.twitter` is nil bad things happen.
- Close mmistakes#289
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment