{{tag}} displaying empty/nothing

Hi all,

I am experiencing some unusual behaviour in Jekyll:

<div class="section-1400">
				<div class="container-fluid">
					<div class="row">
						<div class="col-12 text-left filter-sorting pb-4">
							<button class="btn btn-filter-tag-small font-weight-700 filter mr-3 position-relative active" data-filter="*">all posts<span class="btn-filter-icon-small bg-dark color-white">{{ site.posts | size }}</span></button>
							{% for tag in site.tags%}
							<button class="btn btn-filter-tag-small font-weight-700 filter mr-3 position-relative" data-filter=".{{tag}}">{{tag}}<span class="btn-filter-icon-small bg-dark color-white">{{tag | size }}</span></button>
							{% endfor %}
						</div>
					</div>
				</div>
</div>

When I try to run this code the expected behaviour isn’t what outputs but it duplicated everything on the page?
Could someone please help?

Kind Regards
Aiyush

If you would like my to share the files with you if it makes it any easier please reply below.
Ag

FIXED: used categories instead of tags