Embed snippets, templates and any linkable by delegating the current scope to the embedded file either by using a direct reference or as reference with date naming format relative from today.
Notes can be embedded and will execute any dynamic content from the context of the active note. You can also use Headers in the embedded.
e.g.
```dynbedded
[[Note with Dataview#Pick any header level you like]]
```
This will then include the content of that note into the current note, and execute any dynamic content from the included note in the context of the current note.
As an example: a Dataview script to show inline links
```dataview
LIST FROM [[]]
```
will show the inline links of the current note, not the inline links of the note you are embedding.
You can substitute part of the note name with the current date in any format you like based on Moment.js Date format.
e.g.
```dynbedded
[[{{YYYY-MM-DD}}#Header is possible too]]
```
will embed the content of the "Header is possible too" section of the note with a name of the current date in "YYYY-MM-DD" format, e.g 2022-10-14
Please Note 💡: You need to have the full note name inside the curly brackets, so if you want to use something like DP-2022-10-14 the syntax looks like:
```dynbedded
[[{{[DP-]YYYY-MM-DD}}#Header is possible too]]
```
You can also change the date to be used by "adding" a specific duration to the actual date, either as
- Number (positive or negative) "of days"
- String based on ISO8601 format for example,
P-1D
, for more information click here
e.g.
```dynbedded
[[{{YYYY-MM-DD|P-1D}}#Header is possible too]]
```
will return the section of the note from "yesterday" starting with header "#Header is possible too"
You can style the embedded content with a style sheet. The following styles are available:
- .dynbedded = for the normal display. There is no default value for this at the moment. (This styling needs to be in front of the error Styling if you restyle both!)
- .dynbedded-error = for error messages, by default red. See styles.css
After creating your own style sheet you need to copy it to the .obsidian/snippets folder and enable the style sheet in Appearance / CSS Snippets.
Some plugins are just the perfect partner for Dynbedded, and were one of the reasons this plugin was created 😀
- Dataview will not only be able to show information referenced from the current note (like the inlinks example) but will also allow you to work with Tasks! No Fake checking of Task boxes. It is the real thing.
- Buttons also works quite well with Dynbedded, allowing you to create a "master note" with some reusable buttons.
If you want to see more examples take a look into the Test Vault under Dynbedded in this repository.
You can also read more about the plugin on my website:
Or if you are more the Video type of person take a look at the following video examples:
There are some limitations to the plugin (some might be overcome in the future, some not.)
- Checkboxes are displayed and can be checked but this is only fake. The original checkboxes are not checked! The same is true for Tasks from the Tasks Plugin. See [Working with other plugins](#Working with other plugins) for a workaround.
- The links inside the code-block to embed the other notes data are NOT links, so if you rename your targeted note the connection breaks.
- Dynbedded will not search for content between Header Levels, it will search for content between headers, see Issue #2
PS: No, I won't deliver those features tomorrow 😀
- Automatic Refresh of Embeds
- Name of the day as relative dates, e.g. DWed for this week Wednesday
- Relative name of the day as relative dates, e.g. D-1Wed for last week Wednesday
Just install the plugin via the community plugin dialog as soon as it becomes available. After enabling you are ready to go. At the moment there are no real settings available, only debug logging. (And a link to my Ko-Fi Support)
You can install this plugin via BRAT as long as it is not officially available or if you want to test beta versions (there is none at the moment, so let me know if you want to know when I make one)
For more information on BRAT and how to install this plugin take a look here: https://github.com/TfTHacker/obsidian42-brat#Quick-Guide-for-using-BRAT
Copy over main.js
, styles.css
, manifest.json
from the build directory to your vault VaultFolder/.obsidian/plugins/obsidian-dynbedded/
.
Based on the general idea from Dynamic Embed.