preaction / Statocles

Static website CMS
http://preaction.me/statocles
Other
84 stars 33 forks source link

Automatically convert links to a href's #532

Open cmdcolin opened 7 years ago

cmdcolin commented 7 years ago

Not sure if this is already supported but it would be great if links in plaintext could automatically converted active with tags

I know github allows this type of thing with their markdown so that would be a cool feature to include

preaction commented 7 years ago

It's not already supported, to my knowledge: Markdown has a special syntax to do it, though: <http://example.com>. The angle brackets make the URL inside into a link with the link text being the URL itself. However, I have also been bit by this enough that I wish it just automatically linking anything that looked like a URL (<schema>:<thing>).

There are some surmountable issues:

If this is already supported by the Markdown module we use (Text::Markdown), then we should focus our efforts there. Otherwise, we might have to change what Markdown module we use by default. Another option is Text::MultiMarkdown, which is more likely to already support this.

We should also, in the meantime, document how to add <http://example.com> links to content documents in the Statocles content guide. It looks like I have neglected the Links section on that page...