Hide a link if there's no YAML Front Matter

So I have a setup in my posts where I reference project links like:

project-id: project-id-1
title: Project Title
project-des: Project description

And I have a link like:

“href=”{{ project-slides.project-link }}">Open Link

Is there a way to not have the entire link displayed when there is nothing to reference in the ‘project-link:’ part?


wrap it in an if statement:

{% if page.project-link %} put your link in here {% endif %}

1 Like

Sorry for the late reply, but oddly that didn’t work for me?