]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Fix(blog): Fix base URL for Russian blog
authorOleg Broytman <phd@phdru.name>
Fri, 4 Aug 2017 16:39:11 +0000 (19:39 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 4 Aug 2017 16:39:11 +0000 (19:39 +0300)
reindex_blog.py

index c2e16ce32c35029bb31d05f382f46e4d65e55617..ab257d55848b0cfadd9b782752365c0dda5f902a 100755 (executable)
@@ -525,7 +525,9 @@ from rss_20 import rss_20
 from news import NewsItem
 
 if blog_root:
-   baseURL = "http://phdru.name/%s/" % blog_root
+   blog_root_url = blog_root[
+        blog_root.find('/htdocs/phdru.name/') + len('/htdocs/phdru.name/'):]
+   baseURL = "http://phdru.name/%s/" % blog_root_url
 else:
    baseURL = "http://phdru.name/"