Much of what people know today about the pirates of old comes down from one singular codified source - the book A General History of the Pyrates, published in 1724 and written by an anonymous figure calling himself Capt. Charles Johnson. I say "anonymous" because there is no record of this man ever having existed, aside from this book and its sequel, so it is generally held that it is a pseudonym. Many have attempted to credit Daniel DeFoe or Nathaniel Mist with authorship, but that theory is extremely specious one and has fallen out of favor with academia. We may never know the true identity of the good Captain.
According to Wikipedia:
While Johnson's identity is unknown, he demonstrates a knowledge of the sailor's speech and life, suggesting he could have been an actual sea captain. He could also have been a professional writer, well versed in the sea, using a pseudonym. If this is true, the name was perhaps chosen to reflect the playwright Charles Johnson, who had an unsuccessful play with The Successful Pyrate in 1712, which glamorized the career of Henry Avery and had been something of a scandal for seeming to praise a criminal. Following it, however, many authors would rush forward with biographies and catalogs of criminals, including catalogs of highwaymen and prostitutes. By this theory, the pseudonymous "Charles Johnson" of the pirate catalog was merely taking part in a burgeoning industry in criminal biography.
On the other hand, whoever the editors of the Wikipedia page about the book are, they mistakenly refer to such pirate traditions as peg-legs, the Jolly Roger, and the concept of buried treasure to be myths that Capt. Johnson fancifully made up for his book. That is so not so.
The Jolly Roger, far from being a myth, was a slang term for skulls in general, and was applied to pirate flags that sometimes employed a skull or skeleton motif. Richard Hawkins, when captured by pirates in 1724, reported that these pirates carried a black flag bearing the image of a skeleton stabbing a heart with a spear, which they called "Jolly Roger". Since pirates were probably poor seamstresses, many simply employed a black flag to symbolize their piracy, but nevertheless many called these black flags "Jolly Roger" as well. Although Wikipedia sorts this out relatively truthily on their Jolly Roger page and provides numerous examples of the specific Jolly Roger flags flown by individual pirates such as "Black Sam" Bellamy, they perpetuate yet another falsity there when they state "It is assumed by most that the name Jolly Roger comes from the French words jolie rouge, meaning "pretty red".
As for the "myth" of buried treasure, Wikipedia's own page about it admits that Capt. William Kidd did indeed bury treasure, and that stories of pirates burying their treasure existed a century before the era of Capt. Johnson's book.
And if you think the idea of pirate peg-legs are a myth, you might want to ask Francois LeClerc about that. If you can reach him on the Ouija board.
Wikipedia, as usual, contradicts itself and is not to be fully trusted, being written by humans with agendas, most of whom really need to get a life anyway.
We here regard the entirety of Cap'n Johnson's glorious book as being essentially accurate, and it can be found here in the Eastern North Carolina Digital Library.