Opening external links in new tab?

Is there an easy way for external links to open in a new tab, thus not leaving my micro blog? For example, on my about page, providing links to my podcast and newsletter, but opening in a new tab?

Thanks!

I’ve open sourced a couple HTML blocks which can acheive this.
Ironically, I haven’t yet figured out how to actually inject HTML code onto my (uncustomized theme) Micro.blog which is on my ToDo (I also wanna inject SimpleAnalytics code, not sure if need to do a certain plugin format for that though).
Perhaps we could try make this external links into a plugin too if at least 1 other would find it useful.

I’m not technically inclined enough to know how to implement what you are suggesting.

Like I say, find 1 other person who’d use, and I’ll try to create a Micro.blog Plugin (which would be least technical way of users to implement here).
Just out of interest, would you not be technically-inclined enough to implement on any platform, or just micro.blog?

You have to add a target to the link.

Tried that but it didn’t work. When I used target="_blank" I got italics and a page not found.

What I mean is that I didn’t understand what you were saying. Now that I understand you mean’t you might create a plugin, I get it. :slight_smile:

Editing your about page (or creating a new page if it’s not there yet) and using HTML to open the links in a new tab should work. I just tested this. Here’s a screenshot of editing the about page:

1 Like

Thanks. I did that and it worked. Will you be adding this functionality to the posting blocks, perhaps similar to the options in the header of this window, above?

Not planning on adding an option for this since it can be done with HTML, and I assume you want most links to open normally and not in a new tab. I’m not sure if a Micro.blog plug-in would have enough control over this, but that’s something else we could look at if there’s interest.

Here’s an alternative viewpoint. From a customer perspective (me), I want easy. I also appreciate ease. Twitter and Medium (the later for the most part) automatically make all hyperlinks open a new tab. If I want someone to stay on my website, blog, or article, having a link open a new tab is advantages, so that they will hopefully continue to read my content. The final point is that having to do the html is cumbersome and time consuming. I really like what micro.blog is doing and I’m trialling it as an avenue to share ideas that I’m working on instead of fully fleshed out articles. However, if I have to work extra hard to write or cut and paste html, I might use this posting strategy on Medium exclusively, simply because it’s easier. Final thought, why have point and click formatting options in help BUT NOT on the actual public facing blog? :slight_smile:

Thanks for the feedback. I’m not seeing links on Medium open in a new tab, although they do on Twitter. I think there are potentially 2 separate things:

  • Links in the Micro.blog timeline should open in a new tab, or a preference for that. That is closer to what Twitter does.
  • Links on your own blog should open in a new tab. That seems much less common. As a user, I prefer having control over this, e.g. on the Mac command-clicking when I want a new tab instead of being surprised where a link is going to open, but I know not everyone agrees.

Thinking more about this, I bet there’s some JavaScript that could automatically handle this on your blog. That is probably the best place to solve this once rather than have to tinker with HTML. (I haven’t looked yet, but maybe someone else has seen something.)

As for formatting… We need to improve this in the web version of Micro.blog. For the iOS app, there are some formatting buttons (or menu items in the macOS app).

Thanks for this. Medium isn’t 100% consistent with automatically opening in a new tab. Maybe 60-75% of the time and that just doesn’t make sense.
I only use micro-blog on my laptop. Easier for me to manage how I work.

Best,
Darren

My aforementioned HTML blocks

can change the default on a site using
<base target="_blank" />
Then the second block contains Javascript to exclude internal links from this.

I’m confident this solution would satisfy @darrenstehle , but my problem is I don’t know how to create a Micro.blog plugin to allow him to add this to his site (and me to blog.w4rner.com).
Could you @manton or someone else help me get this onto a plugin?