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

Opengraph, canonical URLs, 'next' and 'prev' #1448

Merged
merged 17 commits into from
Jan 2, 2018

Conversation

Pacu2
Copy link
Contributor

@Pacu2 Pacu2 commented Dec 7, 2017

Close #1403
Close #1345

  • Added Opengraph for Product, Category pages + Default
  • Set canonical for Product and Category pages
  • Added next and prev tags for Category and Search pages

TODO:

  • Add OpenGraph on Category/Product/Default page
  • Add Canonical on Category/Product page
  • Add next and prev tags for Category page
  • Make og:url links absolute

<meta property="og:description" content="{{ category.description }}">
<meta property="og:image" content="{% static "images/block1.png" %}">

{% with category_url=category.get_full_absolute_url %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have access to request here which can convert relative URLs to absolute ones, you don't need category.get_full_absolute_url.

def get_full_absolute_url(self, ancestors=None):
return build_absolute_uri(
self.get_absolute_url(ancestors=ancestors)
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty pleeeeeease with a cherry on top: don't leave hanging parenthesis, brackets or braces.

@codecov-io
Copy link

codecov-io commented Dec 11, 2017

Codecov Report

Merging #1448 into master will increase coverage by 1.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1448      +/-   ##
==========================================
+ Coverage   82.44%   83.54%   +1.09%     
==========================================
  Files         131      128       -3     
  Lines        5668     5784     +116     
  Branches      647      662      +15     
==========================================
+ Hits         4673     4832     +159     
+ Misses        831      794      -37     
+ Partials      164      158       -6
Impacted Files Coverage Δ
saleor/core/templatetags/urls.py 100% <100%> (ø)
saleor/core/templatetags/status.py 52.94% <100%> (+1.42%) ⬆️
saleor/core/templatetags/shop.py 100% <100%> (+5.71%) ⬆️
saleor/core/utils/__init__.py 77.89% <100%> (+1.22%) ⬆️
saleor/core/utils/filters.py 43.24% <0%> (-56.76%) ⬇️
saleor/userprofile/forms.py 62.96% <0%> (-1.56%) ⬇️
saleor/data_feeds/google_merchant.py 70.33% <0%> (-0.72%) ⬇️
saleor/core/context_processors.py 88.46% <0%> (-0.43%) ⬇️
saleor/userprofile/i18n.py 96.52% <0%> (-0.2%) ⬇️
...leor/userprofile/templatetags/i18n_address_tags.py 100% <0%> (ø) ⬆️
... and 123 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc99c2e...80a83ff. Read the comment docs.

@Pacu2 Pacu2 mentioned this pull request Dec 14, 2017
@Pacu2 Pacu2 force-pushed the feature/opengraph-and-canonical branch from d66947a to 5199b1b Compare December 14, 2017 16:55
@maarcingebala maarcingebala merged commit 55a10af into saleor:master Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants