jekyll / jekyll-mentions

:busts_in_silhouette: @mention support for your Jekyll site
http://rubygems.org/gems/jekyll-mentions
MIT License
199 stars 31 forks source link

Support per-@ overrides #71

Open bmann opened 4 years ago

bmann commented 4 years ago

Problem

I want to @-mention people from multiple different networks. Some will be Twitter, some will be Github, some will be Instagram, some will be MicroBlog.

Solution

This could either be done at least two different ways. One is per page / post -- e.g. jekyll-mentions: twitter.com, as mentioned elsewhere, as front matter.

But, I'd like it to be done identity centric. So, I can maintain a _data/mentions.json file that looks like this:

{
  "@boris": { "network": "https://linkedin.com" },
  "@bmann": { "network": "https://twitter.com"},
  "@borismann": { "link": "https://blog.bmannconsulting.com" }
}

If the @-mention is not in this file, then the default global mention of twitter or whatever is used, otherwise the network defined is used.

In the example, I've also made a link item, rather than a network, to indicate that that @-mention goes directly to a link (so, "borismann" is wrapped in a link tag to that URL, without appending the @-mentioned name).

emmahsax commented 4 years ago

@bmann with the work that is being done in here (https://github.com/jekyll/jekyll-mentions/pull/72) this enables you to set the base URL on a per-page basis, but not on a per-mentions basis. Until this becomes a feature, maybe that change can get you part of the way there.

bmann commented 4 years ago

@emma-sax4 thanks! For me this is very person / identity centric, so per page doesn’t really work.

So my friend Alice might not use social media so I can just link @alice to alicewebsite.com

I’m going to see about hacking on this myself, but wanted to make sure to file an issue.

paddy-hack commented 1 week ago

Also, you might want to mention people from multiple networks on the same page.