how do I set permalink for octopress 3 - jekyll

I have tried to set permalinks without dates in octopress 3.
I set it with the _config.yml.
permalink: :title/
But it only generates url's with .html
How do I create real permalinks in octopress 3?

It works, I hadn't included the / originally.

Related

Changing Jekyll site structure

In my site settings, I have the default
baseurl: ""
My site is a blog and my domain name already includes the word blog (blog.example.com), but when I add posts to my site they end up with the path /blog/yyyy-mm-dd/title-here.
How can I get them to be put in /yyyy-mm-dd/title-here instead (without the initial /blog path)?
I am using GitHub pages to serve my site, so I cannot use mod_rewrite.
The baseurlsetting is not relevant for this.
Adding permalink: :year/:month/:day/:title to _config.yml gives the desired permalink style.

Jekyll 3.1.0 Generates HTML files instead of folders

When I was using Jekyll 2.x, the folder structure within _blog was like this:
/blog/post1/index.html
/blog/post2/index.html
But since upgrading it's like this:
/blog/post1.html
/blog/post2.html
So although the permalink setting in _config.yml is permalink: /blog/:title, all the links I use are broken. What's going on? Is there a setting I'm missing?
Permalink config should be permalink: /blog/:title/ with a trailing slash.

How do I get a custom Jekyll permalink style scoped to just some posts (ie blog posts)?

I'd like blog posts on my Jekyll site to follow a specific URL convention. I'd like to avoid having permalinks even in the frontmatter. I'd prefer to specify my style in one place and never have to think about it again.
In _config.yaml you can specify a custom permalink style as follows:
permalink: /blog/:year/:month/:day/:title/
And posts will have a default permalink that looks something like /blog/2015/01/24/some-title/ (assuming 01-24-2015 publish date).
However, I'd like to scope this only to our blog directory. So I tried to use defaults in `_config.yaml' as specified in the Jekyll docs
defaults:
-
scope:
path: "blog"
type: "posts"
values:
permalink: /blog/:year/:month/:title/
Unfortunately, the permalink for my test post is literally http://localhost:4000/blog/:year/:month/:title
Why don't defaults behave the same way as the root permalink? Is there another way to accomplish what I want?
I'm hoping to do this without a custom plugin, as we're using GH pages and plugin options are limitted.
i had the same issue with version 2.4.0. i upgraded using
gem update jekyll
and it updated to 2.5.3. fixed my issue.

Custom permalinks for documents in Jekyll collections

I want to add collections to my Jekyll site. In my _config.yml file I set output: true:
collections:
faq:
output: true
In my source folder I added _faq folder and created a file named 1.md in it.
When I generate the site I can see my document at http://localhost:4000/faq/1.html. But when I customize the permalink for this document and add permalink: /faq/1 in its YAML front-matter, it doesn't display at http://localhost:4000/faq/1 and downloads to the computer instead.
Is there any way to customize permalinks for documents in Jekyll collections (to show without .html extension)?
The permalink should be permalink: /faq/1/, then it works.
Permalink should be permalink: /faq/:path/
That will set the correct relative path for all files and subfolders of that collection and drop the .html suffix.

Jekyll Permalink Configuration

I'm having a hard time configuring permalinks for my blog posts. The way I have my blog set up is root/news/index .
I set my _config.yml to "./" so all my articles are on the same directory as my news index.html. But whenever I click on my article's permalinks on the news homepage, it redirects me to "mysite.com/article" instead of "mysite.com/news/article". I've also tried "./news/" but it only creates another news folder inside my original news folder. I've also tried the setting "pretty" but it still goes to "mysite.com/.." not "mysite.com/news/..."
In the _config file you can change the permalink to anything you like, for example mine is
permalink: /blog/:title
As for the date you can choose your own date using the YMAL front matter, again in mine i have
title:example date: you can pick what ever date you want
So in your case I would try this
permalink: /news/:title