Obsidian publish compatible property embedding

Use case or problem

With base introduction, properties feels more integrated part of Obsidian than ever. Yet currently, embedded note does not allow us to include property.

Proposed solution

Inline property embedding with simple syntax e.g. ![[note^property_name]]

Current workaround (optional)

Dataview inline embedding.

The limitation is these are not compatible with Obsidian Publish unless we use Templator and create static pages (I believe). This gets complicated very quickly for what seems to be a simple task.

Related feature requests (optional)

Embed single property - Closed

2 Likes

Would really love to have this.

Obsidian already does embed really well, so embedding properties should not be too hard (hopefully)?

Yes, Dataview can do that, but it isn’t exactly compatible with Obsidian Publish either sooo…

1 Like

I would really love to have this as well. I think it is sorely needed.

I’m not sure what would be the best syntax to achieve this. I suspect that the ^ syntax that you propose might conflict with the block link syntax that already exists which uses a #^ syntax.

I propose this syntax:

![[note]].property_name

This syntax should be easier to implement (hopefully) since it shouldn’t need to affect the existing syntax.

Also this syntax is fairly intuitive to anyone that has used most programming languages. It also potentially allows chaining like this:

A person's name: 
![[person]].name

A list of phone numbers: 
![[person]].phone_numbers

The first phone number: 
![[person]].phone_numbers[0]

Property names with spaces

One limitation of using dot notation to access note properties is that you wouldn’t be able to access a property if the property name has a space in it. To support property names with spaces we could also offer this option:

![[person]]["property name with a space"]

What would embedding properties do for you? (This is what the “Use case or problem” heading is meant to capture.)

The use case or problem is embedding a property on an Obsidian Publish site.

The current solution (Dataview inline embedding) is not supported on Publish. Neither would any other plugin be supported for that use case.

That’s not the use case, that’s the thing you’re requesting. The “use case” is: why do you want the thing you’re requesting? Why do you want to embed properties on a Publish site? If you could embed properties on a Publish site, what would that let you do?

It may help to explain DataView’s inline embedding and how you are using it. As someone who doesn’t use DataView, I don’t understand what is being requested.

Use case: Store data in a property on a note in Obsidian. Then be able to embed that property on any note anywhere in the vault. Then whenever the property is changed every single embedded instance of that is updated automatically across the vault.

This is valuable for dashboards, calendars, summaries of several notes and all kinds of other use cases.

The use case is everything that people are already using Dataview embeds for but can’t do in Obsidian Publish.

I use properties as a means for the object style note taking.

For example, card object for TCG individual card have following several properties such as followings:

  • Card name (English)
  • Japanese card name (my own translation)
  • Set
  • Image
  • Card text (Japanese)
  • Card stats

The actual note content have details such as card’s review, synergy and other info.

When writing a blog post, I would refer to some of the specific card. Sometimes I write in Japanese and another time in English.

When the original card is in English, I often just embed original card image, as that have all the card info.

But when writing in Japanese, I need Japanese card name, and text, usually formatted as below.

Japanese card name
Card image
Japanese text

Of note, even for English directly embedding image file itself vs. through image property of a card object can have different effect. When a card gets errata, if I used image property, all I need to do is replace that field value, and perhaps keep original as historical data within the note content. Whereas, directly embedded image file would require me to replace the file and putting old file with different file name.

Vs. Alternative

Block embedding

In theory, I could use either inline embed or headers for each of above within the note. The issue then becomes to use base functionality, I have do duplicate same content in properties. As table format of base is for sure useful comparing card with different filters.

Also block embedding always have the risk of losing the link if we change ^name part without realizing there is existing link.

Base embed

Another potential alternative is use base and filter for individual card, and only display selected properties.

The limitation here is order of property display is limited e.g. I can’t put Japanese name of card before image. But the major limitation is it takes far more effort to create this as every card embedding I have to create new base, and then filter.

So hypothetically, my request could be fullfilled if there is a dynamic base view mode where you can supply filter syntax to a single base entity and the output dynamically changes.

E.g. ![[Base(filter_criteria)]]

Though I’d assume this is far more complicated to implement on programming end, and also calling them from user perspective.

I really like the idea of the Base() syntax. This opens the door for reusing the Formulas (Functions) syntax that already exists.

For example we could hypothetically do something like this:

![[People.base(file.properties.birthday == this.file)]]

If that embed were put in a daily note then you would get a base embed of all the people whose birthday matches the date of that daily note. In other words we would get a “People Born on This Day” list.

1 Like

I found a great workaround!

The Live Variables plugin is a fantastic replacement for inline Dataview properties:

  1. It’s compatible with the same YAML properties as before, so the data doesn’t need to be changed, just the inlining.
  2. It’s compatible with Obsidian Publish. It only produces valid plain HTML.
  3. There isn’t a complex syntax you need to use/learn. You just use the commands from the command palette.

You can find it here: obsidian://show-plugin?id=live-variables

I would really love to have this as well. Thanks MugenMuso

I am confused by this FR.

It seems that this FR is asking something like https://forum.obsidian.md/t/show-display-frontmatter-properties-within-the-note-body/71004 and that it works in publish.

If that is the case, comment/follow the FR above. If you want something different. Please, open a search/open a new FR and make it clear what you want.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.