anki icon indicating copy to clipboard operation
anki copied to clipboard

Add admonitions where appropriate

Open brishtibheja opened this issue 1 year ago • 7 comments

In some parts of the docs, we use <strong> to make things stand out but a warning div can be more proper.

Some examples of where we can use it:

  • [ ] Profile section warns user they cannot sync multiple profiles with one account.

  • [ ] The security warning for latex.

  • [ ] Look for other things where we can use it.

~~Refer to mdBook docs for how you do it: https://rust-lang.github.io/mdBook/format/mdbook.html#classwarning~~

Actually, we can just use this third-party preprocessor: https://github.com/tommilligan/mdbook-admonish

It gives us more features/flexibility like we can use it to insert FAQs into normal pages (which looks dope if you have seen other sites like that before).

Thoughts, everyone?

brishtibheja avatar Jun 03 '25 16:06 brishtibheja

I'd love to have that. I wanted to use admonitions for ankitects/anki-manual#380 (the "faqs") but couldn't cargo install the package (I must have found an outdated name on the internet, because even the github repo returned 404).

It even supports custom admonitions. Thanks for bringing this to my attention, this is so much better than the workarounds I proposed. I'll try to implement it in ankitects/anki-manual#380 for the faqs and show a screenshot.

Afterwards, I'll come back to this issue and open PRs for the examples you've given.

(I wish I could assign myself but I don't know how to)

GithubAnon0000 avatar Jun 03 '25 16:06 GithubAnon0000

(you need to have perms for issue assignment)

brishtibheja avatar Jun 03 '25 16:06 brishtibheja

we can use it to insert FAQs into normal pages (which looks dope if you have seen other sites like that before).

Do you happen to have a few examples for inspiration, @brishtibheja? I know I could use https://tommilligan.github.io/mdbook-admonish/reference.html#admonition-question and have something like this:

Image

But especially with multiple items, I'd like some inspiration.

Otherwise I'm wondering whether the question-answer pairs of #380 could be included directly into the page, possibly using admonitions as well.

GithubAnon0000 avatar Jun 03 '25 18:06 GithubAnon0000

These pages have FAQs at bottom: https://lazyguidejp.github.io/jp-lazy-guide/setupAnki/

These seem to be collapsible. Can you check maybe we can do that too?

brishtibheja avatar Jun 03 '25 19:06 brishtibheja

Works perfectly.

Edit: You can check ankitects/anki-manual#380 for visuals.

GithubAnon0000 avatar Jun 03 '25 19:06 GithubAnon0000

Another place where it would be useful (see the "WARNING" messages): https://docs.ankiweb.net/files.html?highlight=usb#running-from-a-flash-drive

GithubAnon0000 avatar Nov 11 '25 15:11 GithubAnon0000

Hi @GithubAnon0000 — I'd like to help with this without stepping on your work. Could I open a small PR to anki-manual converting the WARNING notes in "Running from a flash drive" (files.md) to admonitions? If you're already covering that page, I'll pick another one.

Sanilas-ai avatar Oct 30 '26 17:10 Sanilas-ai