-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support different embedding styles #879
Comments
This is great. Gave this some thought and suggest the following: Would consider a way to separate embed content scoping from embed content styling. For example: all|card![[my-note#section]] Suggested Section Embed Content Scoping Flags
Suggested Section Embed Styling Flags
Thank you for considering this. I'll take a look at the code base next. |
Hi @SteveDadoly thanks for your thoughts above. I like the idea of describing both content and layout in the "modifier ", I think it's a good way to conceptualize the mapping. So, assuming:
we'd end up with:
For each of those dimensions (content and style) we can have a default (which is what comes from the Foam setting).
Which seems pretty reasonable to me. A couple of extra questions:
|
Thank you for your thoughtful reply. Agree with all of your points above. Best to keep it simple. From my perspective:
|
Cool, I think we have a plan 👍 |
Hey I'd like to give this a shot, if there's still interest! Granted this issue is a little dated and things might've changed, I feel the content-scoping seems useful to have. Am I correct that as of v0.25, embed styling (card vs inline) is determined by a settings config |
Hi @badsketch good to hear from you :) As a first step I would replace the current boolean setting Even without adding the syntax right away, this:
For now you just need to be happy with having the same style across the knowledge base, in a second PR we can focus on the embed variant syntax. Thoughts? |
Yeah totally! So IIUC, say a user has default So we need to
Would you prefer if we split the above into separate PR's so it's more readable and we discuss implementation at 1.? Otherwise, I think I can fit it all in one PR |
Everything you wrote is correct. And yes, I would focus on point n.1 at first, as it's MD compatible. Finally I would add the ability to customize the styling for the individual wikilink by implementing point n.2. |
So double-checking content scoping functionality, if I have a note
Would |
That's correct. In terms of next step/PR, I would suggest starting by adding the remaining 2 configuration options. Once that is working, the next PR would focus on the wikilink syntax, in order to overwrite the default for a specific embedding. Does that work for you? |
Yeah! That sounds great to me! I'm afk for the next few days but I'll get started asap afterwards |
Currently embedding includes the note/section content inlined.
It would interesting to support different "embed styles" to customize the embedding behavior with:
This could either be set by a workspace setting, or with some flag on the embed itself.
With a setting this would be pretty straightforward, with a flag on the embed we'd have to figure out a syntax that is falls back somewhat gracefully in other tools (e.g. Obsidian), but that adds the semantic we care about it Foam. (e.g.
card![[my-note#section]]
)The interesting thing about this approach is that it would also allow more styling to be applied in the future.
The text was updated successfully, but these errors were encountered: