Markdown and links

The Add Link menu option doesn’t appear to be working in markdown. Does anyone know a workaround?

Specifically, clicking on “Add Link” on markdown text brings up the add link dialogue as expected. The link appears in underlined blue in the markdown editor. But the link is not carried through to the actual HTML. (I find this by inspecting the code in the generated HTML page.)

So far, my workaround is to put the link in manually as markdown code. This is fine for external links. But for internal links (other pages in the project), it is a bit of a pain since it involves figuring out exactly the correct folder and file name for the linked page.

Am I missing something? Thanks!

I believe the add link button only works with styled text. The markdown stack is expecting you to do all related stuff in … markdown. With markdown you always need to provide an exact URL: not really any different for external vs. internal pages. Yes, perhaps it’s a wee bit more inconvenient but only a little. The advantages of markdown way way outweigh this minor disadvantage.

… or just switch back to styled text if it’s a big issue for you.

Thanks for replying, Mathew.

To be more clear, there is a bug, since the Add Link dialogue purportedly adds a link, but the link isn’t actually there. So at a minimum, Add Link should be disabled for markdown.

Better yet would be if the Add Link dialogue were smart enough to generate the necessary markdown to insert the link. I doubt this would be hard, and would remove tedious work in authoring markdown pages.

What version of RapidWeaver/Stacks Plugin are you using? I do not see the link buttons working in the Markdown stack at all.

Version 6.3.8 (15165) of RapidWeaver, and v3.0.0 of Stacks. I just tried updating, and it reported that this is the latest version.

I select text, right-click on the selected text, and select “Add Link” from the menu.

Okay, well I see how you are activating links. This should definitely be fixed by RealMac by disabling this “feature” for Markdown stacks. Actually I don’t know if this needs to be fixed by RealMac (@dan ) or by YourHead (@isaiah ). But it is definitely misleading.

1 Like

Go to Yourhead to get the latest version of Stacks
http://yourhead.com/stacks
Just download it and install, you must have a beta or something that is not seeing the latest

Thanks Zeebe! I’m now at 3.0.5, and the behaviour is unchanged.

