Change Jekyll URLs for blog posts - jekyll

I am currently using Jekyll to host my blog. The theme I'm using is Chirpy. Currently my blog posts are being published as trstringer.com/posts/blog-post-1.
Is there a way to change/modify this so that it is published as trstringer.com/blog-post-1? I'd like to "remove" the posts components of the url.

I was able to fix this with a permalink: permalink: /:title/.

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 blog on github page not show my new post but It works on localhost:4000

Sorry, I am new to jekyll.
Recently I make a blog by github-page+ jekyll and use somebody`s template
this one
https://github.com/Huxpro/huxpro.github.io
and modify code to use on my blog
but the problem is that :
Jekyll blog on github page not show my new post but It works on localhost:4000
and I search the answer for some page
but I still could not find the answer....
this is my github
https://github.com/intheblackworld/intheblackworld.github.io
1. If you mean "GitHub not rendering all new posts after a specific post":
Solution is check your date format.
Check your YAML header
You may quote your YAML header:
----
date: "2016-03-16"
----
2. If you mean "GitHub not rendering my very newest post"
Solution is Make another commit and push to GitHub
I encounter this problem too.
Have no idea why but this may help.

Octopress blog page not displaying posts

I'm new to Octopress. I created a custom about-me like page as the home page (source/index.md) and moved the default source/index.html to /source/blog/index.html.
In my Rakefile, I changed blog_index_dir from source to source/blog.
In source/blog/index.html I changed the reference to /archives to /blog/archives.
In source/_includes/custom/navigation.html I changed the links to Blog and Archives to /blog and /blog/archives.
I haven't deployed my site yet because I'm still working on it, but when I view it using rake watch and Pow, my posts show up in the sidebar under Recent Posts, but no posts show up in the Blog page.
The source code for my site is at https://github.com/benlindsay/blog
I forgot to change the line in _config.yml from
paginate_path: "posts/:num"
to
paginate_path: "blog/posts/:num". That fixed the problem.

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.

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