What should I do, if I want the URL looks like'site/post/sjeidjaXaT'

I mean, every page have a random_string(10) as the slug.

Or are there some magic hack to do this?

Anyone help?
:frowning:

There is no “magic” to do this. The slug is taken from the page folder, OR from the slug page header property.

You could create a plugin that basically hooked into onPageProcessed that basically added a random string as the default route for each page.

Route Header documentation

it would change every time you cleared the cache unless your random string was tied not truly unique, but unique to the page somehow.

I think the random string could be related to the created date of the page, then we are sure it’s unique.

That’s similar to the URLs in medium.com I think, look:
1

what’s the point of the random URL? it can’t be very good for SEO or for just readability.

The point is …
I want the URL is short meanwhile the file path include as much detail as possible.
For example, http://site/p/XyzGWsH --> /siteroot/user/pages/01.post/01.2016/02.02/01.slug-example/post.md

If there are too many files in a folder, like all posts in the ‘01.post’ folder, I’ll fell this is a mess…
Hah~~