Search code examples
rubymiddleman

Howto create dynamic pages with middleman 3.0.9


I'm fiddling with middleman 3.0.9 for some time now, trying to create some dynamic output that I need.

Older versions had the "dynamic pages" feature. 3.0.9 does not seem to have something similar. I do not find anything in the docs, nor in the net at the moment.

I simply want the endpoint '/foo' dto do some processing and return some custom data with every request.

How can I achive that?


Solution

  • The Dynamic Pages feature is still provided by Middleman. Though its purpose is to dynamically create pages at build time (middleman build). The Dynamic Pages feature is not helping you to process data and serve dynamic content.

    Middleman is a static site builder, and is not supposed to serve dynamic content.

    If you need data processing done on each request hava a look at Sinatra.