From b52a0555432812285839d5c05ca078537b717b4e Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Tue, 10 Oct 2017 15:23:30 +1100 Subject: [PATCH] Add support for displayName to profiles, so that ugly user IDs on sites like Stack Exchange can be hidden --- config/models | 1 + templates/mf2/h-card.hamlet | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/models b/config/models index a2ee315..76a545b 100644 --- a/config/models +++ b/config/models @@ -22,6 +22,7 @@ Profile userId UserId siteId SiteId username Text sqltype=varchar(255) + displayName Text Maybe sqltype=varchar(255) Entry slug Slug diff --git a/templates/mf2/h-card.hamlet b/templates/mf2/h-card.hamlet index 16d3209..bb22f25 100644 --- a/templates/mf2/h-card.hamlet +++ b/templates/mf2/h-card.hamlet @@ -22,4 +22,7 @@
  • - #{profileUsername profile} + $maybe name <- profileDisplayName profile + #{name} + $nothing + #{profileUsername profile}