When the blog is hosted in a path like http://localhost/blog/ There is an issue with alias redirect.
In the function create_alias you are adding a slash in the beginning when it is a local path and it is making the path absolute which is wrong. i,e. it redirects user to http://localhost/:slug instead of http://localhost/blog/:slug .
I suggest either to remove the slash in the beginning or to construct destination with complete URL like below.
def article_url(page):
site_url = page.settings['SITEURL']
return quote(('%s/%s' % (site_url, page.url)).encode('utf-8'))
When the blog is hosted in a path like http://localhost/blog/ There is an issue with alias redirect.
In the function
create_aliasyou are adding a slash in the beginning when it is a local path and it is making the path absolute which is wrong. i,e. it redirects user tohttp://localhost/:sluginstead ofhttp://localhost/blog/:slug.I suggest either to remove the slash in the beginning or to construct
destinationwith complete URL like below.