I wouldn’t expect the link thing to work in Markdown anyways, links in markdown should be like this:
[apple](http://www.apple.com)
which will give you this
apple

Yes, of course. My issue is that either (1) the add link menu should be removed for markdown, or (2) it should do something useful like adding the markdown equivalent for the selected link.

I am glad that I fond this thread!

Guys like me who don’t have previous experience or the web design or coding background these issues can give a head scratch for few days.

Well, it seems that left click linking option is still available with Mark Down page. I guess for many, like me Mark Down page wasn’t the first option but due changing project stacks along the way I changed Text stack to Mark Down, and end up re-linking and re-publishing again and again needlessly.

Bottom line newbies: Internal page linking with Mark Down stack does not work. Use Text stack.

I’ve been trialling Bear recently, and realize that it’s exactly what I wish Markdown in RapidWeaver could be.

Not sure if this is for @dan or @isaiah, but I’d love, love, love it if you could do something for us Markdown users.

??? Not sure what you mean. Did you use the Markdown specific code for links? That will work for regular external links or internal links. But, yes, linking works differently because it is a markdown stack all the way. (Just like select/link won’t work with HTML stacks.)

I believe RapidWeaver has all the usual Markdown syntax possible (for example from the cheatsheet: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)

It’s also possible to write full Markdown in Pulse:
http://help.pulsecms.com/article/21-markdown

(with examples)

All true, @yuzool - you can type in any raw Markdown into the Markdown stack.

But in the meantime, a number of Markdown editors have been showing up that provide beautiful support for editing markdown. Bear and Ulysses are two obvious examples. For example, with Bear linking to pictures and other pages is done with drag-and-drop, and the corresponding Markdown code is automatically inserted into your document. Auto-formatting is provided so the document doesn’t look like a wall of plain text.

Basically, RapidWeaver is providing Markdown users with a plain text editor, not a real Markdown editor.

2 Likes

I’m just experiencing this same issue myself with RW8 and Stacks 4. I like the setup of Markdown for what I want to do but find it too tricky to link manually.
So, in styled text, how can I simulate the look of markdown - i.e. have an indented bullet list that I can then link text from? The links lead to internal pages within my site.

Hi Paolo,

The original post is from May 2016, so things like RW8 and Stacks 4 weren’t around yet. It’s probably better in the future if you have a question like this just create a new topic. A lot of folks will just skip past something this old.

My advice would be to stick with MarkDown. Styled text produces poor quality HTML.

Markdown is a bit tricky, but once you get used to doing things like links, it’s as easy and faster than the dialogue box.

You said you have stacks 4, it’s even easier with that. There’s a link box (chain) at the top of the edit box in stacks 4.

I never use styled text, so can’t really help if that’s the route you want to use. I’d suggest to just learn Markdown, some stuff might seem tricky at first, but before you know it, it’s second nature.

Thank you for that Doug!
I apologize for writing in an old thread. I’ll try paying more attention in future.

I played around with making a link in markdown and got as far as figuring out where to put my link text (in the square brackets) and that looked right when I viewed it as a web page. Where I got stuck was where I needed to write the link path, after the http… have no idea what the path to my pages are.
I’m, all for using markdown but I’d need some sort of hand learning how to make the links.
At the moment I worked around it with styled text and inserted my own bullets to simulate markdown. Then those links were easy to create.
I appreciate your help as I learn all this :slight_smile:

Okay,
I understand the issue you are having. Internal links can be a bit of a burden.

The Markdown link, as you have figured out, is composed of two parts.

  1. The link text that will display for the user enclosed within the square brackets [example link test to Apple's web site]
  2. Immediately followed by the URL that you want to link to enclosed in parathesis(https://www.apple.com)
  • That would make the Markdown you type look like this
    [example link test to Apple's web site](https://www.apple.com)
  • And because this forum uses Markdown this is what it looks like(not marked as code):
    example link test to Apple’s web site

So if you’re linking to another website, it’s pretty easy to get the link. Just open the page up with any browser and copy the URL from the Address bar and paste.
Internal links can be a bit difficult. You could use the full address to the page URL. That’s not as clean as using the relative linking method that styled text and things like buttons use. If the page is published, you could do the same thing as what you do for external links.

If the page isn’t published yet, then it’s more challenging to find the URL. If you are using tidy links the URL to a page on your site is compromised of the Web Address in general settings and the folder name(s) in the page inspector:
2019-11-26_10-56-35

2019-11-26_10-57-45
In the example above the gallery page would have a URL of
https://yourwebsite/gallery/

Now it gets more complicated if the page is a sub-page of another page. Then you would need to add the parent pages folder name between the web address and the pages folder name. So if the parent page has a folder name of parent-page, then the absolute URL for the page would be
https://yourwebsite/parent-page/gallery/

Now Relative links are even more complicated to explain; here’s an article that can tell about them better then I can. Absolute vs. Relative Paths/Links | CoffeeCup Software

Now for the Cheaters Way

  • Make sure you have Enable Web Developer Tools on in RW preferences.
  • Grab a standard button stack and place it anywhere on the page you want to link from
  • Set the link to the page you want to link to
  • Preview the page
  • Right-click on the button you added and chose Inspect Element: 2019-11-26_11-21-28
  • You’ll see an href statement inside an <a tag.
  •    `<a href="some-sliders/orbit/" title="Orbit">Change Me</a>`
    
  • What’s in between the quotes is the Relative URL

The issue I have with styled text is the HTML it produces is of poor quality by today’s standards. Unless you, the end-user, actually take the time to “mark and make” things as simple as a paragraph, it won’t be there in the HTML. If you hit return a few times, it uses <br>. It styles almost everything (bold, italic, alignment, fonts, etc.) with inline-styling and a lot of span statements.

To you and a human user, it looks alright. But over half of web traffic now is non-human( Search Engine Crawlers, local indexes, etc., etc.) They might have difficulty interpreting and cataloging the “spaghetti HTML” styled text produces. And I won’t even get into what it does to accessibility and screen readers.

Plus, in-line styling overrides styling you apply globally with theme changes and custom CSS you may try to use.

1 Like

Wow, thank you Doug - your little lesson was extremely helpful! I went through your steps and I actually have text and links that looks just as I need :slight_smile:
The only thing I’m encountering now is that when I preview the page and click on the first link (the completed one), I get a Page Not Found error. Is that supposed to be so?

According to what you outline, my complete page URL reference would be:

http://www.vroomfoto.com/galleries_main/driver_archive

I tried it with/without the www. part and with/without the / at the end after “archive”. Wondering if I’m still missing something…

But thank you for getting me this far :smiley: