For example, I am using the module nodebb-plugin-custom-pages and created a page called home.tpl and route /home, now if I change home page to a custom url /home and navigate to home page, it opens up /home but it is still visible in url. While setting it up to popular, /popular does not show up in url.
permalink url option
-
I would like to request an option for permalink url to be like the one in wordpress which you can choose whether to have slug based on post-id or post-title. This will solve unicode problem and reduce table size.
-
This has been discussed elsewhere. The problem is that the current URL scheme is hard coded into NodeBB, and changing it would be a pain. It is possible to create redirection routes that point to the same post. I think someone made a plugin.
Actually, it looks like no one made the plugin. Someone totally should though.
-
I think a plugin is not enough and would create compatibility issues especially with other plugins.
Should be changed / added something in NodeBB. -
I'm not very familiar with wordpress, but searching around, it looks like their Permalink system is indeed a plugin, (what they call a "module") and it's not even turned on by default.
It would be a nice plugin I think.
-
so sad that it will take a long time for nodeBB to implement post-id instead of post-title.
I will have to move to other platform even though i like nodeBB a lot but cannot really accept when slug looks like garbage in Thai. -
Slug looks like garbage in Thai? What exactly is the problem with it?
-
@pitaj said:
Slug looks like garbage in Thai? What exactly is the problem with it?
Thai has characters above and under unlike english or chinese in which Thai use that place for vow
On nodeBB, if the word has letter above or under normal letter, it will replace letter with "-"
-
@Pakorn can you give me an example of what a correct and incorrect slug would look like? I can fix this.
-
@pitaj for example "สวัสดี" it will change to "สว-สด-"
another example "ทุกอย่าง" will change to "ท-กอย-าง" -
It's
utils.invalidUnicodeChars
incorrectly capturing the above/below symbols as invalid, so they are removed and turned into-
:In console:
XRegExp.replace('สวัสดี', XRegExp('[^\\p{L}\\s\\d\\-_]', 'g'), '-') // "สว-สด-"
-
Isn't that intentional though, because browsers convert uppercase characters in the same manner?
edit: nevermind it works differently then I thought.
-
@yariplus It's not a matter of it being lowercased, I think, but that it's considered an "invalid" character, possibly because it is a modifier for the character before it.
@pitaj @Pakorn These guys seem to have no problems with slugs, perhaps you can ask them? http://nodejs.vn/topic/261/cần-làm-wapchat-cơ-bản-bằng-ngôn-ngữ-nodejs-và-angularjs/3
-
Changing XRegExp to [^\p{L}\p{thai}\s\d\-_] will solve this problem. I'm testing it right now to see if there any side effect.
update: I'm already testing there are a lot of problem when this code go live but it can be fix. It's work just fine a least for now.