Reveal.js Slim templates are based on
HTML5 Slim templates, before major refactoring. IIRC the generated markup of generic HTML5 template and reveal.js is very similar. Thus I’d suggest to start with HTML5 Slim templates, which are already cleaned and deduplicated, and modify them for reveal.js. It’d be IMO easier way, without reinventing the wheel.