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

Social Media Optimizer #15

Closed
talha131 opened this issue Oct 4, 2013 · 23 comments
Closed

Social Media Optimizer #15

talha131 opened this issue Oct 4, 2013 · 23 comments
Assignees
Milestone

Comments

@talha131
Copy link
Member

talha131 commented Oct 4, 2013

Twitter Card. Twitter shows summary of links shared on it. How to do it so that links from sites using Elegant also get their summary shown.

@ghost ghost assigned talha131 Oct 4, 2013
@tshepang
Copy link

tshepang commented Oct 4, 2013

I am not familiar with this Twitter feature. Do you have a screenshot or link?

@talha131
Copy link
Member Author

talha131 commented Oct 4, 2013

Here you go

screen shot 2013-10-04 at 3 24 21 pm

@tshepang
Copy link

tshepang commented Oct 4, 2013

Isn't this divorced from the idea promoted in Experiments in delinkification... reduced distraction?

@talha131
Copy link
Member Author

talha131 commented Oct 4, 2013

This summary only appears on twitter site or apps. It gives followers an idea what the link is about before they click on it.

@talha131
Copy link
Member Author

talha131 commented Nov 5, 2013

Add support for G authorship

https://plus.google.com/authorship
https://support.google.com/webmasters/answer/1408986
https://support.google.com/webmasters/answer/1708844?hl=en

<link rel=”author” href=”https://plus.google.com/[YOUR PERSONAL G+ PROFILE HERE]“/>

in social links, if g+ then add author attribute

http://www.iacquire.com/blog/18-meta-tags-every-webpage-should-have-in-2013/

@talha131
Copy link
Member Author

talha131 commented Nov 5, 2013

Add support for open graph.

Check with http://smo.knowem.com/

talha131 added a commit that referenced this issue Jan 21, 2014
talha131 added a commit that referenced this issue Jan 21, 2014
talha131 added a commit that referenced this issue Jan 21, 2014
talha131 added a commit that referenced this issue Jan 21, 2014
@talha131
Copy link
Member Author

@calfzhou @tshepang can you pull these changes and publish your site IF it is not a problem. I need to run few tests on it using http://smo.knowem.com/

You can run if yourself and share your opinion, if you feel like.

@calfzhou
Copy link
Contributor

build failed: CRITICAL: 'article' is undefined

Traceback (most recent call last):
.......................
  File "/data0/zhouji/calf/gocalf-blog/elegant-theme/templates/page.html", line 20, in block "meta_tags_in_head"
    {{ seo_metadata(article) }}
  File "/data0/zhouji/calf/gocalf-blog/elegant-theme/templates/_includes/seo_metadata.html", line 2, in template
    <meta property="og:title" content="{{ article.title|striptags }} {%if article.subtitle %} - {{ article.subtitle }} {% endif %}"/>
  File "/data0/zhouji/lib/python2.7/Jinja2-2.7.1-py2.7.egg/jinja2/environment.py", line 397, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'article' is undefined

it should be seo_metadata(page) in page.html.

@calfzhou
Copy link
Contributor

@talha131 How to set og:image and twitter:image? I'd like to specify a "featured-image" to each article, but currently there is no such plugins or syntax can help.

talha131 added a commit that referenced this issue Jan 22, 2014
@talha131
Copy link
Member Author

@calfzhou I very much want to do it. We can add a new variable in the article's metadata.

:social_image: |filename|/images/butterfly-on-flower.jpg

The problem is this metadata will not be parsed. So |filename|/images/butterfly-on-flower.jpg will remain as it is. It will not be substituted with SITEURL. We will need to write a Pelican plugin to do it.

Other way is to make writer give full path of the image like,

:social_image: http://oncrashreboot.com/blog/images/butterfly-on-flower.jpg

There is also a requirement that image must be square image. So user will have to manually make sure his image is square and he has put full path in the metadata. Which I think is cumbersome?

What do you think?

talha131 added a commit that referenced this issue Jan 22, 2014
… let user set a default image for the purpose

Update #15
@talha131
Copy link
Member Author

@calfzhou what do you think of the solution?

talha131 added a commit that referenced this issue Jan 22, 2014
@calfzhou
Copy link
Contributor

I'd love to use :featured_image: which has wider meaning than social_image. A featured image can also be shown in article page, in rss feed, etc. (actually i have already prepared featured images for every single post in my blog.)

Most morden blog system supports featured_image feature.

@calfzhou
Copy link
Contributor

I really hope that internal link could work in metadata. There is a feature request in pelican (getpelican/pelican#1169).

@talha131
Copy link
Member Author

Lets see when it gets implemented.

Can you share few examples of blogs that use featured_image? Perhaps screenshot of your blog. I don't know what you mean by featured image. How is it used in RSS feeds?

Well screenshots and examples will be a great help to understand! 😄

@calfzhou
Copy link
Contributor

Here is some screenshots from my previous WordPress blog.

summary view of a post with featured image:
image

full article view of a post with featured image:
image

in rss feed:
image

Some links:

@talha131
Copy link
Member Author

Cool! Thank you.

Don't you think you can put the URL of the image in article.social_media_image tag?

@talha131
Copy link
Member Author

Call it social_media_image or featured_image either way it is going into the same meta tags

<meta property="og:image"
<meta name="twitter:image"

@talha131
Copy link
Member Author

OR do you just want to change the name of the tag, from social_media_image to featured_image? 😕

@calfzhou
Copy link
Contributor

I prefer featured_image 😆 it acts like a thumbnail of an article

talha131 added a commit that referenced this issue Jan 22, 2014
@talha131
Copy link
Member Author

I have renamed it.

@talha131
Copy link
Member Author

I tested @calfzhou post on Social Media Optimizer and couldn't find any problem.

Please comment on the issue if anyone has something new to add.

@calfzhou
Copy link
Contributor

is there any suggested size (in pixels) for social images?

@talha131
Copy link
Member Author

There is and there isn't.

twitter:image documentation says

URL to a unique image representing the content of the page. Do not use a generic image such as your website logo, author photo, or other image that spans multiple pages. The image must be a minimum size of 120x120px. Images larger than 120x120px will be resized and cropped square based on its longest dimension. Images must be less than 1MB in size.

I think we can use any image as long as it is larger than 120x120px. The site will crop the image itself.

I didn't find any specification for the image for sites that use OpenGraph like Facebook and LinkedIn.

talha131 added a commit to talha131/elegant that referenced this issue Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants