alphagov / govspeak

Markdown extension library for Government editors
http://govspeak-preview.herokuapp.com/
MIT License
84 stars 22 forks source link

Is this gem intended to be used standalone? #240

Open peteryates opened 2 years ago

peteryates commented 2 years ago

Some time ago I created a small Govspeak prototype kit which was heavily used by the DfE as part of the early COVID-19 response - its purpose was to allow content to be researched with users prior to publishing.

That application is a static site generator and should have minimal dependencies. Unfortunately, requiring in govspeak pulls in GOV.UK Publishing Components which pulls in Rails; it's all a bit unwieldy.

As far as I can see there's only a minimal need for the publishing components by this gem, is it necessary to make it a concrete requirement? It's fine if the answer is 'yes', it might be easier for us to just support plain Markdown and apply our own extensions if and when we need them.

chrispymm commented 1 year ago

I'd like to add another vote to this.

We had a simple need to support (some) Govspeak syntax and as we were already using Kramdown, I thought it would be a simple switch to use this for parsing. It would have been except for the dependency on GOV.UK Publishing Componnents, which caused issues within our asset pipeline, and in our build pipleine due to ENV vars required by Plek (a dependency of Publishing Components).

It would seem to make sense to me that this repo would handle the conversion of Govspeak-flavoured-markdown into HTML, and the user is then indendently responsible for the styling of the HTML however they choose.

peteryates commented 1 year ago

@chrispymm since raising this we did some work with govuk_markdown and it now supports inset text and details components. Others will only be a PR away.

chrispymm commented 1 year ago

@peteryates Thanks, govuk_markdown looks good but unfortunately we already have content published using govspeak syntax so wouldn't easily be able to switch to a different syntax now.