Article metadata
  • Copyright CC BY-SA 4.0. See licensing for additional details
  • Author
  • Created 2015-01-11
  • Last updated: 2015-03-09
  • Changes
    • 2015-01-31: Switched references to pull from zotero
    • 2015-02-11: Added builder gem
    • 2015-03-08: Added static data source config and updated title

Gentoo install and basic configuration

Installation steps for installing nanoc on Gentoo Linux

Installation

  • Install dependencies
    • Ruby
      • /etc/portage/make.conf - Add support for Ruby 2.0

        RUBY_TARGETS="ruby20"
      • Install

        1
        
        emerge --ask dev-lang/ruby
      • Select 2.0 as default

        1
        
        eselect ruby set ruby20
    • Pandoc
      • /etc/portage/package.accept_keywords

        Inorder to get both app-text/pandoc and dev-haskell/pandoc-citeproc to install I need to accept unstable haskell packages

        # accept unstable haskell and pandoc since it is a moving target
        dev-haskell/* ~amd64
        dev-lang/ghc ~amd64
        app-text/pandoc ~amd64
      • Install

        1
        2
        
        # Haskell <https://wiki.haskell.org/Gentoo/HaskellPlatform> and Pandoc
        emerge --ask emerge haskell-platform app-text/pandoc dev-haskell/pandoc-citeproc
  • Install nanoc using rubygems

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    gem install nanoc
    # md pandoc rendering
    gem install pandoc-ruby
    # scss to css rendering
    gem install sass
    # all nanoc view
    gem install adsf
    # builder for XMLSitemap
    gem install builder

Create site shell

cd ~/web
nanoc create_site whk.name

Configure static directory for static data source1

  • Create the static dir

    cd .../whk.name
    mkdir static
  • Add to nanoc.yaml

    data_sources:
    # ... filesystem data source here ...
    -
      type: static
      items_root: /assets/
  • Update Rules

    passthrough '/assets/*'

References

Defreyne, Denis. “Nanoc » Documentation.” Accessed January 31, 2015. http://nanoc.ws/docs/.

———. “Nanoc » Install.” Accessed January 31, 2015. http://nanoc.ws/install/.

———. “Nanoc » Troubleshooting.” Accessed March 7, 2015. http://nanoc.ws/docs/troubleshooting/.

“Project:Ruby - Gentoo Wiki.” Accessed January 31, 2015. http://wiki.gentoo.org/wiki/Project:Ruby.

“Ruby - Gentoo Wiki.” Accessed January 31, 2015. http://wiki.gentoo.org/wiki/Ruby.


  1. Defreyne, “Nanoc » Troubleshooting” Solution #2: Using the static data source.