notaapp / talk

Issues and discussions for the notes app, Nota.
https://nota.md
60 stars 1 forks source link

Transclusion / Inline Pages #27

Closed Overload119 closed 2 years ago

Overload119 commented 4 years ago

Often time you have a relationship between docs like this:

A C B

A and B are related, and connected by C so inlining C to both of them is valuable.

Whenever C changes, those sections in A and B reflect the change.

There should be some configuration of how much to actually inline since having notes within notes can get difficult to render.

astoilkov commented 4 years ago

It's something like Add Copy With Location but with preview. Do I understand it correctly?

Or you mean something like [[document]] plus rendering the document inline?

Overload119 commented 4 years ago

The latter.

On Tue, Oct 27, 2020, 2:25 AM Antonio Stoilkov notifications@github.com wrote:

It's something like Add Copy With Location https://github.com/notaapp/issues/issues/24 but with preview. Do I understand it correctly?

Or you mean something like [[document]] plus rendering the document inline?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/notaapp/issues/issues/27#issuecomment-717105842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHXC2DKMIHVXVLUXSBIV4LSM2GXJANCNFSM4S52YWYA .

led commented 3 years ago

I'm also very interested in seeing some way of transcluding content, it's a core part of my documentation system. Marked 2 supports a few approaches.

Personally I quite like the <<[somedir/transcluded-document.md] syntax.

To be clear, the transclusion is carried out on the markdown preview rendering side of things. As a use-case, it makes it easy for me to write chunks of documentation and then transclude them as appropriate into different documentation targets.

This could overlap a little with the functionality of #59.

astoilkov commented 3 years ago

Thanks @led. Is it enough to render the document or you need to also edit it?

A quick question for both of you. Did you ever want a preview of the linked file on mouse hover (the same as Wikipedia)?

astoilkov commented 3 years ago

@led One additional question. Do you want the preview inside of the editor or only in the Preview ⌘⇧R? I am asking because rendering a document inside of Preview is much easier and can be implemented sooner.

led commented 3 years ago

@astoilkov For me the principal need is to see the transcluded document rendered in the preview, but not in the editor. Being able to also have a hover-preview in the edit window could be nice, but that would be icing on the cake, and very much secondary to my use-case.

What would be more useful would be for a gutter mark or syntax colouring of the link in the case that the document to be transcluded can't be found.

While I'm at it, this functionality might overlap with script-generated content too, eg [[TOC]] table of contents placeholder.

PS: need to protect against circular references

astoilkov commented 3 years ago

@led Thanks.

You mentioned Marked 2. Do you use it? Why do you prefer Nota Preview to Marked 2?

What would be more useful would be for a gutter mark or syntax colouring of the link in the case that the document to be transcluded can't be found.

I personally want that for all my notes.

While I'm at it, this functionality might overlap with script-generated content too, eg [[TOC]] table of contents placeholder.

Yes. Makes sense.

davistech commented 3 years ago

On Jun 25, 2021, at 7:42 AM, Antonio Stoilkov @.***> wrote:

@led https://github.com/led Thanks.

You mentioned Marked 2. Do you use it? Why do you prefer Nota Preview to Marked 2?

I don’t prefer Nota to Marked 2. I’m looking at Nota as a potential replacement for several other markdown editors that I use. Marked 2 is not an editor but it has some useful features as a “renderer” of markdown files.

What would be more useful would be for a gutter mark or syntax colouring of the link in the case that the document to be transcluded can't be found.

I personally want that for all my notes.

While I'm at it, this functionality might overlap with script-generated content too, eg [[TOC]] table of contents placeholder.

Yes. Makes sense.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/notaapp/issues/issues/27#issuecomment-868439283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXM5Z5GBLVFLW2QKUQ2FNTTURTSLANCNFSM4S52YWYA.