What is the problem with the copied fragment?
It works as follows: in index.html it extracts the first blog post ( site.posts.first ) and stores it in the post variable, and its contents are stored in content . After that, it calls ( include ) the partial post_detail.html , which uses the same context as before.
So, in the end, he uses the first post ( post variable) and its content ( content variable) in the post_detail.html part.
Hope this helps!
source share