Glee actor Chris Colfer has signed a deal to write two children’s books.

The gay star, who plays Kurt Hummel in the series, will pen children’s novel The Land of Stories for Little, Brown Books for Young Readers, with a follow-up later.

Colfer said: “When I was ten years old, I promised myself that if I ever had the opportunity to write this book, I would jump at the chance.

“This book has been at the core of my imagination for a long time and I’m excited and nervous to share it.”

The novel will be aimed at children between the ages of eight and 12. It will focus on twins Alex and Connor Bailey as they journey through a fairytale land.

Megan Tingley, senior vice-president and publisher of Little, Brown Books for Young Readers, said: “Chris is a remarkable talent, whose writing combines all the qualities kids love – memorable characters, heart-pounding adventure, in a setting filled with wonder, intrigue and enchantment.”

The Land of Stories will be published in 2012.