Blogger sentenced to two years in prison