Markdown MD In Case Of

Markdown MD In Case Of

2018-07-29. Category & Tags: Markdown, MD

Open Links in New Tabs #

using md #

For Kramdown, e.g. Jekyll:

[clickable-text](link-url){:target="_blank"}

In general, the format in Kramdown is {: attribute1="value1" attribute2="value2"}

For pandoc:

[clickable-text](link-url){target="_blank"}

In general, the format in Kramdown is {attribute1="value1" attribute2="value2"} (w/o :)

However, this will NOT work if using hidden separated reference (except Grav CMS).

using js #

Source/Insert the following js at the bottom of each page where we want to open external site links in pages:

var links = document.links;
for (var i = 0, linksLength = links.length; i < linksLength; i++) {
   if (links[i].hostname != window.location.hostname) {
       links[i].target = '_blank';
   } 
}

[ref]

Image Size #

There is no good way to resize images in pure md [ref].

For books, Amazon has bigger size and GoodReads has smaller size.
For example, in my ML Books article.