What do you feed a man who spent decades eating prison food in the name of freedom and reconciliation?

It was an intimidating question Xoliswa Ndoyiya wasn’t sure she knew how to answer. It was about 20 years ago, and at the time she was just a young cook working at a Jewish retirement home in Johannesburg, South Africa. But a friend had urged her to apply for the job as Nelson Mandela’s personal chef.

So she did. And when he met her, he immediately put her at ease.

“I believe that you are a great cook, but can you cook our food?” Ndoyiya recalled being asked by Mandela, who had only recently been released from prison. It was a reference to the Xhosa foods Mandela had grown up eating, simple dishes rich with porridge-like maize, beans and vegetables.

Ndoyiya said she smiled. Yes, she knew ukutya kwasekhaya, the term South Africa’s Xhosa clan uses to describe comfort food.

“That was the end of the interview. I was hired,” she said in a telephone interview. She has been with him ever since.

And now she is sharing the home cooking Mandela loves in a cookbook, “Ukutya Kwasekhaya: Tastes From Nelson Mandela’s Kitchen” (Real African Publishers, $26.95), one of two recent books to use food as a way to recount Mandela’s life from anti-apartheid fighter to prisoner to president to retired statesman.

Ndoyiya’s book, co-written with Anna Trapido, is a charming collection of mostly rustic, classic South African recipes, including many of Mandela’s childhood favorites, such as umngqusho, or crushed maize and beans cooked in beef stock.

“Tata [a South African term of affection used for Mandela] gets sad if days go by and I haven’t cooked umngqusho,” Ndoyiya writes in the book. Both books previously had been published in South Africa, but have recently been released in the U.S.

Trapido, a chef and food writer, also wrote her own book, “Hunger for Freedom” (Jacana Media, $33), a more academic account of the role food has played throughout Mandela’s life, from his childhood and years in prison, to during and after his time as South Africa’s first black president.

Trapido unearthed fascinating, humanizing stories, including that of Mandela’s first meal after his release from prison. The timing of his release was so sudden, there had been no time to prepare. So it was decided at the last minute that Mandela (also often called Madiba, another term of affection) should dine at Archbishop Desmund Tutu’s home in Cape Town.

“We had no idea what [Madiba] liked to eat, so we thought, well, chicken is the safest thing, and I rushed to the nearest 7-Eleven,” Lavinia Crawford-Browne, Tutu’s personal assistant, recalls in the book. “I bought up every chicken piece I could find and a crate of Coke, which turned out not to be enough and I had to go back.”