the problem:
we are porting a wordpress blog to lektor. The slugs in wordpress of the post are directly under the main domain e.g. www.mypage.com/my-blogpost-about-food/
not www.mypage.com/blog/my-blogpost-about-food/
.
Now the owner is not ready to accept any broken links. Broken links from the outside, e.g. some random internet page links to www.mypage.com/my-blogpost-about-food/
. This link will not work in lektor. This will decrease the page rank of the redesign of the page with lektor. What can I do to avoid this?
Again, in our current wordpress website
the main blog page sits under:
www.mypage.com/blog/
each blog post has a unique slug, NOT under /blog/
but directly in the main.
e.g.
www.mypage.com/my-blogpost-about-food/
What can I do, to make these URLs be valid for lektor as well? that e.g. mypage.com/my-blogpost-about-food
is a blog post.
EDIT: this is what lektor does not support. Blog posts in lektor must sit in www.mypage.com/blog/SINGLE-BLOG-POSTS-MUSTBEHERE
but I want the blog posts to be here www.mypage.com/SINGLE-BLOG-POSTS-MUSTBEHERE
reading here https://www.getlektor.com/docs/content/urls/
if I go to the system fields and enter my-blogpost-about-food
it will still appear in /blog/my-blogpost-about-food/
reading here it becomes clear that I cannot change the slug in the parent model neither:
With the above settings the blog will live at blog/ and the posts at blog/. But what if you want to put the date of the blog post into the URL? That's thankfully very easy. All you need to do is to set up a new URL format for the children. Just edit blog.ini and add this to the [children] section:
slug_format = {{ (this.pub_date|dateformat('YYYY/M/') if this.pub_date) ~ this._id }}
What this does is that it will prepend the year (YYYY) and month (M) to the ID of the page if the publication date is configured. Otherwise it will just use the ID of the page. With this change our blog post will move from for instance blog/hello/ to blog/2015/12/hello/.
now how would I achieve a behaviour similar to this?
this is the formal of the perma links of our wordpress installation: