Moviegoers have learned much from “The Princess Bride”: Never to get involved in a land war in Asia, of course, and never to go in against a Sicilian when death is on the line. And perhaps most of all, never to count out the enduring appeal of the swashbuckling fantasy-comedy that first hit theaters 27 years ago.

The latest chapter in the story of “The Princess Bride,” which was directed by Rob Reiner, adapted by William Goldman from his own novel and headlined by a then-unknown actor named Cary Elwes, is a book written by Elwes looking back on the making of the now-cult film.

“As You Wish: Inconceivable Tales From the Making of The Princess Bride” (by Elwes and Joe Layden) recounts Elwes’ memories of landing his breakout role (a Bill Cosby impression is involved) and starring opposite actors such as Robin Wright, Wallace Shawn, Mandy Patinkin and Billy Crystal, all of whom Elwes interviewed for the book. Goldman and Reiner also participated, and the latter penned the foreword.

Though much beloved now, the story of a farmboy-turned-pirate endeavoring to rescue his beloved from a scheming prince was not a hit when it was released by Fox in 1987. The film was well-reviewed — the Los Angeles Times called it “a gently sophisticated, tongue-in-cheek barrage of wry swordplay and blithe sorcery” — but did only modest business, grossing $30 million (it cost about $16 million to make).

According to Elwes, the studio was stumped on how to market the movie. “They’d never come across a film that had so many genres in it,” the actor told NPR recently. “Was it a comedy? Was it an adventure film? Was it a kids film? Was it a fairy tale? Was it an adult movie? And of course, it was all of these things, you see. And they didn’t know how to pitch it.”

It wasn’t until “The Princess Bride” was released on VHS almost a decade later that it finally found its audience.

Home video also played a part in Elwes writing “As You Wish”: He was inspired to revisit “The Princess Bride” after participating in a 25th-anniversary screening in New York timed to the release of the Blu-ray back in 2012.

At that screening, Goldman also revealed that he has never been able to come up with a worthy idea for a sequel, try as he might. “I’m desperate to make it and write it and I don’t know how,” he said. “I would love to make it, more than anything else I’ve not written.”

Only time will tell whether Goldman can solve that particular puzzle. In the meantime, many of the “Princess Bride” players remain active: Patinkin stars in Showtime’s “Homeland,” Wright stars in Netflix’s “House of Cards,” and Reiner released his latest film, “And So It Goes,” in July.

A number of attempts to mount “The Princess Bride” as a stage production have come and gone over the years as well, and Disney announced plans for such a project last November, though updates have been scarce.

Elwes recently addressed the topic of a stage adaptation during a Reddit AMA (Ask Me Anything). “All I know is that it’s a go on Broadway, and I’m sure they will do a brilliant job on it,” Elwes wrote. “They don’t need any advice from me. Plenty of song titles to choose from, that’s for sure.”