I'm trying to use Lektor as my blog platform, but I am running into a few issues.
Following the guide I can make everything work. My problem begin when I try to make the blog the first page, without the "/blog".
If I query in the page template the blogs children, the pagination don't work.
If I make the blog-post children of the page using "replaced_with = site.query('/blog')" the initial page renders fine, but if I try to access any page, appears a Not Found message.
My goal is show my posts in the first page and have other folders, like "/about" or "/projects" in the root folder.
I get it! The way to do it was setting a query in the "items" key on the page model.
Like this:
[model]
name = Page
label = {{ this.title }}
hidden = yes
protected = yes
[fields.title]
label = Title
type = string
[pagination]
enabled = yes
per_page = 10
items = site.query('/blog')
After that it worked like a charm. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With