Questions tagged [nanoc]

nanoc is a static site generator, fit for building anything from a small personal blog to a large corporate web site.

nanoc is a static site generator written in Ruby, fit for building anything from a small personal blog to a large corporate web site.

Notable sites using it

96 questions
1
vote
1 answer

Date localization with nanoc's "created_at"

I found lot of articles talking about i18n with Rails, Nanoc, but nothing about a really simple (I think) thing: how to internationalize a date on a nanoc article. I have a really simple setup, for example here is a snippet of my index.html…
devmind
  • 13
  • 2
1
vote
1 answer

Rscript appears to have a length limit. Options to circumvent it?

I want to pass arbitrarily long strings to Rscript -e. However, there appears to be a length limit. Consider the pattern: $ Rscript -e 'cat("some string goes here")' If the string has a length of 9993 (on my machine), the command fails and hangs…
Chip Hogg
  • 1,570
  • 13
  • 14
1
vote
1 answer

how to use erb filter in nanoc compilation?

I begun to use nanoc recently and got some problems using erb filter. I put following code in content/blogs.html.
    <% for item in articles() %>
  • <%= item[:title] %>
  • <% end %>
and filter the item using :erb (in Rules) compile…
qweruiop
  • 3,156
  • 6
  • 31
  • 55
1
vote
2 answers

include partial in nanoc [haml]

I have this in my Rules file: compile '/gallery/' do filter :haml layout :'gallery' end ... compile '/' do filter :haml layout :'default' end ... route '/gallery/' do nil end ... route '*' do item.identifier.chop + '.'…
branquito
  • 3,864
  • 5
  • 35
  • 60
1
vote
1 answer

Configuring nanoc so it will output files in the same directory without renaming them?

When I "compile" with nanoc everything ends up in the output directory, but each page ends up in its own directory, (with the exception of the root index.html file). Is there any way to configure nanoc so that it outputs all the files to the same…
leeand00
  • 25,510
  • 39
  • 140
  • 297
1
vote
1 answer

Illegal nesting with SASS everytime

I’m trying to create my own website and I’m using Nanoc. I’m also writing my files in HAML and SASS. When I’m writing into my SASS file, I always have the error Haml::SyntaxError: Illegal nesting: nesting within plain text is illegal when I…
oxiqxor
  • 11
  • 1
1
vote
1 answer

Nanoc + Bower = Error - Found 2 content files for

I'm using nanoc to generate an static site. Recently I added Bower to manage front end dependencies. When I add Bootstrap via Bower I place the package in /assets/bower/ The Bootstrap package contains multiple files,…
thedev
  • 2,816
  • 8
  • 34
  • 47
1
vote
1 answer

nanoc does not find my PHP files on autocompile

I'm using nanoc to build a static website which has a PHP script for sending mails. Simplified structure: /content/index.html /content/contact.html /content/mail.php However, when I do a nanoc compile everything is fine in my output…
acme
  • 14,654
  • 7
  • 75
  • 109
1
vote
1 answer

Nanoc - compile output different to nanoc view

If you create a new nanoc site, and then run nanoc view, it works well. The CSS, pathing, and assets are correctly handled. However, when I run a nanoc compile, it's not handled the same way. I get broken CSS, broken paths etc. What is causing this…
Dominic Bou-Samra
  • 14,799
  • 26
  • 100
  • 156
1
vote
2 answers

Nanoc - Skip file during compile/autocompile

I'm building a site with Nanoc and have one file (with it's own layout file) that reads all other files metadata, does some magic and saves the file. Unfortunately, this process takes a long time and developing other views with autocompile is taking…
keepkimi
  • 373
  • 3
  • 12
1
vote
2 answers

Cache busting with nanoc

How to implement cache busting with Nanoc? For instance, add MD5 checksums to all image/font/js/etc resource links on HTML and CSS files. For instance, if I had index.html and images/badger.jpg, I'd like the image link on the page to be changed to…
raimohanska
  • 3,265
  • 17
  • 28
1
vote
1 answer

Nanoc is not compiling css

I wanted to use custom stylesheet path /stylesheets/stylesheet.css to use with nanoc but nanoc doesn't render css file in output folder. Here are my rules: compile '/stylesheets/' do filter :css end compile '/images/*/' do end compile '*' do …
lukaszkups
  • 5,790
  • 9
  • 47
  • 85
1
vote
2 answers

How to redirect in nanoc

I am new to nanoc and I just setup by blog. All my posts are under /blog/post/Month/Post_name.html, but every time I visit /post/, it shows me the Apache file list view. Rather I want /blog/post/* to redirect to /blog/ (which contains a list of…
user1758162
  • 171
  • 8
1
vote
1 answer

How can I use markdown for my main index file in a Nanoc site?

I want to rename content/index.html to content/index.md and use markdown, but my rule for /index/ is being ignored; nanoc show-rules shows it compiling it using more generic rules. How do I set rules for the index page?
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
1
vote
2 answers

Nokogiri installed but not found when using nanoc

I'm having a problem with a project using bundler and rbenv: I'm in my projects root dir and enter bundle install which installs all bundles according to my Gemfile: source 'http://rubygems.org' gem 'rake', '~> 0.9.2' gem 'nanoc', '~> 3.2.4' gem…
acme
  • 14,654
  • 7
  • 75
  • 109