0
votes

I am migrating from a handlebars based static site generator. Authors of pages are allowed to use either html or markdown. Therefore i have lots of partial html files for which i need to create pages. These html files are in fact .hbs file (handlebars), but there are no expressions, just plain html element with some frontmatter.

For example:

---
title: Example
author: Narendra
---
<div>
  <h1>Example</h1>
  <p> .. </p>
</div>

Authors are able to drop these files inside a directory structure.

I have not been able to find a transformer that can deal with such file. Am i missing something? Do i need to create a custom transformer for this.

1

1 Answers

1
votes

AFAIK markdown is a superset of html, so gatsby-transformer-remark should be able to handle these .hbs.

Unfortunately there's no way that I know to make gatsby remark accept .hbs extension, but I think renaming them should do the trick.