Add logic for /users/username userdirs
This commit is contained in:
parent
da2ab023fe
commit
f720b2e549
|
@ -19,7 +19,9 @@ BACKLINKS = "gemini://geminispace.info/backlinks"
|
|||
def determine_capsule(parsed):
|
||||
capsule = parsed.netloc
|
||||
if parsed.path.startswith("/~"): # allow for each userdir to be its own capsule
|
||||
capsule+="/"+parsed.path.split("/")[1]
|
||||
capsule+="/"+parsed.path.split("/")[1][1:]
|
||||
if parsed.path.startswith("/users/"): # gemini.circumlunar.space uses this format as well
|
||||
capsule+="/"+parsed.path.split("/",3)[2]
|
||||
return capsule
|
||||
|
||||
# Required links.
|
||||
|
|
Loading…
Reference in New Issue