Reputation: 3306
I have Jekyll site hosted on GitHub Pages. The file _config.yml
has this content (excerpt):
# Defaults
defaults:
# _pages
- scope:
path: "_pages"
type: "pages"
values:
layout: "single"
read_time: true
So when the site is built, I can open a page by its URL like this:
https://repo.github.io/_pages/some-page/
I read all the docs for Jekyll but it is not clear to me how to turn this URL to be https://repo.github.io/some-page/
or maybe https://repo.github.io/pages/some-page/
.
Upvotes: 3
Views: 683
Reputation: 27353
For eg. https://repo.github.io/some-page, you can put in _pages
and config as such:
collections:
pages:
output: true
permalink: /:name
Upvotes: 1
Reputation: 5444
_pages
can be seen as collection
directory.
Therefore by simply having the following config:
collections:
pages:
output: true
will give you URLs like https://repo.github.io/pages/some-page.html
To get custom URLs you may add a permalink
sub-config:
collections:
pages:
output: true
permalink: /:collection/:path/
will give you URLs like https://repo.github.io/pages/some-page/
For more possibilities, refer the official docs
Upvotes: 5