Skip to content

Instantly share code, notes, and snippets.

const htmlTag = require('html-tag');
const stringifyObject = require('stringify-object');
const toHtml = (tags) => (tags.map(({tagName, attributes, content}) => (htmlTag(tagName, attributes, content))).join(""));
module.exports = (dato, root, i18n) => {
i18n.availableLocales.forEach((locale) => {
i18n.withLocale(locale, () => {
root.createPost(`content/_index.${locale}.md`, 'yaml', {
frontmatter: {
title: dato.index.title,