Closed tlwt closed 2 months ago
Hey, I like this idea but can you elaborate a little bit more? Where the variables would be define?
In Obsidian you can define variables within the markdown file.
Just copy & paste the markdown below (or use this file Demo Variables.md) to an obsidian file and if you change to reading view you will the the resolved variables.
---
variable_name: Value of the variable
another_var: TestValue
first_name: Till
---
Just copy & paste this content to obsidian.
`=this.variable_name`
Best regards, `=this.first_name`
Now variables can be also use in the header and body. Although It's a little tricky because a full JSON variables will not work so this should be used only for small things.
For instance:
This would NOT work
---
hea: {"id": 1}
---
url: http://example.com
headers: {{this.hea}}
This WOULD work
---
hea: 1
---
url: http://example.com
headers: {"id": {{this.hea}}}
it would be great if the plugin could support dynamic requests with references to yaml properties
e.g. if in
=this.name
the valueJohn Doe
Then something like
would cause a query to
Especially with the dynamic templates this would allow inclusion of very detailed information into obsidian.