How to achieve a hierarchical Dataview list without bullets but maintaining indentation

This is a great solution! You’ve done an excellent job of creating a custom directory list using Dataview and CSS. Let me summarize the key steps:

  • Create a dataview-list.css file in the .obsidian/snippets folder with the following CSS:
/* Remove bullet points from DataView lists */
ul.dataview.list-view-ul {
  list-style: none;

This removes the default bullet points from the Dataview list.

  • In your course folder note, use the following Dataview query:
LIST "<br><span style='padding-left: 50px'>" + join(, "</span><br><span style='padding-left: 50px'>") + "<br>"
WHERE contains(file.folder, this.file.folder) & type != "FolderNoteClass"
SORT file.ctime ASC
GROUP BY regexreplace(file.folder, ".*\\/([^\\/]+)$", "**$1**") AS Folder

Here’s a breakdown of what’s happening:

  1. The LIST command generates the formatted output.
  2. The “
    ” + join(, “
    ”) + “
    ” part:
  • Adds a
    (line break) before each group.
  • Wraps each file link in a tag with a left padding of 50px, to indent the notes.
  • Joins all the file links with a
    separator, creating a vertical list.
  • Adds a final
    after the list.
  1. The WHERE clause filters the list to only include files within the current course folder, and excludes “FolderNoteClass” files.
  2. The SORT clause sorts the files by creation time (oldest first).
  3. The GROUP BY clause uses a regular expression to extract the folder name and bold it using Markdown syntax (folder).

The result is a nicely formatted, indented directory list of the notes within each subfolder of the course, with the folder names bolded.

This is a great solution for organizing and navigating course materials in an Obsidian vault. Well done on figuring this out!