Dramatically improve AMP support, adding all the missing fields so that the AMP version still parses to a reasonable h-entry
This commit is contained in:
parent
75e08aa1b2
commit
e5a44fd38c
2 changed files with 80 additions and 3 deletions
10
lemoncurry/templatetags/absolute_url.py
Normal file
10
lemoncurry/templatetags/absolute_url.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from django import template
|
||||
from urllib.parse import urljoin
|
||||
from ..utils import origin
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
def absolute_url(context, url):
|
||||
return urljoin(origin(context.request), url)
|
Loading…
Add table
Add a link
Reference in a new issue