Hiding folder in Publish navigation bar

I tried the instructions here but they aren’t working. My folder structure looks like this:

Home > Syllabi > includes

Includes is a folder of files I re-use as embeds in my syllabi, but I don’t want it to show up in the navigation bar. I tried a couple of variations of the commands I saw other people using, but they aren’t working:

.tree-item-self[data-path^='includes'] {
  display: none;
}

.tree-item-inner[data-path^='includes'] {
  display: none;
}

Can anyone tell me what I’m doing wrong? Thanks!

Not a CSS expert here. Where did you get the “.tree-item-inner”? Mine works with “.tree-item-self.” The directories I’m hiding are in the root directory of my vault though.

> obsidian/Daily-notes
>     ^
>   my vault

Have you tried something like the following?
.tree-item-self[data-path^=‘Home/Syllabi/includes’]

The “publish.css” file should be in the root directory of your vault. Maybe try clearing your browser cache?

Thanks. This convinced me to try again. I created a new folder subfolder to test things and confirmed that the following does work:

.tree-item-self[data-path^='Syllabi/includes'] {
  display: none;
}

(No need for the root folder.)

However, my problem was (and still is) that I actually have an emoji in my folder name, so it is “:notebook:Syllabi”. I’ve tried “%F0%9F%93%93+Syllabi” and 📓+Syllabi and a dozen other ways of encoding it, but none seem to work…

1 Like

Well, the easiest way to solve this was simply to move the “includes” folder to the top level and hide it there. Still curious though if there is another way to handle it though…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.