添加作者特定的社交链接到Squarespace博客文章

时间:2015-04-23 17:40:23

标签: html json squarespace

使用Squarespace。在每篇博客文章的底部,我试图将作者姓名,生物,头像和适用的社交媒体链接显示出来。

除了Twitter和Facebook链接外,我已经解决了。

任何人都知道包含这些变量的变量吗?

这是我的工作代码:

        {.section author}

          <span class="author-name">

            {.if author.avatarId}

            <div class="bespoke-avatar">

               <a href="{collection.fullUrl}?author={author.id}">

                <img src="/global/{author.avatarId}?format=36w" />

              </a>

            </div>

            {.end}

            <div class="bespoke-info">

              <em class="bespoke-author-name">{displayName}</em>

              <em>{author.bio}</em>

            </div>

          </span>

        {.end}

1 个答案:

答案 0 :(得分:0)

有一个json对象存储社交链接。

authenticatedAccount -> socialOptions

"socialOptions" : [ {
  "type" : "facebook",
  "username" : "http://facebook.com"
}, {
  "type" : "twitter",
  "username" : "http://twitter.com"
}, {
  "type" : "google",
  "username" : "https://plus.google.com/"
} ],

转到您的主网站添加?format=json-pretty并查找上述对象。