The best way to arrive in Hebden Bridge, at the western edge of the Pennines, is by train. The station is still astonishingly similar to a print I have from the 1840s, when the Manchester-Leeds line opened. The Victorian lettering is unchanged. Signs say "Lamp Room" and "Parcels Office". Volunteers supply fresh flowers. The whole place looks as polished as if a period-drama crew was at work.

The canal runs just below the railway line. Walk along it and you pass a phalanx of narrowboats with fancy names: Occam's Razor, Orinoco, Green Man. Once a working-class mill town, Hebden Bridge is now home to a large number of ultra-literate graduates.

The town is one long tale of the unexpected. Comparable towns remain mired in post-industrial dereliction, but Hebden Bridge and its surrounding villages were rescued by a potent alliance. Pioneering conservationists preserved the town's characteristic tall Victorian terrace houses, while arts-minded hippyish squatters were attracted by (then) dirt-cheap or even empty property. Almost every shop in Hebden Bridge is independent. The many – perhaps too many – cafes do not include a single Starbucks or Costa.

Ted Hughes was born nearby in Mytholmroyd. His father ran a tobacconist's next to Hebden Bridge's smithy, which is now Pennine Provisions, as fancy a grocer as you'll find. Cornish sea salt. Japanese wakame. Pexommier, a camembert-style cheese made with organic milk from up the road in Todmorden.

Hebden Bridge was an obscure little town when I grew up there. In a new book, I chronicle that past, but also the town's current tendency to attract labels like "fourth-funkiest place on the planet" or "lesbian capital of Britain". Instead of manufacturing textiles, Hebden Bridge now manufactures lifestyles.

Traditionally, Hebden Bridge adhered to the gospel of hard work. Whatever a man's faults, all was forgiven if you could say, "Ah, but he were a right worker." So there was hostility to the hippies who turned up in the 1970s and 1980s with a less militant work ethic. Yet these "offcomers" started hewing a new future for Hebden Bridge. The culture of spindle, loom and treadle had died. Life was seeping out of the town. A less inward-looking ethos reinvigorated it.

Want a wedding cake sculpted from soap? Try the Yorkshire Soap Company's splendid shop (theyorkshiresoapcompany.co.uk) on Market Street. The Trades Club (thetradesclub.com) on Holme Street is a not-for-profit music venue with a 190 capacity but attracts big names – Patti Smith's September gig is sold out, but there's plenty else on over the summer. Then there's the Handmade Parade on 23 June (handmadeparade.co.uk), with stilt walkers, giant puppets and craft workshops, and an annual Arts Festival (30 June-8 July, hbaf.co.uk).

But the best way to sample the spirit of the place is to get out into the hills. Cross the 500-year-old packhorse bridge that gives the town its name and brace yourself for the precipitous climb up a lane to Heptonstall. This small village was the handloom weavers' capital, before the railhead tugged all industry down into the valley bottom.

Above its high terraces of Victorian houses, scraps of fields once farmed for a meagre living are now more likely to hold leisure ponies. Above them is flattish moorland of heather and bilberry. In Heptonstall is a strange octagonal chapel where John Wesley preached, and behind the local Anglican church is the grave of Ted Hughes's first wife, Sylvia Plath.

Buses will ferry you to the start-points of a multitude of walks. Head north to Hardcastle Crags and on to the Packhorse Inn (on the Pennine Way, thepackhorse.org), which is always known as "the ridge". Or walk up from Mytholmroyd to a deserted hollow called Bell Hole where, in the 18th century, coiners carried out their illegal trade. If your muscles will take it, carry on across the moor to a soaring obelisk called Stoodley Pike, built in local millstone grit.

Does geology shape character? It's a question to muse on as you tramp around. There are lanes and paths in almost every direction. The hilltops have the scent of liberty. Hebden Bridge, present and past, has never been a place for knuckling under.

•Eat pizza atcosy family-runIl Mulino (01422 845986, ilmulino.co.uk), or go more alternative at Mooch (24 Market St) a cafe-bar with vegan breakfasts, tapas and snacks.Ted's House, Ted Hughes's childhood home a mile away in Mytholmroyd, can be rented from £180 for three nights (01228 406701, yorkshire-cottages.info). In town, Holme House B&B (01422 847588, holmehousehebdenbridge.co.uk) has doubles from £77.50 and locally sourced goodies for breakfast. More information from hebdenbridge.co.uk

Paul Barker's book, Hebden Bridge: A Sense of Belonging, is published on 10 May (Frances Lincoln, £16.99, tinyurl.com/hebdenbarker)