Skip to content

Commit

Permalink
add noscript content for seo (#5042)
Browse files Browse the repository at this point in the history
  • Loading branch information
danlipert authored Aug 28, 2019
1 parent 3586a50 commit 3b10e3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/dashboard/templates/bounty/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,13 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
</div>
</div>

<noscript>
<h2>{{ noscript.title }}</h2>
<h3>{{ noscript.org_name }}</h3>
<h3>{{ noscript.keywords }}</h3>
<p>{{ noscript.issue_description_text }}</p>
</noscript>

{% include 'shared/bottom_notification.html' %}
{% include 'shared/analytics.html' %}
{% include 'shared/footer_scripts.html' %}
Expand Down
5 changes: 5 additions & 0 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,11 @@ def bounty_details(request, ghuser='', ghrepo='', ghissue=0, stdbounties_id=None
params['card_title'] = f'{bounty.title} | {bounty.org_name} Funded Issue Detail | Gitcoin'
params['title'] = params['card_title']
params['card_desc'] = ellipses(bounty.issue_description_text, 255)
params['noscript'] = {
'title': bounty.title,
'org_name': bounty.org_name,
'issue_description_text': bounty.issue_description_text,
'keywords': ', '.join(bounty.keywords.split(','))}

if bounty.event and bounty.event.slug:
params['event'] = bounty.event.slug
Expand Down

0 comments on commit 3b10e3a

Please sign in to comment.