codeforamerica / codeforamerica.org-library-beta

1 stars 2 forks source link

Generate category, tag, etc. pages from items with a new plugin #1

Open migurski opened 10 years ago

migurski commented 10 years ago

We need to have pages like Civic Hacking generated from the items in item such as this one. They’re made from Jekyll Pages (code, docs), and built from Jekyll front-matter along the way.

Dropping a *.rb file into _plugins like this stub should do it:

module Reading
  class Generator < Jekyll::Generator
    def generate(site)
      site.pages.each do |page|
        # accumulate categories
      end

      # generate index pages
      # add them to site.pages
    end
  end
end

The output of this generator, run at jekyll build time, will replace the need for the contents of the tags, categories, and other directories.

migurski commented 10 years ago

I’ve reimported everything, and I'm part-way through preparing this in the other repo. There are two repositories while we shake remaining old-Library code out of the tree.

pui commented 10 years ago

Started this on generate-contributor-pages branch. All of the info for each page has been collected, it's a matter of adding the html content to the page.