Mercurial > libervia-web
changeset 855:de17f7313cbe
server (blog): fixed atom feed link
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 22 Jan 2016 20:22:30 +0100 (2016-01-22) |
parents | 0dfb76b13115 |
children | fd438e51bda8 |
files | src/server/blog.py themes/default/static_blog.html |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/server/blog.py Fri Jan 22 20:22:30 2016 +0100 +++ b/src/server/blog.py Fri Jan 22 20:22:30 2016 +0100 @@ -452,7 +452,9 @@ avatar = os.path.normpath('/{}'.format(getOption('avatar'))) title = getOption(C.STATIC_BLOG_PARAM_TITLE) or user - data = {'base_url': base_url, + query_data = urllib.urlencode(getDefaultQueryData(request)).decode('utf-8') + data = {'url_base': base_url, + 'url_query': u'?{}'.format(query_data) if query_data else '' , 'keywords': getOption(C.STATIC_BLOG_PARAM_KEYWORDS), 'description': getOption(C.STATIC_BLOG_PARAM_DESCRIPTION), 'title': title,
--- a/themes/default/static_blog.html Fri Jan 22 20:22:30 2016 +0100 +++ b/themes/default/static_blog.html Fri Jan 22 20:22:30 2016 +0100 @@ -45,7 +45,7 @@ {% if entry.tags %} <ul class="mblog_tags"> {% for tag in entry.tags %} - <li><a href="{{base_url}}?tag={{tag}}">{{tag}}</a></li> + <li><a href="{{url_base}}?tag={{tag}}">{{tag}}</a></li> {% endfor %} </ul> {% endif %} @@ -86,7 +86,7 @@ <meta charset="UTF-8" /> <meta name="keywords" content="{{keywords}}" /> <meta name="description" content="{{description}}" /> - <link rel="alternate" type="application/atom+xml" href="{{base_url}}/atom.xml" /> + <link rel="alternate" type="application/atom+xml" href="{{url_base}}/atom.xml" /> <link rel='stylesheet' type="text/css" href='{{styles}}/blog.css' /> <link rel="icon" type="image/png" href="{{favicon}}" /> @@ -95,7 +95,7 @@ <body> <div class="mblog_title"> - <a href="{{base_url}}"> + <a href="{{url_base}}"> {{ image(banner_img) }} {{ title }} </a> @@ -127,7 +127,7 @@ <div class="feed"> Subscribe to this news feed - <a href="{{base_url}}/atom.xml" target="#"> + <a href="{{url_base}}/atom.xml{{url_query}}" target="#"> <img src="{{images}}/atom/Feed-icon.svg" alt="Atom feed" /> </a> </div>