# Jekyll Ruby reference and Generators tutorial

**URL:** <https://talk.jekyllrb.com/t/jekyll-ruby-reference-and-generators-tutorial/6191>\
**Category:** Help\
**Created:** [June 28, 2021, 2:37pm UTC](https://talk.jekyllrb.com/t/jekyll-ruby-reference-and-generators-tutorial/6191 "2021-06-28T14:37:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [June 29, 2021, 10:57am UTC](https://talk.jekyllrb.com/t/jekyll-ruby-reference-and-generators-tutorial/6191/4 "2021-06-29T10:57:40Z")

</div>

I fleshed out my generator section to cover some more use cases and I think it is more useful than the examples in the Jekyll docs.

Remember to search Jekyll forums here for similar questions around plugins and show links in your question to show that you’ve done your own research.

Here is one where someone got stuck making a generator because they picked the wrong class and I provided the right class and a code snippet to get them on their merry way to conquering the Jekyll site.

> [@How to create a page from a generator plugin?](https://talk.jekyllrb.com/t/how-to-create-a-page-from-a-generator-plugin/6053/4):
>
> Oh I got it! I got clues from the Jekyll Feed plugin, which generates a feed.xml file based on pages on the site. It uses PageWithoutAFile so it doesn’t get the read error. See [jekyll-feed](https://github.com/jekyll/jekyll-feed/blob/master/lib/jekyll-feed/generator.rb#L115) source. Here is my plugin. It generates a file my-file.xml with one row abcdef. module SamplePlugin class MyPageGenerator \< Jekyll::Generator safe true def generate(site) dir = '.' name = 'my-file.xml' site.pages \<\< Jekyll::PageWithoutAFile.new(site, site.source, dir, name).tap…

---

_[View the full topic](https://talk.jekyllrb.com/t/jekyll-ruby-reference-and-generators-tutorial/6191)._
