The wills of 26,000 Scottish soldiers who died in the First World War are to be made available online for the first time as part of centenary commemorations marking the outbreak of the conflict.

The last wishes of 26,000 fallen Scottish soldiers will be made available online by the National Records of Scotland.

Among the 26,000 individual wills are 2,584 from the Gordon Highlanders, including those of privates Alexander Craig and John Wood from Portlethen, Aberdeenshire.

Privates Craig and Wood were both born into fishing families, but when war broke out in August 1914 they joined the army, along with many other men from their coastal community.

Wood served in the 1/5th Battalion of the Gordon Highlanders while Craig was in the 1/7th battalion.

In autumn 1916 these two battalions formed part of the 51st Highland Division, tasked with the capture of part of the German lines at Beaumont Hamel in the final phase of the Battle of the Somme.

Both men were killed in action in the attack. Craig was 25 and Wood just 18.

Welcoming the project, First Minister Alex Salmond said: "This year, when we mark the centenary of the start of the Great War, we reflect on the sacrifices made by generations of service men and women, including those currently serving.

"Digitally archiving all 26,000 wills online presents a unique glimpse into the lives of the individuals who fought and fell for our freedom."

Brigadier David Allfrey MBE, chief executive of the Royal Edinburgh Military Tattoo and member of the Scottish Commemorations Panel, said access to the wills of these young men will help current and future generations learn more about the soldiers, their families and circumstances at a "pivotal time" in our nation's history.

Throughout 2014 people in communities across Scotland will gather together and remember the sacrifice made during the First World War.