We can sort by date, title, weight, length, etc.
But where is sort by file path?
@jmooring already provided you with a Github repo here explaining how to sort page collections by Path. Does that not work?
It doesn’t works. All of list content disappear and not show up even after I upgraded to 0.123.0
Also I tried .ByFilePath and .ByFileName and got an error.
That is false. I don’t post untested code.
Perhaps what you mean is, “I can’t make it work on my site.”
To make it work on your site we would need access to… your site.
See Requesting Help.
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.