olivierkes / manuskript

A open-source tool for writers
http://www.theologeek.ch/manuskript
GNU General Public License v3.0
1.71k stars 226 forks source link

Service information in md files #1210

Open pvphome opened 10 months ago

pvphome commented 10 months ago

The md-files created by manuskript contain service information, for example: "title: тест ID: 3 type: md compile: 2" This makes it difficult for third-party programs to edit these files. I suggest to store such information in service files separately from md-files.

TheJackiMonster commented 10 months ago

Since all of content is text and all of the metadata we store in the multi-markdown file is readable text as well, I don't understand how this makes it difficult to edit these files. Any text editor shouldn't have an issue.

Otherwise wouldn't it be far more complicated to change metadata then if it's stored in a separate file? Can you elaborate your use case?

pvphome commented 10 months ago

I seem to have really overcomplicated the usecase. But now I realized that it makes sense to correct. Right now this section of the file is used to store metadata in a similar way to Frontmatter, but it doesn't conform to its format. To conform, you just need to add "---" lines before and after the section. In this case, this metadata can be processed by those programs that are designed for it. For example, the popular Obsidian program has many plugins to support frontmatter. Besides, now, if you delete this section by mistake, Manuscript will just delete the whole file. I think it makes sense to fix this behavior too.