On 1 January 2018 at 18:02, oon arfiandwi <oon.ar...@gmail.com> wrote:
>
> Hello,
>
> I am new to Nikola,
> just explore it few hours ago, and planning to migrate my existing blog to
> Nikola.
>
> My previous blog using different prefix than '/posts/',
> some of them use '/contents/' and some others '/articles/'.
> how to achieve this dynamically on every posts rst?
> I've been thinking to just remove the prefix,
> but can't find it on the conf.py
>
> Already search about it on handbook and this group,
> but may be I just can't find the correct keyword.
>
Set all your POSTS entries like this:
("posts/*.rst", "", "post.tmpl"),
i.e. make the second element empty. You can then create
posts/articles/foo.rst and this will end up as output/articles/foo/,
likewise for contents.
But note that your example sounds as if /contents/ were pages in
Nikola’s parlance. If those are posts, then use the above example;
otherwise, the second element of POSTS and PAGES entries can be
anything.