From d70e2a788e64b365b232086ce53a419672e088c9 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 7 Sep 2018 19:22:14 +0900 Subject: [PATCH] Add some meta alternate links (#2657) --- src/server/web/views/note.pug | 3 +++ src/server/web/views/user.pug | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/server/web/views/note.pug b/src/server/web/views/note.pug index 22f183405..4f7c3d777 100644 --- a/src/server/web/views/note.pug +++ b/src/server/web/views/note.pug @@ -23,3 +23,6 @@ block meta link(rel='prev' href=`${config.url}/notes/${note.prev}`) if note.next link(rel='next' href=`${config.url}/notes/${note.next}`) + + if !user.host + link(rel='alternate' href=url type='application/activity+json') diff --git a/src/server/web/views/user.pug b/src/server/web/views/user.pug index 98a53ab54..63d2f7515 100644 --- a/src/server/web/views/user.pug +++ b/src/server/web/views/user.pug @@ -18,3 +18,10 @@ block meta meta(property='og:description' content= user.description) meta(property='og:url' content= url) meta(property='og:image' content= img) + + if !user.host + link(rel='alternate' href=`${config.url}/users/${user._id}` type='application/activity+json') + if user.uri + link(rel='alternate' href=user.uri type='application/activity+json') + if user.url + link(rel='alternate' href=user.url type='text/html')