Image copyright AP

A trove of journalism by the great US poet Walt Whitman is being published online after lying in obscurity more than 150 years.

The 13-part series, Manly Health and Training, was written under a pseudonym for a New York newspaper in 1858.

It contains a multitude of tips on topics such as diet, sex, and hygiene.

The 47,000-word series, which survived only in a few libraries, was discovered in a digitised newspaper database by a graduate student last year.

It is now being published by the online journal The Walt Whitman Quarterly Review.

US commentators point out that some of Whitman's health advice sounds surprisingly modern.

"Let the main part of the diet be meat, to the exclusion of all else," one entry reads - a exhortation that both The New York Times and Time Magazine say would be endorsed by today's paleo-diet advocates.

Whitman also recommended the general use of the comfortable shoes "now specially worn by base-ball players" - trainers, as we would call them today.

He also warned against the ravages of desk jobs. "To you, clerk, literary man, sedentary person, man of fortune, idler, the same advice. Up!"

Whitman is regarded as one of America's literary giants, but for many years he scraped a living as a journalist, and achieved success as a poet late in life.

He began writing Manly Health and Training for The Atlas, a small New York newspaper, after the flop of Leaves of Grass - a collection now recognised as his masterpiece.

Ed Folsom, editor of The Walt Whitman Quarterly Review, told the New York Times that some of the journalism echoes the themes of self-improvement and homo-erotic love that are central to the poet's work.