executablebooks / sphinx-design

A sphinx extension for designing beautiful, screen-size responsive web components.
https://sphinx-design.readthedocs.io/en/furo-theme/
MIT License
187 stars 57 forks source link

✨ NEW: Create custom directives #194

Closed chrisjsewell closed 1 month ago

chrisjsewell commented 1 month ago

You can use the sd_custom_directives configuration option in your conf.py to add custom directives, with default option values:

sd_custom_directives = {
    "dropdown-syntax": {
        "inherit": "dropdown",
        "argument": "Syntax",
        "options": {
            "color": "primary",
            "icon": "code",
        },
    }
}

The key is the new directive name to add, and the value is a dictionary with the following keys:

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 80.83333% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 87.66%. Comparing base (af64472) to head (59e581f).

Files Patch % Lines
sphinx_design/shared.py 62.90% 23 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #194 +/- ## ========================================== - Coverage 89.18% 87.66% -1.52% ========================================== Files 11 11 Lines 962 1030 +68 ========================================== + Hits 858 903 +45 - Misses 104 127 +23 ``` | [Flag](https://app.codecov.io/gh/executablebooks/sphinx-design/pull/194/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | Coverage Δ | | |---|---|---| | [pytests](https://app.codecov.io/gh/executablebooks/sphinx-design/pull/194/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | `87.66% <80.83%> (-1.52%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.