Outputting a post's public tags and exclude internal tags

I want to create a section on a post to display the tags for that post. I am currently checking if there are tags, outputting the tags and using {{foreach}} to give styles to those tags.

My problem is that I only want that section to display if the post has public tags. Current, {{#if tags}} will return true if the post has public and internal tags. The docs state that internal tags are not meant to be displayed publicly. I only want the public tags for the post that I am on.

Is there a way to differentiate between public and internal posts? Any help would be greatly appreciated.

I think I understand what you’re trying to do: you want to show a block of content when public tags are present, but hide it when they’re not. Let me know if this accomplishes that:

{{! Loop through the tags }}
{{#foreach tags}}

    {{! Set up the div container }}
    {{#if @first}}
        <div class="tag-container">
     {{! The tag data }}

    {{! Close the div }}
    {{#if @last}}