hmans / flutterby

A flexible, Ruby-powered static site generator.
http://www.flutterby.run
MIT License
57 stars 2 forks source link

Emitters! #16

Closed hmans closed 7 years ago

hmans commented 7 years ago

The idea: dynamically create new nodes based on requested URL parts.

Example: at /blog/ lives a node that has an emitter for /blog/:year/ URLs. These will dynamically spawn nodes that render archives for the selected year.

Through emitters, we can have a unified API for dynamically created nodes. The biggest advantage here is that not only do these enable dynamic applications (where the node graph keeps changing over time), but we can also remain compatible with static site generations, since emitters can also be used when exporting (eg. the blog archive would, when exporting, actively trigger the emitter to generate pages for each year that has a blog entry.)