MikhailKravets / mkdocs_puml

Inline PlantUML diagrams in your MkDocs documentation
MIT License
26 stars 5 forks source link

Configurable keyword for parsing #20

Closed legwinskij closed 1 year ago

legwinskij commented 1 year ago

Is your feature request related to a problem? Please describe. First of all, thank you very much for this great plugin! Just one question, I use GitLab for some of the projects, and GitLab supports inline plantuml rendering natively throughout the whole website. Only issue is that their integration looks for keyword plantuml instead of puml.

Describe the solution you'd like Would it be possible to extend configuration for customisable keyword within mkdocs.yml? e.g. something like this:

plugins:
    - plantuml:
        puml_url: https://www.plantuml.com/plantuml/
        num_workers: 8
        puml_keyword: plantuml # default puml

Describe alternatives you've considered Switch from puml keyword to plantuml, but that could break backwards compatibility, and having this configurable might be bulletproof going forward, these "flavored" Markdowns are not standardized per se.

MikhailKravets commented 1 year ago

Hi @legwinskij. Thanks for raising the issue. I'm glad to know that you find this library useful!

This is actually quite a good idea. I'll think about implementation of this feature.

legwinskij commented 1 year ago

Hi @MikhailKravets thanks for feedback, would you be ok if I try the implementation in a branch and send you pull request for review? I just thought I could help the community as well! But I don't want to push you :).

MikhailKravets commented 1 year ago

@legwinskij, of course! It'll be much appreciated. There is no PR policy yet 😬 please follow these standard rules for now:

  1. Cover new functionality with tests (I keep coverage at 100% now)
  2. Add new functionality to docstring where needed
  3. Make PR into release/1.2.0 branch

Many thanks 🚀

legwinskij commented 1 year ago

@MikhailKravets thanks! I've tried something, please let me know what you think :).