July 19, 2021 | 9:40am | Updated July 19, 2021 | 9:47am

It was the mother of all surprises. 

While Danielle Herrington was flexing her fabulous buns during the 2021 Sports Illustrated Swimsuit photo shoot in March, the bikini model had no idea she also had a bun in the oven. 

“Four days after the shoot I found out that I was pregnant,” Herrington, 28, told The Post. 

When she returned to her Los Angeles abode after posing for the magazine on the beaches of Miami, the 5-foot-10 stunner was feeling sick and took a pregnancy test. And when it came back positive, she took six more tests before confirming her condition with her doctor. 

“I found out I was about five-weeks pregnant,” the Compton, California native continued. “And I was in complete shock.”

But since overcoming her initial disbelief — and a “really bad” first trimester plagued by constant morning sickness — Herrington says she “can’t wait” to meet her incoming bundle of joy. 

She and boyfriend, model Geron McKinley, 27, are poised to welcome a baby boy in September. 

“I’m excited to birth him, see his face and watch him grow,” she gushed. 

Danielle Herrington:
Danielle Herrington: “I’m happy that I can represent for the moms and pregnant women out there.”
James Macari/ Sports Illustrated

But for now, at almost 8 months pregnant, Herrington is excited to be representing expecting mothers in Sports Illustrated Swimsuit’s most inclusive edition — featuring women of all shapes, sizes, colors and ages — which hit shelves Monday. 

“I’m happy that I can represent for the moms and pregnant women out there,” Herrington said, admitting that working while infanticipating can be emotionally and physically draining. 

“But I don’t think [a] baby stops your whole life,” the beauty bombshell added. She plans to resume modeling sexy swimsuits after giving birth. “I think that [even as a mom] you can still be who you are and still have children.”

And who Herrington has always been is a model. 

She knew she was destined for a life of styling and profiling at the age of 8. By the time she was 13 years old, she was modeling professionally.  

And in 2018, just two years after moving from California to Brooklyn in order to further her career, Herrington became the third black woman to ever grace the cover of Sports Illustrated in the magazine’s nearly 70-year history. 

Legendary model Tyra Banks, now 47, slayed as the publication’s first black cover girl in 1997. Megastar Beyoncé, 39, followed sultry suit in 2007. 

“When I moved to New York that was my dream, that was the goal,” Herrington said of joining the fashion divas in the annals of SI eminence. 

“So to have accomplished that within two years of [being in the city] is mind blowing.”

And for Herrington, shining as an inspiration for the next generation of black women in the 2021 SI Swimsuit edition is just as meaningful. 

“I’m so happy that I can be a representation [for] little black girls out there,” she said, noting that this year was the first time she rocked hip-length braids and bamboo earrings for her shoot. 

“It felt super good [to represent my community with my look],” Herrington said. “I felt like it was my moment.”