Hello all,
I’m writing here about a problem I met, as I’m not sure it is a bug…
I try to render pages from a collection.
I’ve created a directory _collection/ in the root of a project. I put inside some files: authorA.*md, authorB.*md, etc.
I have a page: authors-list.*md to list all the authors from _collection directory with an include:
{% include list-collection collection='authors' %}
from an include page that define this:
{% for page in site.[include.collection] %}
{% unless page.published == false %}
a href="{{ site.url }}{{ page.url }}">{{ page.title }}
{% endunless %}
{% endfor %}
The page authors-list render quiet well the list of all titles of the .md pages from _collection/.
But when I click on one of the title of the list (for example authorA), the page is redirected to a 404 page… But the URL is showing the right path: www.mysite.tld/myjekyll-site/collections/authorA/
In the _config.yml, if I set a permalink for my collection like this:
collections:
authors:
output: true
permalink: '/:collection/:path/
the URL become wrong, as it redirects to: www.mysite.tld/collections/authorA/ (it miss the /myjekyll-site/);
but I’m able to access to the page if I manually enter www.mysite.tld/myjekyll-site/collections/ from which I can see the index and from here to go to my page…
If I do like this:
permalink: ‘/myjekyll-site/:collection/:name’
(or /:path/) the URL is right, but redirect anyway to a 404 page…and I can’t even reach the index of the directory to find the page…
So, I don’t know so much what to do…
I’m using Jekyll 3.6.0, and I’m actually in localhost.
Hope to find a solution.
Cheers