mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-01-13 07:24:11 +00:00
Add GitHub and GitLab icons to contacts
This commit is contained in:
parent
dd9919749a
commit
09902e3490
@ -247,8 +247,18 @@ class Extension:
|
||||
|
||||
write('*Contact*::', file=fp)
|
||||
contacts = self.contact.split(',')
|
||||
for c in contacts:
|
||||
write(' * ' + c, file=fp)
|
||||
for contact in contacts:
|
||||
contactWords = contact.strip().split()
|
||||
name = ' '.join(contactWords[:-1])
|
||||
handle = contactWords[-1]
|
||||
if handle.startswith('gitlab:'):
|
||||
prettyHandle = 'icon:gitlab[alt=GitLab, role="red"]' + handle.replace('gitlab:@', '')
|
||||
elif handle.startswith('@'):
|
||||
prettyHandle = 'icon:github[alt=GitHub]' + handle[1:]
|
||||
else:
|
||||
prettyHandle = handle
|
||||
|
||||
write(' * ' + name + ' ' + prettyHandle, file=fp)
|
||||
|
||||
fp.close()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user