Folder as markdown note

In the file explorer, this is something I really miss from TiddlyWiki.

Very useful, but not limited to, referring to people. Say, in one note I say to "Enjoyed hanging out with the [[Skywalkers]] today. [[Luke]] was great fun, [[Anakin]] was just grumpy." I would love being able to nest these references under People > Skywalkers > Anakin | Luke. (with “Anakin”, as well as “Luke”, being a separate note.

The current way to go about it is to make “Skywalkers” a folder and with that not being able to reference it. I would love to be able to reference the nesting elements as well. That is especially handy when referring to families in journaling but allow for a variety of use cases, like being able to switch from referencing book titles or specific chapters.

Using folders as a system to categorise notes discourages creativity and hampers making connections. It seems to me like a more associative nature of structuring content rather than folders is more in the spirit of Obsidian.

This is slightly similar to the Nested Tags request but allows for an even greater variety of use cases. Implementation would not change existing workflows if users don’t choose to link to the notes they use as folders.

2 Likes

Maybe there is something that I am missing but there is no need to use folders in obsidian. If you want to use them, they are there. If you want to keep everything in place, that is fine too.

See folders in obisidan are more for keeping some related files together (if you choose so) not so much for organizing a hierarchy of concepts (which as you pointed out might even be a bad thing).

Folders are for something like, I keep my daily notes here. Stuff for my project there. That is it.

Perhaps, in your case, having a file with the same name as the directory would help. However, again, I am not sure how nice or effective it will be to have deep folder structures because you want to replicate a conceptual hirarchy with it.

2 Likes

Wanted to offer the Dendron app as an example for this. Dendron bakes the hierarchy into the filename. Not sure this is the best way forward but wanted to add it to the discussion.

https://www.dendron.so/notes/4bb85c39-d8ac-48ad-a765-3f2a071f7bc9.html

8 Likes

+1 for this feature!

I love this feature request. Unfortunately, I think that this topic has been highjacked by a debate of how to structure data. If you don’t like Folders/Hierarchical structures, that’s totally fine. You don’t have to use it, which is why it’s great that this idea is a plugin idea. It’s optional.

I think Obsidian is best when it is flexible and powerful enough to allow us to organize our data however we want, without forcing us to think in one particular way.

Folders have a major weakness (they force you into a strict one-to-one relationship hierarchy) but this weakness is also a feature. That hierarchy can be a quick and easy way to organize and find information.

Tags and links are great because they free us from the strict rigidity of folder hierarchy but it also adds the burden of responsibility on us to create and follow a good organization system.

The beauty of Obsidian is that it doesn’t force you into any one tool. We can use folders, and tags, and links. They all have their strengths and their weaknesses and if you don’t like one tool, then you don’t have to use it.

@arcandio 's proposal is great because it makes Folders more powerful and modern without weakening the power of tags or links.

In some ways I miss how Notion would treat “Pages” as both “Pages” and “Folders”. There was no difference. Every page could hold more pages. This meant I could easily create a hierarchy organization. But I wasn’t limited to this hierarchy because I could put a page link anywhere I want to any other page. Because “Pages” in Notion are also “Folders” every page acted as an MOC which was nice because I didn’t have to waste time creating MOC’s. They were just already created.

But right now in Obsidian, if I want to easily see all the notes in a folder I have to create an MOC manually within each folder. And as soon as I add or remove notes from that folder, now the MOC is inaccurate and needs to be manually updated. An index could fix these problems.

6 Likes

My thoughts on @arcandio 's proposal:

A Specific Proposal

  1. enabling the plugin makes any file named index.md associated with its containing folder.

Does the plugin create index.md files or have an option to auto-create index.md files. If so could this auto-create feature be toggled on/off, perhaps even on a per folder basis. (Perhaps every folder could have a right-click option called “Create folder index”.

  1. hide any index.md file from the file list or move it to the top of the sort order, so that it’s not cluttering up the file explorer

Yes!!

  1. clicking on a folder with an index file shows the contents of index.md the way clicking on somerandommarkdown.md will show it in the editor / view pane.

Yes!!

  1. (Optional, but high value) Allow users to link to the folder [[some folder]]

Yes!!!

  1. (Optional, relies on #3 above) Allow the hover / mouseover plugin to show the content of links to [[some folder]]

Yes!!

My Proposed addition to the proposal

  1. (Optional) Plugin auto-monitors changes of files within a folder and auto-updates the index.md file to match the contents of the folder.

  2. (Optional but probably necessary if #6 is on): Still allow user to edit index.md after it has been auto updated by the plugin. For example: add links to other notes even if they are in other folders. (May cause conflicts. Not sure.)

  3. Instead of index.md, how about someFolder_index.md and the plugin would simply look for any file that 1) ends in _index.md and 2) begins with someFolder where someFolder is the exact same name as the parent folder. (I think this would probably resolve the naming conflict issue).

I was thinking of something similar. What if the “folder note” was simply the folder name with a leading underscore _folderName.md. One major benefit of this is that it would sort the folder note alphabetically to the top.

3 Likes

For index.md, the main thing to keep in mind is that that naming is the de facto web standard and so would work transparently with anything that uses it (Jekyll/GitHub Pages, Next.js with MDX files, etc). A configurable setting to change the name used for said notes would probably be a good idea, but using index.md out of the box would be the most interoperable with other tools.

4 Likes

I am trying to make a workflow using Obsidian and I must say this problem with nesting files and folders has been the most annoying one for me so far, specially the fact that folder and files are sorted separately. I like the idea of Zettlekasten but it has a very limited function. It would be nice to use Obsidian for our daily needs and not just for a huge research to connect different idea .

4 Likes

I would love to have the option to make hierarchical notes. It would really help me keep the side bar straightened up, help me stay organized, etc. Your idea sounds good.

6 Likes

I love this idea, it’s exactly what I’m looking for!

Not every note is simple, you’ll inevitably have a complex note containing multiple images or other types of attachments, or a complex idea which needs multiple notes to describe it. Folder Note is the perfect place for such notes. All materials for the same note or idea should be in the same location, the folder of the Folder Note.

And I think this should be the internal concept model of Obsidian, plugin is not a good choice for it.

7 Likes

I felt like sharing a (single) concrete example of my workflow for a specific project. I have more uses for this plugin, but I want to illustrate at least one purpose of this plugin to people who don’t understand how or what I’m writing, because it seems like we’re just not on the same page1.

I write a lot of fiction and tabletop roleplaying games. Those projects do indeed require hierarchy, because eventually the printed material will in fact be printed. I need to be able to organize my thoughts into discrete chunks, so that I can focus my writing.

When using a specific outlining tool (uv outliner, scrivener, manuskript, etc) I use a loose version of The Snowflake Method. In the context of my work, that means starting with the broadest possible strokes (breaking up the content of the project into the biggest categories) and then successively subdividing every section until sufficient detail is reached. For example, a rough initial outline might look like this:

  1. Front Matter
  2. Character Creation
  3. Extended Rules
  4. Specific Subsystems
  5. Running the Game
  6. Lore
  7. Creatures

A next level might look something like this:

  1. Front Matter
    1. publishing info
    2. TOC
    3. introductory fiction
  2. Character Creation
    1. Classes
    2. Cultures
    3. Options
    4. Spells
  3. Extended Rules
    1. skill checks
    2. combat
  4. Specific Subsystems
    1. vehicles
    2. Magic Duels
  5. Running the Game
    1. keeping players entertained
    2. planning the game
    3. balancing combat
  6. Lore
    1. world
    2. factions & groups
  7. Creatures
    1. villains
    2. npcs
    3. wandering monsters
    4. gods

Now, in an outliner application I’d be making notes about what goes into each chapter as I do the initial breakdown. As I transition into subdividing each chapter, I’d start working on the frontmatter of each chapter in the chapter section. So if each chapter has a pullquote, then I would at least mock that up with a blockquote. It takes a lot of revision to summarize these chapters, so I start on that as early as I can and continuously rewrite as the content of the chapter and the rules change.

In other words, in this particular workflow I would be using this plugin both in the initial planning of the manuscript as well as in the production of the final manuscript.

Having that built into Obsidian instead of having to use underscores or chapter numbering would just make things that much more straightforward and efficient for me.


As for why, I have never seen a tabletop roleplaying game where the chapter title is immediately followed by a second-level heading, such as the following:

Races of Middle Earth

Elves

The Elves are an ancient race of long eared, annoying, utterly un-dwarven–etc.

As far as I can find, there aren’t any. They always include some kind of summary or preparatory remarks at the start of each chapter. That content isn’t the content of a second order section, it’s second-order content itself. The content is at the same level as the following sections.

  • Heading 1
    • Summary
    • Sub-heading
    • sub-heading

Now, I don’t read a huge amount of scientific research papers, but it seems to me that having chapter summaries is the norm in almost every other kind of writing I can think of, or find in my library.

I also understand that a lot of people are looking at Obsidian as only the first step into their writing process, but I am not. There’s no reason I can’t write an entire project in Obsidian. I am in the process of doing so with 2 separate manuscripts at the moment, and nothing besides not having chapter summaries is really giving me any trouble at all. Conversion from markdown to HTML and then on to publishing is fantastic and much more efficient (by a matter of months) than my traditional process of laying out each page in Adobe Indesign or Affinity Publisher.

I just wish that I could more efficiently associate chapter summary text with a folder that represents a chapter.

Now, I hope I’ve sufficiently justified why I think this plugin would be useful, to at least some people in the community. I encourage everyone who supports this request to chime in with their own specific use case, so that we can show what we’d do with it!


As for improving the plugin proposal, I agree that some sort of regex matching would probably be both highly desirable and necessary in the long run. I believe that index.md is a solid contender because it is the de facto standard (markdown was designed to be translated to HTML after all) but I would definitely prefer for the plugin to be as configurable as is feasible for devs to implement as possible.


1: Pun absolutely intended.

1 Like

Hey i am a new user, so maybe thats why i came here looking for exactly this.
For example:
If i create a new note called “projects” and then in there add different nested articles, the file explorer on the left will grow longer and longer.

In my opinion #foldernotes or whatever they will be called, help decluttering the file explorer. I dont see why a note about “what screws are needed for project X” from the deepest detail levelwould be right next to one about “my food habits”
I mostly use the graph-view for navigation, but occasionally an alternative strictly treelike sorting is good.
Now i end up creating folders with the same name as the note talking about the contents, and this is unnecessary work in my opinion.

The file explorer i see as something that could look similar to dynalist or workflowy.
Because in the graph view you cannot collapse individual notes.

Dunno i hope this clarifies why some people want #foldernotes

2 Likes

+1
Dendron certainly does this. Its approach is based on a tree view plugin that interprets the syntax of file titles. The syntax is based on points “.”, For example:

Food.md
Food.Vegetables.md
Food Vegetables Broccoli.md
Food.Vegetables.Spinach.md
Food.Cereals.md
Food.Cereals.Wheat.md
Food.Cereals.Corn.md
Food.Cereals.Linseed.md
Food.Fruits.md
Food.Fruits.Mango.md
Food.Fruits.Strawberry.md
Food.Fruits.Banana.md

The tree view plugin panel interprets this and shows a folding scheme like this:

  • Food
    • Vegetables
      • Broccoli
      • Spinach
    • Cereals
      • Wheat
      • Corn
      • Linseed
    • Fruits
      • Mango
      • Strawberry
      • Banana

It works almost perfectly, why almost? Because logically when linking to [[Broccoli]] you will get [[Food.Vegetables.Broccoli]] so you will have to use the alternative text [[… | …]]. Depending on who you are, that may or may not be convenient.

Like everyone I really would like this feature or plugin.

Hello, I came to this discussion for the very reason outlined by others, i.e. the need to create subnotes into a note - or, to put it in a different way, to add content and linkability to a folder.

For those like @icouto and others who are experts on the Zettelkasten system, if a note is a macro-topic that can contain completely different sets of information, how would you handle it?

Eg.: Let’s say that I want to create a note called “Morocco” under “European Union Neighbourhood policy (ENP)”: in my mind, that “Morocco” page would contain all information that refers to the strict topic “ENP in Morocco”. At the same time, I could have another main “Morocco” note/folder addressing what pertains to Morocco only, or a sub-note under a folder “Middle East”, etc.

How would the Zettelkasten method replace the hierarchy in this case? Would it simply create a main note “Morocco”, which within time would become very long, or separate mini-notes all called differently (eg.: ENP-Morocco, Middle East-Morocco) with a general tag #Morocco inside each of them?
In the latter case, every time i mention “Morocco” in the context of the ENP should I write [ENP-Morocco]?

Thanks

Anyhow, I would definitely be interested in a plugin allowing the option of subnotes.

2 Likes

I have created an simple plugin to do that, you may have a try. I am not an expert of TypeScript, but the plugin can do what you described.
https://github.com/xpgo/obsidian-folder-note-plugin

4 Likes

Your plugin works almost perfectly, it only takes two things.

  1. It would be great if the about.md note takes the name of the same folder. I don’t know how possible that would be for you. Objective: Make it possible to navigate with the quick jumper to the folder note.

  2. Due to the collapsible behavior of folders when you want to go to the “folder note” it collapses. A solution for this could be for the folder to collapse with just the arrow and not with the name (that is, the entire label box). Objective: navigate with one click in the tree of notes and folder notes. If you want to collapse, go to the arrow.

Congrats, I hope you can get it. You’ve really come close to “note hierarchy” request.

In your manual installation note, it says I just have to copy three files into the folder, including main.js but there is only a main.ts file in the folder. Also what should I do with rest of the files? Are they all useless?!
Thanks you

You should:

  1. go to the release page: https://github.com/xpgo/obsidian-folder-note-plugin/releases
  2. download the related files: main.js, styles.css, manifest.json.
  3. create a folder ‘folder-note-obsidian’ in the plugin folder
  4. Put the downloaded files into it.
  5. Go to Obsidian plugin settings page and enable it. refresh it if the plugin is not shown.
    Hope it works.
2 Likes

now the note name can be configured to the same as folder name or some other style.
for the 2nd suggestion, it seems hard to control the collapse behavior base on API.

Thanks. It works. It is going to save me so much trouble

1 Like