Correction of links problem thanks to param BLOG_URL
This commit is contained in:
parent
5b7dad4a78
commit
75256cc756
1
TODO
1
TODO
@ -6,5 +6,4 @@ Flake8 the whole thing ! :)
|
|||||||
|
|
||||||
Known bugs :
|
Known bugs :
|
||||||
===========
|
===========
|
||||||
On article / tag pages : links are relative and don't work
|
|
||||||
@titre not remplaced
|
@titre not remplaced
|
||||||
|
@ -316,10 +316,12 @@ try:
|
|||||||
header = header_fh.read()
|
header = header_fh.read()
|
||||||
tags_header = "<ul>"
|
tags_header = "<ul>"
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
tags_header += "<li><a href=\""+tag[4:-4]+".html\">"+tag[9:-4]+"</a></li>"
|
tags_header += "<li><a href=\""+params["BLOG_URL"]+tag[4:-4]+".html\">"+tag[9:-4]+"</a></li>"
|
||||||
tags_header += "</ul>"
|
tags_header += "</ul>"
|
||||||
header = header.replace("@categories", tags_header, 1)
|
header = header.replace("@categories", tags_header, 1)
|
||||||
|
|
||||||
|
header = header.replace("@blog_url", params["BLOG_URL"], 1)
|
||||||
|
|
||||||
#Articles
|
#Articles
|
||||||
latest_articles_list = latest_articles("gen/", 5)
|
latest_articles_list = latest_articles("gen/", 5)
|
||||||
articles_header = "<ul>"
|
articles_header = "<ul>"
|
||||||
@ -333,7 +335,7 @@ try:
|
|||||||
title_pos = line.find("@title=")
|
title_pos = line.find("@title=")
|
||||||
title = line[title_pos+7:]
|
title = line[title_pos+7:]
|
||||||
|
|
||||||
articles_header += "<li><a href=\""+article[4:-4]+".html\">"+title+"</a></li>"
|
articles_header += "<li><a href=\""+params["BLOG_URL"]+article[4:-4]+".html\">"+title+"</a></li>"
|
||||||
except IOError:
|
except IOError:
|
||||||
sys.exit("[ERROR] Unable to open file "+article+".")
|
sys.exit("[ERROR] Unable to open file "+article+".")
|
||||||
articles_header += "</ul>"
|
articles_header += "</ul>"
|
||||||
|
Loading…
Reference in New Issue
Block a user