On my site I have something like little blog (PHP and MySQL dynamically loaded posts), with categories like "life", "business", and "health". Each article has added tags. Tags allow to find articles with specified tags. I have on my home page a "news" section with 3 newest posts (any category, just filter by date).
An example of a post would be titled "My own garden" in the category "life", with tags "hobby" and "free-time". The original URL for this post would be http://example/blog/life/my-own-garden.html
. On my home page it shows up as "My own garden" with the first 100 characters of the article, and a "Read more" link to the full post.
At my blog page with address http://example/blog/
I see that same shortened post (first 100 chars) and others posts from any category, with link "Read more" to original page, where user can read full post.
At my category page with address http://example/blog/life
I see that same shortened post (first 100 chars) and other post from that same category, with link to original page, where user can read full post.
At my tag page with URL http://example/tag/hobby.html
AND http://example/tag/free-time.htm
l I see that same post and other posts with that same tag (doesn't matter which category they are)
And at the end I have that same content at page as I named originally - http://example/blog/life/my-own-garden.html
So, I have 5 pages which have that same part of content or that same fully content. Data is loaded dynamically, for ex.
http://example/blog/life/my-own-garden.html
and http://example/blog/life/best-free-time-ever.html
are powered by the same file, just with different posts.
How could I set canonical links in this situation, is any way to do it correct?