Convert galleries to frontmatter.