Browse Source

Add trailing slash to tag path to avoid redirects

Adds a slash to tag patsh on gemlog index to avoid annoying
redirect warnings on some clients.
master
mieum 1 year ago
parent
commit
bfb5a131cd
  1. 1
      .gitignore
  2. 5
      twindexer.py

1
.gitignore vendored

@ -0,0 +1 @@
test.yml

5
twindexer.py

@ -112,11 +112,12 @@ def write_gemlog_index(gr, gl, tl):
outfile.write("# " + gl['title'] + "\n\n\n")
outfile.write("Tags:" + "\n")
for tag in tl:
tagpath = relate_paths(gempath, gr + tl[tag]['folder'])
tagpath = relate_paths(gempath, gr + tl[tag]['folder']) + "/"
outfile.write("=> " + tagpath + " [" + tl[tag]['tag'] + "] " + tl[tag]['title'] + "\n")
outfile.write("\n")
for post in gemindex:
outfile.write("=> " + relate_paths(gempath, post['path']) + " " + post['date'] + " [" + post['tag'] + "] " + post['title'] + "\n")
postpath = relate_paths(gempath, post['path'])
outfile.write("=> " + postpath + " " + post['date'] + " [" + post['tag'] + "] " + post['title'] + "\n")
if 'feed' in gl:
if gl['feed'] == True:
outfile.write("\n=> atom.xml Feed\n")

Loading…
Cancel
Save