Use Mustache templates for site URL so that the username can be inserted anywhere in the template rather than only at the end

This commit is contained in:
Danielle McLean 2017-10-10 15:16:50 +11:00
parent 7b2c1681eb
commit bbe563dee7
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
6 changed files with 41 additions and 8 deletions

View file

@ -18,8 +18,8 @@
<a .u-email itemprop="email" rel="me" href="mailto:#{userEmail user}">
<i .fa.fa-envelope>
#{userEmail user}
$forall (site, profile) <- userProfiles
$forall ((site, template), profile) <- userProfiles
<li>
<a .u-url itemprop="sameAs" rel="me" href="#{siteUrl site}#{profileUsername profile}">
<a .u-url itemprop="sameAs" rel="me" href="#{substitute template profile}">
<i .fa.fa-#{siteIcon site}>
#{profileUsername profile}