Beginner help with syntax for inline links

Hi, 

I want to add an inline link to my basic practice writing test project. I am using the guidance for inline links around using [] around the text you want and then ( ) around the URL but it does not seem to work in the output (I added a basic Jekyll template also). Would appreciate some help - tried lots of variations but can’t seem to get it correct. 

Link to project - https://stephendaly79.github.io/owncloud-quick-start/

Thanks in advance 

Hi,

See: https://github.com/stephendaly79/owncloud-quick-start/blob/4006beb702fc23a34a22efafcaf9326fcdffa4af/index.html#L14

The actual link you want to link to in that line is:

https://stephendaly79.github.io/owncloud-quick-start/instructions

but by including  .md in the  href  attribute, it links to:

https://stephendaly79.github.io/owncloud-quick-start/instructions.md

(notice the  .md at the end). So you could fix the line by making it like this:

Refer to <a href="instructions">Installing and configuring ownCloud</a> for more details.

Secondly, the following in  instructions.md isn’t valid:

<!DOCTYPE md>
<md>

I think you misunderstood that these  DOCTYPE declarations only count for HTML. Jekyll automatically knows it’s dealing with a Markdown file (that is what it is) because of the file extension ( .md ). So you can remove that.

Also, in a Markdown file, there is no need to use any HTML in your text. Actually, I believe you are mixing Markdown and HTML up a bit. Let me clarify.

HTML looks like this:

<! DOCTYPE html>
<html>
  <head></head>
  <body>
    <p>This is my text, and <a href="https://mysite.com/page">here</a> is a link.</p>
  </body>
</html>

HTML is a language browsers immediately understand. Its file extension is  .html.

Markdown looks like this:

# Welcome to my page, this line is a title
This is my text, and [here](https://mysite.com/page) is a link.

Markdown ( .md file extension) is great for writing, but browsers can’t understand it directly. That is why you use Jekyll.

Jekyll can  parse Markdown to HTML. That way the browser can understand your Markdown. That is win-win because now:

  1. YOU can write more easily
  2. The browser can still understand it

Here is an excerpt from Google about Markdown vs. HTML: https://developers.google.com/style/markdown

And  that is why your links aren’t working on the  instructions page. You are mixing up Markdown and HTML. I think you mean to use Markdown considering you chose the  .md file type and if I look at the site that seems logical. Try removing the wrong  DOCTYPE  declaration and all other HTML from the file and the links should work.

Good luck, and if you need any more help - just ask!