Push content to link - Automatically apply #tags, [[links]], ![[embeds]] into newly-created [[links]] through "[[link]]>>{insert content}"

For me, pushing to existing links creates a [[duplicate note]] off the vault root when the original is at root > pages > [[original note]].

Still digesting the amazingness of this! Kudos @lizard_heart!

For pushing content to existing files, which may already work as described by @sonsche above, would something like this be possible:
That is, can the plugin identify if a file with the name already exists in the vault?

If no, then current process.

If yes, then prepend/append {content} per:

  • Plugin settings–top of note, bottom of note, after user-defined mark like “___”
  • Inline–top of note = “key” ; bottom of note = “key”

That’s a great idea! Thanks for the suggestion. I can also add a setting so you can customize the prepend/append character.

1 Like

Amazing work from @lizard_heart! I would be happy to try this plugin with BRAT.
For others : Don’t forget to at least give github star on this project and donation for full support.

I have two points :

  1. I agree with @gobbletown, this is a core feature of this plugin… (top priority).

  2. for further development (after core feature achieved), I have several ideas that can be discussed so that become mature ideas. I like the idea from @gobbletown about prepend / append at a certain position. Something like this maybe ?

Here’s some stupid syntax ideas from me, maybe someone has a better idea… I suggest there are two types of syntax (full & simplified). Simplified syntax is a simplification of full syntax (that default values has been defined in the plugin settings).

Use case Full Syntax Simplified Syntax
Prepend to top of page [[target file]](prepend)>>{content} [[target file]]>>{content} if default value set to prepend
Append to bottom of page [[target file]](append)>>{content} [[target file]]>>{content} if default value set to append
Prepend to begining of the heading [[target file#Original Heading]](prepend)>>{content} [[target file#Original Heading]]>>{content} if default value set to prepend
Append to end of the heading [[target file#Original Heading]](append)>>{content} [[target file#Original Heading]]>>{content} if default value set to append
Prepend before block [[Target File^block-id]](prepend)>>{content} [[Target File^block-id]]>>{content} if default value set to prepend
Append after block [[target file^block-id]](append)>>{content} [[Target File^block-id]]>>{content} if default value set to append
Prepend before user defined mark [[Target File]](prepend, mark:"___")>>{content} [[Target File]](mark)>>{content} if default value set to prepend & mark set to ___
Append after user defined mark [[Target File]](append, mark:"___")>>{content} [[Target File]](mark)>>{content} if default value set to append & mark set to ___
Replace user defined mark [[Target File]](replace, mark:"___")>>{content} [[Target File]](replace)>>{content} if default value of mark set to ___

I don’t speak English in my daily life, so I’m sorry if there are any mistakes :pray:

3 Likes

Hey, thanks so much for the feedback. I just pushed a new release with the basic functionality of adding content to an existing note. It also includes the plugin setting to add the content at the beginning or end. More inline settings will be added in the next release.

7 Likes

This is amazing - working so well :smiley:

Would love to hear what other workflows you guys are coming up with using this push!

Yas!

@lizard_heart , you’ve single-handedly resolved one of the longest yet-unresolved functions within Obsidian!

So much kudos, and to the previous points made about a donation page, please let us know if/when you setup GitHub sponsors or any of the “cup o’ coffee”-type creator-supports. You deserve much thanks here!

1 Like

@syncretizm @sonsche @lizard_heart

It would be useful to organize thoughts on:

  • syntax
  • workflows
  • use cases

As well as thoughts on further development, optimization, etc.

@lizard_heart Regarding syntax and setup:

  • How does the plugin approach filepath on creation or appending/prepending?
    That is, there are several potential paths for ‘new’ notes and depending on how the plugin considers ‘existing’ it will either “create” or “insert” files.
    In other words, when I try to use the ‘prepend’ function, I often create duplicate files with the same name but in a different ‘filepath’.

How should we think about and setup our file creation path for ‘new notes’ and ‘daily notes’ to be able to mirror the format/algorithm used by your one plugin to rule them all?

1 Like

Just a minor friction I had — [[target|>>alias]] doesn’t work, but [[target|>>alias]]>>{} works haha.

1 Like

excellent! resolves one of muh frictions too!

another plugin i’ve found useful that will likely streamline friction here to is “Wrap with Shortcuts”:

It allows a hotkey-press to add a start/end ‘tag’–to wrap content with “>> {” and " }"

@gobbletown When you are getting duplicate files, what exactly does the link look like? For me, when I try to write an existing file it auto populates the correct path like this: [[Templates/date template]]. That should stop any duplicate file creation, but let me know if something isn’t working.

Wow… It’s works like magic…
I tested into some different use case :

  1. Inline Push :white_check_mark:
  2. Multiline Push :white_check_mark:
  3. Push several content into same file :x:
  4. Push several content into different file :x:
  5. Push several content inline :x:

Detail for reproduce it on this github issue

My sugestions :
right now is only 1 comand to excute all pushed content in the page, maybe in the future :

  1. execute all pushed content in current page
  2. execute only one pushed content where current line / current cursor

Maybe in the future I will use the plugin in the following way:

  • Open Daily Note, then :
    • Push Content to Project Note, then :
      • Push Content to Resource Note

is equal to :

[[Project Note#Related Resource]]>>{
	[[Document A]]>>{
	- [ ] Revision on Part 2
	}
}

writen in daily note, then execute command.

so you can benefit from :

  • Daily note as log
  • Project Note to connect your project & your resource
  • Add Task to your resource, so you can query at your dashboard note

you can kill 3 birds (or more) with 1 stone, or I call this as Nested Push Workflow.

I hope many people will benefit from this. Some applications (like roam & logseq), they push content by indenting bullet point. Due to fundamental differences of obsidan & other applications, maybe this workflow can be an alternative.

3 Likes

Oh that’s a pretty interesting thought haha, nested workflows. Maybe a future feature? (though i imagine it might actually work already - have you tried it out?)

I’m thinking of how to reduce friction with the current plugin. For example, when typing >>, automatically having the {} pop out with the text cursor inside. Or typing [[target]]>>{template:applythistemplate.md} and having the plugin Templater work its magic on that.

PS. @lizard_heart not sure why but the kofi doesn’t seem to accept payments - not sure if it’s from my end or yours!

2 Likes

@syncretizm @gobbletown My previous support link wasn’t working, so here is a new one: https://www.buymeacoffee.com/lizardheart if you must.

2 Likes

Any idea when this can be pushed to community plugins? :slight_smile:

Would be really cool to see more creative use-cases of pushing content!

1 Like

Here’s a nifty trick I found…

Download the Text Snippets plugin. Then in the options, add this to Snippets:

ss : >>{$end$}

then when typing [[link]]ss you can just hit Ctrl-tab after it and it will automatically expand to create [[link]]>>{} with your cursor in between the curly brackets. You can also preconfigure things you want to push to specific types of pages, like insert a tag automatically within, and so forth.

2 Likes

I think it’s an issue within the core setting of ‘Files & Links’ > ‘Default location for new notes’.

If I created an initial note ‘New_Note’ under /pages and have later changed the ‘Default location’ to /root or /journals then it will create a ‘duplicate’ ‘New_Note’ under /journals instead of aliasing ‘New_Note_Alias’ under the existing ‘/pages/New_Note|New_Note_Alias’.

If there’s a possible permutation that breaks a process, it’s the one I’m using… Like a Pauli Effect but for software instead of hardware: https://en.m.wikipedia.org/wiki/Pauli_effect.

Is there a ‘best way’?

How would we do this for the correct aliasing using the same?

Any workflows for correct aliasing?