metadata_file = function(filename) return filename:gsub('%.md$', '')..'.json' end