Is there a way to make a post link to some static content?

If I have a page at ./static/a-page.html, is there a way to make a post entry link to it? I looked here but I don’t think anything does what I would like.

Thanks in advance.

Edit: I was able to cobble up something together by making changes to the theme. I checked for a page variable called “redirect”. If it exists, I make the href whatever value the variable holds.

Now I am wondering if there is a way to make the .md file not be parsed into html if the variable “redirect” exists. Any advice is appreciated. Thanks.

Not that I know of. Hugo by default turns all files in /content into pages. And while we can control that behaviour with draft or scheduled content, in your case the page’s variable with the redirect file doesn’t come into effect.

Perhaps someone else here on the forum has an idea. :slightly_smiling_face: