Obsidian Publish: Invert default backlink sort order

Your title asks about inverting default “backlink” sort order. But what you’re trying to do seems to also require you to reverse the sort order in the side menu. The solutions that worked for me for both required adding some CSS in publish.css.

To reverse the sort of “backlinks” that are at the bottom of every entry, add this:

.backlink-items-container {
  display: flex;
  flex-direction: column-reverse;	
}

To reverse the sort of items in the left side menu, this works for me:

.tree-item-self[data-path^='wte/Blog'] + .tree-item-children {
  display: flex;
  flex-direction: column-reverse;
}

For the side menu, you have to edit the data path. All of my public files that I’m publishing in Obsidian Publish are in a folder that is titled wte. That is why my data path is wte/Blog. In my current Obsidian setup, I have a Blog folder in wte and the Blog folder has all of the “blog posts.” I discuss this and other tips for the side menu in another Obsidian Forum entry.