bouncepaw / mycorrhiza

🍄📑 Filesystem and git-based wiki engine for the independent web written in Go using Mycomarkup as its primary markup language.
https://mycorrhiza.wiki
GNU Affero General Public License v3.0
290 stars 26 forks source link

Auto rename backlinks #239

Open iacore opened 1 week ago

iacore commented 1 week ago

In Obsidian, renaming a file will rename all the references to it.

How can I implement this in mycorrhiza?

bouncepaw commented 1 week ago

Not possible yet and hard to implement well with current architecture 💔 I want this feature for a couple of years already

iacore commented 1 week ago

what's the current architecture? do we make a new architecture?

it requires parsing all files and rewriting them. is that difficult?

bouncepaw commented 1 week ago

I'm slowly refactoring Mycorrhiza and Mycomarkup to make it more bearable.

it requires parsing all files and rewriting them. is that difficult?

It has many unexpected corner cases

iacore commented 1 week ago

I'm slowly refactoring Mycorrhiza and Mycomarkup to make it more bearable.

Have you checked Djot? I use it as the markup language for my websites. I really hope that I can use Djot with Mycorrhiza.

bouncepaw commented 1 week ago

There are no plans to support markups beside Mycomarkup.

iacore commented 1 week ago

but like, if i want to implement it, how would i do it? let's say, adding djot alongside of mycomarkup.

bouncepaw commented 1 week ago

but like, if i want to implement it, how would i do it? let's say, adding djot alongside of mycomarkup.

This would be a titanic effort, I promise you. From the get-go, I see these questions you will have to address:

  1. How to determine what markup is used in a hypha and how to choose markup for new hyphae.

    Choosing can be done with a dropdown. Storage can be done similarly to how Mycomarkup is stored, but instead of .myco files you would use .djot files.

    Another approach (similar to MoinMoin) would be to make the first line of hypha's text part special. If it says, idk, !djot, consider the document Djot. And the Djot document shall be stored in .myco files.

    Ergonomic-wise, I think both have their pros and cons, you would have to choose one.

  2. Adding transclusion and backlinks determination to Djot.

    Finding backlinks is not that hard, and telling Mycorrhiza about them isn't either. Transclusion is a mess, sorry.

Lucky for you, you wouldn't need to touch the Mycomarkup library!

Do you have a collection of Djot files you want to import? If so, I suggest you to write a converter instead that would turn all the Djot documents into Mycomarkup.

iacore commented 1 week ago

aaaaaaa i think i'll write my own wiki system and djot parser instead

bouncepaw commented 1 week ago

I did the same once, I understand you; good luck. When you start, please tell me, I like to learn all about new wiki engines.

Meanwhile, I'll keep the issue open for the titled problem.