eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.46k stars 314 forks source link

How can I remove the /posts/ part in my URL while keeping the posts folder? #265

Open rob-weiss opened 7 years ago

rob-weiss commented 7 years ago

I want to keep my raw posts, that is the files containing the mere content and simple markup, in the postsfolder, in order to separate them from the other pages. At the same time, I would like to have a URLs like

my-domain/post1/

instead of

my-domain/posts/post1/

How can I achieve that?

I use "prettify": true.

I understand that by changing posts in the following line in blog.py

Global["config"]["path"] = "posts"

to

Global["config"]["path"] = "new-posts"

and changing the name of the posts folder to new-posts I would get something like

my-domain/new-posts/post1/

like explained in #152. But that does not solve my problem.