I used to make my own compost using the John innes recipes, with leafmould substituted for peat. It's easy to sterilise (in the oven, which is smelly, or with Jeye's Fluid), and works fine. I never had problems with weeds sprouting.
Therein lies the secret - the oven kills any lurking weed seeds that may be fertile by incinerating them, or Jeye's Fluid which kills everything - including the good organisms!
The John Innes recipes have stood the test of time (they were made widely available in the year I was born - 1954). John Innes who was actually a nineteenth century property and land dealer in the City of London, died in 1904 but bequeathed part of his fortune to the improvement of horticulture by experiments and research. Bless him - the rest (as they say) - is history! Peat & leaf mold are not quite the same things but both are equally safe.
The 'Jeyes Fluid' mixture was patented by John Jeyes in 1877, at a time when things like arsenic were also used by Victorian gardeners (e.g. copper arsenate)! However the lifespan of many such gardeners was a short one.
Jeyes is made from tar acids. The actual modern composition of Jeye's Fluid contains:
4-chloro-m-cresol,
Tar acids, (poly-)alkylphenol fraction,
Propan-2-ol & Terpineol.
Tar has carcenogenic properties in it and according to Jeyes themselves (after contacting them by phone in the past) they said Jeyes should not be used on a veg patch or soil that's to be used for edible plants.
To disinfect other gardening items like tools etc. then it's fine, but applying it to sterilize soil is a different matter.
Sorry to sound like a kill-joy! But I think I'll stick with good ol' clean organic peat! Or peat as part of a John Innes recipe - that's been heat treated.