• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jekyll/jekyll-mentions: @mention support for your Jekyll site

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jekyll/jekyll-mentions

开源软件地址:

https://github.com/jekyll/jekyll-mentions

开源编程语言:

Ruby 97.3%

开源软件介绍:

Jekyll Mentions

@mentionable support for your Jekyll site

Gem Version Build Status

Usage

Add the following to your site's Gemfile

gem 'jekyll-mentions'

And add the following to your site's _config.yml

plugins:
  - jekyll-mentions

Note: if jekyll --version is less than 3.5 use:

gems:
  - jekyll-mentions

In any page or post, use @mentions as you would normally, e.g.

Hey @benbalter, what do you think of this?

Note: Jekyll Mentions simply turns the @mentions into links, it does not notify the mentioned user.

Configuration

Within the _config.yml

Have your own social network? No problem. We allow you to configure the base URL of all the mentions.

To change it, add the following to your Jekyll configuration:

jekyll-mentions:
  base_url: https://twitter.com

If you're lazy like me, you can use this shorthand:

jekyll-mentions: https://twitter.com

An example of Twitter mentions using jekyll-mentions:

plugins:
  - jekyll-mentions

jekyll-mentions:
  base_url: https://twitter.com

Et voilà! Your mentions will now use that base URL instead of the default of https://github.com.

Within a page's front matter

Now do you want to override the base URL for just a single page/post? No problem. Just set the base URL for that specific page in the front matter:

jekyll-mentions:
  base_url: https://facebook.com

You also can use this shorthand:

jekyll-mentions: https://facebook.com

Now, every single mentions in the site will use the base URL defined in the _config.yml, except in the file where you set the base URL to be something different.

If you wish to change the base URL for a single mention, but not every mentions in that file, then you'll have to link to the URL the old-fashioned way:

[@benbalter](https://instagram.com/benbalter)

Now, let's say you have a single file where you don't want your mentions to become mentionable, AKA you want that to stay plain text. You can do that by specifying false in the front matter of that file:

jekyll-mentions: false

Now that page/post's mentions will not link to the profiles.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap