jnordberg / wintersmith

A flexible static site generator
http://wintersmith.io/
MIT License
3.5k stars 335 forks source link

1.page, 2.page in content.pages #212

Closed airtonix closed 5 years ago

airtonix commented 10 years ago

This is my contents directory:

https://github.com/airtonix/zenobi.us/tree/master/contents

I seem to be getting something like this in my generated data :

each _, item in contents.pages
    [ #{item} ]

results in

[ 1.page]
[ 2.page ]
[ about ]

Where are these *.page entries coming from ?

  1. they aren't files i created
  2. is it the . (current directory) and .. (parent directory)? I can't imagine it would be since they aren't in the contents.pages.about tree.
xmojmr commented 10 years ago

The files are produced by the paginator plugin, see code in your repository https://github.com/airtonix/zenobi.us/blob/master/plugins/paginator.coffee#L77.

What is it, where does it come from, how to configure it? Don't know

jeromew commented 10 years ago

The paginator plugin is a "generator". It creates content that cannot be found in contents/, usually by analysing contents/.

paginator analyzes the contents/articles directory and creates "pages" of articles summary, N articles per page.

you activated the paginator here: https://github.com/airtonix/zenobi.us/blob/master/config.json#L9

and configured it here: https://github.com/airtonix/zenobi.us/blob/master/config.json#L34

remove thoses lines if you do not want the paginator activated. it will stop creating the "virtual" content.

check https://github.com/jnordberg/wintersmith#overview for a bit of documentation.

airtonix commented 10 years ago

Thanks guys, this is good to know.

I tried removing those two lines, now it complains :

content 'index.html' specifies unknown view 'index.jade'

edit: mis-clicked close.

jnordberg commented 5 years ago

Cleaning up old issues, feel free to create a new one if this still is a problem.