use page instead of s.Page[i]
add function permalink