Canonical tag with pagination

I wish everyone a good day.

I want to use canonical tag on pages that have the pagination structure.

<link rel="canonical" href="{{ .Permalink }}" />

but Permalink value returns the url ‘/blogs’ instead of ‘/blogs/page/2’.

How to get the full path ?

See the answer below. If you need more help, share a link to your Git repository with your code