I managed the content of my hexo posts on sublime text.
The problem I'm having right now is I cannot keep all my posts under just __posts_ because it gets too confusing. Ideally I want subfolders, like this

However, I do not want my URL to change based on this added subfolder. Because I might move content in folders around in __posts_ later on which will change my links
E.G.

I don't want this highlighted portion of my URL
How can i avoid this
A workaround would be to add a variable in front matter, and then use it in the permalink.
For example:
---
title: Hello World
titleInLink: smth
---
Then set permalink using :titleInLink. The url will look like: http://domain/smth/
Not really sure what controls the permalink under root config.yml
This is what I have on my settings at the moment:

Same problem for me. I have different post types (projects, artists, …) and need to get a little bit more order into my _posts folder.
Perfect outcome:
hexo new project "Test Project" creates _posts/projects/test-project.md
hexo new artist "Test Artist" creates _posts/artists/test-artist.md
The newly created posts should still use their categories for the permalink and not the folder they are in.
You can use a directive :layout in _config.yml as follows:
new_post_name: :layout/:title.md
Once you make a new file project.md in your scaffolds folder,
hexo new project test001 command generates source/_posts/project/test001.md.
Regardless of the folder, the permalink of the post follows permalink: setting in your _config.yml.
For example, the URL of this post is http://example.com/2017/03/02/test001/ if your setting is as follows:
permalink: :year/:month/:day/:title/
Of course any categories and tags can be set to the post optionally.
@NoahDragon -
A workaround would be to add a variable in front matter, and then use it in the permalink.
Your solution partly works.
I have subfolders in my _posts:
For each .md file I added:
titleInLink: USA
but the resulting URL / slug is... domain.com/USA/china/post.md and domain.com/USA/vietnam/post.md
How to get rid of the "folders names" (such as china, japan, vietnam) in my URL / slug?
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
You can use a directive
:layoutin_config.ymlas follows:Once you make a new file
project.mdin yourscaffoldsfolder,hexo new project test001command generatessource/_posts/project/test001.md.Regardless of the folder, the permalink of the post follows
permalink:setting in your_config.yml.For example, the URL of this post is
http://example.com/2017/03/02/test001/if your setting is as follows:Of course any categories and tags can be set to the post optionally.