ankane / vega-ruby

Interactive charts for Ruby, powered by Vega and Vega-Lite
BSD 3-Clause "New" or "Revised" License
251 stars 9 forks source link

Add instruction to include to bridgetown #10

Closed topofocus closed 1 year ago

topofocus commented 1 year ago

The gem works wonderful! Thanks for building it.

I just included it into a (static) Bridgetown-page.

Its worth to include the steps in the description

Example for the frontmatter-approach

~~~ruby
{ 
  layout:  :home,
  title:  'Übersicht',
  vega:  Vega.lite .data([{city: "A", sales: 28}, {city: "B", sales: 55}, {city: "C", sales: 43}])
                   .mark(type: "bar", tooltip: true)
                   .encoding( x: {field: "city", type: "nominal"},
                   y: {field: "sales", type: "quantitative"}) 
}
~~~

# title
<%=  data.vega %>

In my impression, this is the easiest way to setup an example-page.

ankane commented 1 year ago

Hey @topofocus, thanks for sharing. Bridgetown isn't officially supported, so don't want to include it in the readme, but this issue should be helpful for those who need it.

topofocus commented 1 year ago

Perhaps its time to include Bridgetown into the list of supported frameworks. As of Version 1.2 its fresh air in the ruby web-universum. Its based on roda & jekyll and evolves quickly.