speakerfight icon indicating copy to clipboard operation
speakerfight copied to clipboard

Add metatags for social networks

Open luanfonceca opened this issue 7 years ago • 11 comments

Today, if we share a link from Speakerfight into facebook or twitter there will be no previews or meaningful texts in the post because we didint setup any tags on html files.

luanfonceca avatar Sep 28 '17 22:09 luanfonceca

This issue is related with #7, it should be awesome if when I Share a proposal, the preview use the Author photo and the texts came from the proposal.

luanfonceca avatar Sep 28 '17 22:09 luanfonceca

Hi, I'd like to give this a shot!

steffiau avatar Sep 28 '17 23:09 steffiau

Hi @steffiau, If you need anything, please just tell me. And do you have any plans in how to approach this issue?

luanfonceca avatar Sep 29 '17 04:09 luanfonceca

Hi @luanfonceca, I've wanted to take a look first before giving a suggestion, but I'm having problems building the environment. I had some permission problems running pip install, so I ran the below: sudo pip install --ignore-installed -r requirements.txt It got me further but then it had this error:

creating /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet
    error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet': Operation not permitted

Still trying to find a fix. Any ideas?

steffiau avatar Oct 01 '17 01:10 steffiau

Hi @steffiau I think the problems you have are related to installing these depencies inside OS Python, right? Just like Ruby, Python has its own virtual environment ecosystem (pip). It means you need a virtualenv to install Speakerfight dependencies without harming your MacOS. Did I help you? :D

mauricioabreu avatar Oct 01 '17 03:10 mauricioabreu

Thanks @mauricioabreu! Yes I've looked for similar issues online and seems like most point to problem with using OS Python. I've tried using homebrew to install another version of Python but it didn't help. (Hopefully I haven't totally messed up my environment yet) I will try installing virtualenv and see if it works!

steffiau avatar Oct 01 '17 18:10 steffiau

@steffiau cool! You are in the right way.

After installing virtualenv (it needs root permissions to be installed), you can can execute these commands:

virtualenv my_env_name (commonly `env`)
source my_env_name/bin/activate (depends upon on your shell environment)

Now you can follow the rest of the docs to start hacking on.

mauricioabreu avatar Oct 01 '17 18:10 mauricioabreu

@mauricioabreu Thanks for the tip! I got it going finally :)

steffiau avatar Oct 06 '17 03:10 steffiau

You are welcome @steffiau :D

mauricioabreu avatar Oct 06 '17 12:10 mauricioabreu

I am looking at adding the meta tags in index.html, event_list.html, past_event_list.html, event_detail.html, in its own block. E.g.

<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f777bac7bca077f" async="async"></script>
 <link rel="stylesheet" href="{% static 'css/proposals.css' %}" type="text/css" media="screen" />
{% endblock head %}

{% block head_title %}{{ event }}{% endblock %}

<!-- meta tags for Facebook and Twitter -->
{% block head_meta %}
...
{% endblock head_meta %}

{% block content %}
 <ol class="breadcrumb">
   <li><a href="{% url 'index_page' %}">{% trans "Home" %}</a></li>

For event_detail.html, I can use the event.title and event.description For the index.html, event_list.html, past_event_list.html, what would you like to use for description? Also, is there any image (maybe something with the site's logo for example) you want to use?

I've looked at adding meta tags for proposals, but I'm afraid that's out of my capability at this moment (not as familiar with Django yet)

steffiau avatar Oct 07 '17 22:10 steffiau

Hey, can I help with this one? Seems like it hasn't been implemented yet.

vanessa avatar Sep 30 '19 04:09 vanessa