Turf all of the town zones in Armadale and Bathgate starting at either station.
Armadale lies slightly higher than Bathgate and the route is slightly easier from Armadale but works in either direction. A round will take between 2.5 to 4 hours.
A rail return from Edinburgh to Armadale is also valid to Bathgate so you can start or end at either station; likewise a return from Glasgow to Bathgate is valid to Armadale. Buy the return to the furthest point. There is plenty of parking at the stations (free) and nearby on street.
Supermarkets with facilities are ASDA in Armadale, Morrisons, Aldi, Lidl and Tesco in Bathgate. The route passes nearby to all of these.
GPX Studio route (better for viewing details, editing and creating a GPX file)
Naviki Route (can be downloaded to app and followed on the go)