resolve #54 prev/next pagination

also solve problem of external links