Skip to content

Commit e6da568

Browse files
committed
feat: add sphinx-contributors support
1 parent 06babc2 commit e6da568

File tree

4 files changed

+144
-0
lines changed

4 files changed

+144
-0
lines changed

docs/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,21 @@
2323
"sphinx.ext.todo",
2424
"sphinx.ext.viewcode",
2525
# External stuff
26+
"click_extra.sphinx",
27+
"jupyter_sphinx",
2628
"myst_parser",
29+
"nbsphinx",
30+
"sphinx_click",
31+
"sphinx_contributors",
2732
"sphinx_copybutton",
33+
"sphinx_datatables",
2834
"sphinx_design",
35+
"sphinx_sitemap",
2936
"sphinx_togglebutton",
3037
"sphinx_treeview",
3138
"sphinxcontrib.mermaid",
39+
"sphinxcontrib.video",
40+
"sphinxcontrib.youtube",
3241
]
3342

3443
# -- Options for Markdown files ----------------------------------------------
@@ -63,6 +72,7 @@
6372
html_title = "Breeze"
6473
html_logo = "_static/logo.png"
6574
html_favicon = "_static/logo.png"
75+
html_baseurl = "https://sphinx-breeze-theme.readthedocs.io/"
6676

6777
html_theme_options = {
6878
"external_links": [
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# sphinx-contributors
2+
3+
4+
## Example
5+
6+
::::{tab-set}
7+
8+
:::{tab-item} MyST
9+
````md
10+
```{contributors} aksiome/breeze
11+
```
12+
````
13+
:::
14+
15+
:::{tab-item} RST
16+
````rst
17+
.. contributors:: aksiome/breeze
18+
````
19+
:::
20+
21+
::::
22+
23+
```{contributors} aksiome/breeze
24+
```
25+
26+
---
27+
28+
::::{tab-set}
29+
30+
:::{tab-item} MyST
31+
````md
32+
```{contributors} aksiome/breeze
33+
:avatars:
34+
```
35+
````
36+
:::
37+
38+
:::{tab-item} RST
39+
````rst
40+
.. contributors:: aksiome/breeze
41+
:avatars:
42+
````
43+
:::
44+
45+
::::
46+
47+
```{contributors} aksiome/breeze
48+
:avatars:
49+
```
50+
51+
---
52+
53+
::::{tab-set}
54+
55+
:::{tab-item} MyST
56+
````md
57+
```{contributors} aksiome/breeze
58+
:contributions:
59+
```
60+
````
61+
:::
62+
63+
:::{tab-item} RST
64+
````rst
65+
.. contributors:: aksiome/breeze
66+
:contributions:
67+
````
68+
:::
69+
70+
::::
71+
72+
```{contributors} aksiome/breeze
73+
:contributions:
74+
```
75+
76+
---
77+
78+
::::{tab-set}
79+
:::{tab-item} MyST
80+
````md
81+
```{contributors} aksiome/breeze
82+
:avatars:
83+
:contributions:
84+
```
85+
````
86+
:::
87+
88+
:::{tab-item} RST
89+
````rst
90+
.. contributors:: aksiome/breeze
91+
:avatars:
92+
:contributions:
93+
````
94+
:::
95+
96+
::::
97+
98+
```{contributors} aksiome/breeze
99+
:avatars:
100+
:contributions:
101+
```

src/sphinx_breeze_theme/assets/styles/breeze.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@
6060
@import "./extensions/mermaid.css";
6161
@import "./extensions/copybutton.css";
6262
@import "./extensions/togglebutton.css";
63+
@import "./extensions/contributors.css";
6364
@import "./extensions/readthedocs.css";
6465
@import "./extensions/treeview.css";
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
.sphinx-contributors {
3+
margin-block: 1.5rem;
4+
5+
.sphinx-contributors_list__item {
6+
padding: 0;
7+
margin: 0;
8+
}
9+
10+
.sphinx-contributors_contributor__username,
11+
.sphinx-contributors_contributor__contributions {
12+
margin: 0;
13+
}
14+
}
15+
16+
.sphinx-contributors--avatars {
17+
.sphinx-contributors_list {
18+
display: grid;
19+
padding: 0;
20+
gap: 1rem;
21+
justify-content: start;
22+
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
23+
}
24+
25+
.sphinx-contributors_contributor {
26+
align-items: center;
27+
}
28+
29+
.sphinx-contributors_contributor__contributions:before {
30+
content: none;
31+
}
32+
}

0 commit comments

Comments
 (0)