How to use pelican to generate a hierarchical website, not a blog
Asked Answered
R

1

9

I'm trying to use Pelican to generate a hierarchy of .html files, with a hierarchy of .html and .md files as input.

Pelican has a lot of great features, but it is focused on generating a blog, not a static, hierarchical website. Sure, it has that pages subdirectory, but it doesn't respect subfolders in that directory; instead, it tries to flatten all of the files it finds into the same directory, and then complains that it will "overwrite" files with the same slug.

I'm used to managing large sets of web pages in subfolders. When I put file.html in subfolder mysite/a, I expect the URL to be something like https://myserver/mysite/a/file.html. But apparently Pelican (and Jekyll) think one folder should be enough for anybody. Am I missing something? Or is Pelican so focused on blogging they are just not up to the job of really generating and managing static sites?

Pelican seems like really cool tool. The source is very well-written, and it has lots of nice options. But I'm starting to think that it's really not for generating static sites, but rather for generating static blogs. Is anyone else using it the way I'm suggesting?

Rothstein answered 20/5, 2016 at 4:44 Comment(0)
M
6

Pelican is focused on publishing sites, regardless of purpose. I recommend looking through the issues to see related questions. There is also a plugin that focuses squarely on replicating hierarchical content.

Mere answered 20/5, 2016 at 11:24 Comment(1)
Here is an easy solution from the issues: github.com/getpelican/pelican/issues/686#issuecomment-48603981Dysprosium

© 2022 - 2024 — McMap. All rights reserved.