You also have some layout confusion going on.
What is currently in _layouts/links.html looks more like a index page for links… not a layout for the link collection documents.
---
layout: default
---
{% for link in site.links %}
<p><a href="{{ link.url }}">{{ link.title }}</a></p>
{% endfor %}
For example there’s no {{ content }} to pull in. It’s just going to spit out bacon and ham pages that have links to all of the other documents.
You probably want to use _layouts/links.html for a “links” index page (eg. /links/index.html) and then create a link page specific layout:
_layouts/link.html
---
layout: default
---
<h1><a href="{{ page.url }}">{{ page.title }}</a></h1>
{{ content }}
_links/bacon.markdown
---
layout: link
title: Bacon
url: https://en.wikipedia.org/wiki/Bacon
---
Spicy jalapeno bacon ipsum dolor amet pork belly sausage bresaola ham brisket. Ground round alcatra cupim meatball shankle landjaeger hamburger flank jowl biltong. Meatball doner pork belly picanha capicola, ground round bacon cow chicken spare ribs landjaeger. Picanha rump pork belly filet mignon. Ball tip venison drumstick, chicken short loin flank pancetta tri-tip hamburger landjaeger spare ribs t-bone. Leberkas kevin landjaeger, ball tip alcatra fatback prosciutto ribeye tenderloin cow doner picanha porchetta capicola beef ribs.