Skip to content

Instantly share code, notes, and snippets.

@denisdefreyne
Last active February 3, 2016 12:56
Show Gist options
  • Save denisdefreyne/6206130 to your computer and use it in GitHub Desktop.
Save denisdefreyne/6206130 to your computer and use it in GitHub Desktop.
Splitting nanoc

nanoc subprojects

Notes

  • The filesystem data source will still be part of core. Ideally, it could be moved out, but a lot of tests in core depend on the filesystem data source, and cleaning that up is a lot of (unecessary) work.

  • For the same reason, the erb filter is still part of core as well.

Renaming and removing helpers

  • Get rid of the text helper. It is tiny, incomplete and buggy.
  • Ensure helper names end with -ing. This means
    • html_escaping, not html_escape
    • linking, not link_to

Directory structure

Main project

  • lib/
    • nanoc/
      • core/
        • entities/
        • version.rb
    • nanoc-core.rb

Subproject

An example of the AsciiDoc filter:

  • lib/
    • nanoc/
      • asciidoc/
        • filter.rb
        • version.rb
    • nanoc-asciidoc.rb

Loading plugins

Use Bundler.require(:default). Don’t care about groups.

Versioning

  • nanoc-core has lib/nanoc/core/version.rb, which defines Nanoc::VERSION.
  • nanoc has lib/nanoc/version.rb, which requires nanoc/core/version.
  • nanoc-cli has no lib/nanoc-cli/version.rb and no Nanoc::CLI::VERSION.

Projects

Meta-gems

  • nanoc, depending on
    • nanoc-core
    • nanoc-cli
    • nanoc-kramdown
    • nanoc-haml
    • nanoc-sass
    • nanoc-blogging
    • nanoc-html_escape
    • nanoc-link_to
    • nanoc-rendering
  • nanoc-powerpack, depending on EVERYTHING

Basic components

  • nanoc-core
  • nanoc-cli

Plugins

  • nanoc-check - Also includes the CLI command.
  • nanoc-deploy - Also includes the CLI command.

Checks

  • nanoc-html_check
  • nanoc-css_check
  • nanoc-external_links_check
  • nanoc-internal_links_check
  • nanoc-stale_check

Deployers

  • nanoc-rsync_deployer
  • nanoc-fog_deployer

Filters

  • nanoc-asciidoc
  • nanoc-bluecloth
  • nanoc-coffeescript
  • nanoc-colorize_syntax
  • nanoc-erubis
  • nanoc-haml
  • nanoc-handlebars
  • nanoc-kramdown
  • nanoc-less
  • nanoc-maruku
  • nanoc-mustache
  • nanoc-pandoc
  • nanoc-rainpress
  • nanoc-rdiscount
  • nanoc-rdoc
  • nanoc-redcarpet
  • nanoc-redcloth
  • nanoc-relativize_paths
  • nanoc-rubypants
  • nanoc-sass
  • nanoc-slim
  • nanoc-typogruby
  • nanoc-uglify_js
  • nanoc-xsl
  • nanoc-yui_compressor

Helpers

  • nanoc-blogging
  • nanoc-breadcrumbs
  • nanoc-capturing
  • nanoc-filtering
  • nanoc-html_escape
  • nanoc-link_to
  • nanoc-rendering
  • nanoc-tagging
  • nanoc-text
  • nanoc-xml_sitemap
@NicholasTD07
Copy link

Thank you for the great work! Nanoc is so AWESOME! Just created my personal blog site with it.

Demo: http://dev.nicktd.com/nanoc-blog-site/
GitHub Repo: https://github.com/NicholasTD07/nanoc-blog-site

I love its simplicity and flexibility. So easy to shape it into what I want!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment