timwis / jkan

A lightweight, backend-free open data portal, powered by Jekyll

Home Page:https://jkan.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Netlify CMS preview templates

timwis opened this issue · comments

The default preview template in Netlify CMS just shows each field. It's not bad, but of course it would be nice if the preview resembled the page that JKAN will generate.

Screenshot 2022-11-16 at 08 17 10

Netlify CMS supports custom preview templates. They have to be React components, which is a bit annoying, but I don't expect it will be much effort, particularly since we can plug in the field renderers that Netlify CMS ships with (e.g. string renderer, boolean renderer, etc.).

It would be great if we could somehow pull in the actual dataset template in _layouts/dataset.html, though I expect if that's possible, it will be pretty hacky.