fzankl / docsify-plugin-flexible-alerts

docsify plugin to convert blockquotes into beautiful and configurable alerts using preconfigured or own styles and alert types.
MIT License
129 stars 14 forks source link

In order to get the Attention one must write [!DANGER] #10

Closed woss closed 4 years ago

woss commented 4 years ago

Instead of

> [!ATTENTION]
> An alert of type 'note' using global style 'callout'.

one must write

> [!DANGER]
> An alert of type 'note' using global style 'callout'.

I suggest mentioning this in readme file or changing the example

fzankl commented 4 years ago

Hi @woss,

can you please provide further details about the location of mentioned example? I cannot identify one like

> [!ATTENTION]
> An alert of type 'note' using global style 'callout'.

In general the type you have to use is "DANGER" but title which will be rendered by default is "Attention". This is already mentioned in readme section Usage.

To use the plugin just modify an existing blockquote and prepend a line matching pattern [!type]. By default types NOTE, TIP, WARNING and DANGER are supported. You can extend the available types by providing a valid configuration (see below for an example)

Do you might have an idea how this could be described even better?

woss commented 4 years ago

Yeah, it's not about the implementation it's about the text that explains it. I wanted to say that you say attention when you mean danger .

By default style 'callout' and headings 'Note', 'Tip', 'Warning', 'Attention' will be used. You can change it using plugin configuration via index.html or for a single alert in your markdown files.

then:

 danger: { // but here danger. 
        label: {
          '/de-DE/': 'Achtung', // === attention
          '/': 'Attention'
        }
      }

I think more semantically would be either attention OR danger but not both mixed together to mean the same

p.s. great job with this plugin. ✋

fzankl commented 4 years ago

May you please have a look at PR #13? I tried to address your issue in a updated readme file.

woss commented 4 years ago

i checked and left the comment :)

fzankl commented 4 years ago

I suggest mentioning this in readme file or changing the example

I have now explicitly pointed out the difference between type and heading. So from my point of view the readme addresses your issue.