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
2
votes
0 answers

Can't use variable for basic operations in Nanoc

I got a quite annoying problem tonight, and maybe someone here will be able to help me. I'm building a static blog with nanoc, and currently making some helpers for next/previous articles (I included some tests I made and the return): #…
FabPelletier
  • 313
  • 1
  • 3
  • 5
1
vote
2 answers

Using nanoc to create a list of blog articles, sorted by month and year

Using nanoc to create a blog archive page, I'd like to display a list similar to what's shown at http://daringfireball.net/archive/ I'm running into problems based on the way blog articles in nanoc are dated. Here's the code I've tried: by_yearmonth…
alt0
  • 21
  • 5
1
vote
1 answer

How should I implement 302 redirect for website transition?

I have an old website that hasn't gotten much love over the years and that's about to change. The existing site is based on a 3.* version of an ASP.NET portal framework called DotNetNuke (DNN). I'm going to pull that site down and bring up a new…
wchrisjohnson
  • 190
  • 12
1
vote
1 answer

Where does nanoc create my site on windows?

http://nanoc.stoneship.org/docs/3-getting-started/ I type nanoc create_site tutorial using cmd command line within a folder. It says it created the site but I can't find it in current directory where I launch the command.
user310291
  • 36,946
  • 82
  • 271
  • 487
1
vote
1 answer

How to write a filter to nanoc that adds a ref to a toc after each header

I'm trying to create a filter that adds references to the TOC after each h2 heading. Here is what I've done but it doesn't work, and each time I modify the code all the relevant pages are not recompiled. {Project dir}/Rules: compile '/**/*.md' do …
eleandar
  • 33
  • 4
1
vote
1 answer

Pass variable from content to layout in Nanoc using Slim

I basically want to know the easiest way to pass a ruby variable from a content page to its layout using Nanoc and Slim. I am thinking of something like this: content/content.slim: --- title: Writeups layout: /layout.slim --- - age =…
1
vote
1 answer

Linking to search results with Ruby

I'm a complete novice in Ruby and Nanoc, but a project has been put in my lap. Basically, the code for the page brings back individual URLs for each item linking them to the manual. I'm trying to create a URL that will list all of the manuals in one…
a_citizen
  • 11
  • 1
1
vote
1 answer

How to specify layout in nanoc?

In Jekyll, we write layout structure in a HTML file and put it in _layout folder. Say, the _layout folder has file named welcome.html, for a webpage to use it, we simply specify as follows: --- title: Awesome webpage layout: welcome --- How to do…
kingmakerking
  • 2,017
  • 2
  • 28
  • 44
1
vote
0 answers

Nanoc setup for URLs and links on a github deployed webpage

I depoyed a static webpage on github with nanoc. Everything works very nice. Except that the images not their thumbnails are visible. The URL path is missing the project name. So when i click in the image caption i get redirected…
theDrifter
  • 1,631
  • 6
  • 24
  • 40
1
vote
1 answer

How to use a static site generator for a Getting Started guide

I want to write some getting started guides for areas of my site in markdown and split them over multiple pages. My file structure is like so: /doing-x 1-blah-blah.md 2-blah-blah.md 3-blah-blah.md /doing-y ... I managed to get mostly what I…
Joseph Le Brech
  • 6,541
  • 11
  • 49
  • 84
1
vote
1 answer

Accessing Nanoc variables from Rakefile

I'm wondering how it may be possible to access Nanoc's variables (e.g. @items, @config, etc.) from a Rakefile. I have a file called nanoc.yaml that has data like this in it: products: ce: name: 'Community Edition' ee: name: 'Enterprise…
Connor Shea
  • 795
  • 7
  • 22
1
vote
2 answers

Nanoc filter for SCSS

I'm writing a site using nanoc and ruby, and I want to use SCSS. But I'm having a bit of an issue. No matter what I try, I cannot get my SCSS file to convert and output as compiled CSS. It either throws an error or comes through as exactly the same…
TechnicalTophat
  • 1,655
  • 1
  • 15
  • 37
1
vote
0 answers

Dynamically creating Nanoc rules and compile directives

I would like to generate Rules DSL from the helper module. I have custom blog helper and i would like it to generate RSS feeds automatically so I don't have to specify any compile and routing rules in the Rules file as long as specific metadata is…
majkinetor
  • 8,730
  • 9
  • 54
  • 72
1
vote
1 answer

How to invoke my code before/after the site compilation in nanoc?

I have some additional processing, and would like to generate some javascript files based on existing content. Therefore, I need my code to be called after the site compilation and generation, so I can create new files in the output. How to do that…
igr
  • 10,199
  • 13
  • 65
  • 111
1
vote
2 answers

Nanoc - Problems with deployment to github pages for css file

So, trying out nanoc. Have uploaded the output folder to gh-pages on github. Having trouble with css to display its styles. Tried adding filter :relativize_paths, :type => :css in Rules. Compiled it again. It's still not displaying properly.…
user273072545345
  • 1,536
  • 2
  • 27
  • 57