Skip to content
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

Custom alert markers (for Obsidian Callout style alert) #185

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tuurep
Copy link
Collaborator

@tuurep tuurep commented Sep 18, 2024

Issue: #141

  • Enable markers: '*'
  • Make svg icon configurable
    • the plugin allows setting the icons in the initialization like
      mdit.use(githubAlerts, {
        ...
        icons: {
          custom1: svgTag1,
          custom2: svgTag2,
          ...
        } 
        ...
      });
    • Make a new option for vivify's config.json, where you can set either octicon by name or svg by path
    • Allow overriding the default GH icons in the same option
  • Color configuration
    • To be decided... Setting it via custom stylesheets always works but is it too annoying to configure a marker in 2 separate places?

Limitation of plugin:

Using a custom marker with spaces doesn't work, such as:

> [!Pay Attention]
> Hey

@Tweekism tested that on Obsidian this does work (thanks!), and I think it makes a lot of sense so I'd wish it worked here too.

This however works of course:

> [!custom] Pay Attention
> Hey

Feels like more work though.

Consider sending PR to the plugin if it's easy to add.

@tuurep tuurep force-pushed the issue/141-obsidian-style-callouts branch from 6d06a12 to 9e6350d Compare September 18, 2024 15:11
> Something more special

> [!fOoBaR]
> The marker is case-insensitive and turns into Title Case
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if it actually is "Title Case",
However since multi-word markers don't currently work in the plugin, it's not super relevant at the moment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that in Obsidian it's like this:

> [!hello world]

gives Hello world so first letter capitalized only

…dian

On Obsidian, if a custom marker is not defined

e.g.

> [!fooooobarrrrr]

It's styled the same as [!NOTE] (icon and color)

Thanks @Tweekism for confirming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant