Skip to content

Commit 43ea73c

Browse files
macoloMario ColomboGithub Release ActionfsbraunVinit Kumar
authored
docs: add kapa ai bot (#8010)
* add kapa ai bot * Update doc requirements and re-compile requirements.txt --------- Co-authored-by: Mario Colombo <mario@what.digital> Co-authored-by: Github Release Action <info@django-cms.org> Co-authored-by: Fabian Braun <fsbraun@gmx.de> Co-authored-by: Vinit Kumar <vinit.kumar@kidskonnect.nl>
1 parent 4e1fb8d commit 43ea73c

File tree

8 files changed

+134
-69
lines changed

8 files changed

+134
-69
lines changed

docs/_static/kapa-ai.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#kapa-widget-container {
2+
z-index: 10000 !important;
3+
position: absolute !important;
4+
}
5+
6+
.mantine-Modal-root {
7+
z-index: 10000;
8+
position: absolute;
9+
}

docs/_static/kapa-ai.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
document.addEventListener("DOMContentLoaded", function () {
2+
var script = document.createElement("script");
3+
script.src = "https://widget.kapa.ai/kapa-widget.bundle.js";
4+
script.setAttribute("data-website-id", "08e64dae-cea6-4fbc-8207-1c8bd260a14c");
5+
script.setAttribute("data-project-name", "django CMS");
6+
script.setAttribute("data-project-color", "#A1C42C");
7+
script.setAttribute("data-modal-title", "django CMS AI Bot - ask me anything!");
8+
9+
script.setAttribute("data-modal-size", "80%");
10+
script.setAttribute("data-modal-image-hide", "true");
11+
script.setAttribute("data-modal-disclaimer", "This is a custom LLM for django CMS trained on publicly available data such as django CMS' technical documentation. Sponsored by kapa.ai");
12+
13+
script.setAttribute("data-button-height", "3em");
14+
script.setAttribute("data-button-width", "4em");
15+
16+
// top right placement conflicts with text on some pages as well,
17+
// so I chose the bottom right position as this is a dominant design pattern
18+
// script.setAttribute("data-button-position-top", "10px");
19+
// script.setAttribute("data-button-position-right", "10px");
20+
script.setAttribute("data-button-image", "https://www.django-cms.org/static/img/django-logo.svg");
21+
script.setAttribute("data-button-image-height", "11");
22+
script.setAttribute("data-button-image-width", "60");
23+
script.setAttribute("data-button-text-shadow", "none");
24+
25+
script.async = true;
26+
document.head.appendChild(script);
27+
});

docs/_static/screen1.png

-95.4 KB
Binary file not shown.

docs/_static/screen2.png

-76.9 KB
Binary file not shown.

docs/_static/screen3.png

-67 KB
Binary file not shown.

docs/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,16 @@
191191
# so a file named "default.css" will overwrite the builtin "default.css".
192192
html_static_path = ['_static']
193193

194+
# include the following files in the build output
195+
html_js_files = [
196+
"kapa-ai.js",
197+
]
198+
199+
# include the following files in the build output
200+
html_css_files = [
201+
"kapa-ai.css",
202+
]
203+
194204
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
195205
# using the given strftime format.
196206
#html_last_updated_fmt = '%b %d, %Y'

docs/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pyenchant>3
99
sphinx-autobuild
1010
datetime
1111
coverage
12-
django~=3.2
12+
django~=4.2
1313
git+https://github.com/django-cms/django-cms@release/4.1.x
1414
codespell
1515
pip-tools

docs/requirements.txt

Lines changed: 87 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,134 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.11
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
55
# pip-compile --output-file=requirements.txt requirements.in
66
#
7-
alabaster==0.7.12
7+
alabaster==1.0.0
88
# via sphinx
9-
asgiref==3.5.2
9+
anyio==4.6.0
10+
# via
11+
# starlette
12+
# watchfiles
13+
asgiref==3.8.1
1014
# via django
11-
babel==2.11.0
15+
babel==2.16.0
1216
# via sphinx
13-
beautifulsoup4==4.11.1
17+
beautifulsoup4==4.12.3
1418
# via furo
15-
black==24.3.0
19+
black==24.8.0
1620
# via docstrfmt
17-
build==0.9.0
21+
build==1.2.2
1822
# via pip-tools
19-
certifi==2024.7.4
23+
certifi==2024.8.30
2024
# via requests
21-
charset-normalizer==2.1.1
25+
charset-normalizer==3.3.2
2226
# via requests
23-
click==8.1.3
27+
click==8.1.7
2428
# via
2529
# black
2630
# docstrfmt
2731
# pip-tools
28-
codespell==2.2.2
32+
# uvicorn
33+
codespell==2.3.0
2934
# via -r requirements.in
3035
colorama==0.4.6
3136
# via sphinx-autobuild
32-
coverage==6.5.0
37+
coverage==7.6.1
3338
# via -r requirements.in
34-
datetime==4.7
39+
datetime==5.5
3540
# via -r requirements.in
36-
django==3.2.25
41+
django==4.2.16
3742
# via
3843
# -r requirements.in
3944
# django-classy-tags
4045
# django-cms
4146
# django-formtools
4247
# django-sekizai
4348
# django-treebeard
44-
django-classy-tags==3.0.1
49+
# djangocms-admin-style
50+
django-classy-tags==4.1.0
4551
# via
4652
# django-cms
4753
# django-sekizai
4854
django-cms @ git+https://github.com/django-cms/django-cms@release/4.1.x
4955
# via -r requirements.in
50-
django-formtools==2.4
56+
django-formtools==2.5.1
5157
# via django-cms
52-
django-sekizai==3.0.1
58+
django-sekizai==4.1.0
5359
# via django-cms
54-
django-treebeard==4.5.1
60+
django-treebeard==4.7.1
5561
# via django-cms
56-
djangocms-admin-style==3.2.0
62+
djangocms-admin-style==3.3.1
5763
# via django-cms
58-
docstrfmt==1.4.4
64+
docstrfmt==1.9.0
5965
# via -r requirements.in
60-
docutils==0.19
66+
docutils==0.20.1
6167
# via
6268
# docstrfmt
6369
# sphinx
64-
furo==2022.12.7
70+
exceptiongroup==1.2.2
71+
# via anyio
72+
furo==2024.8.6
6573
# via -r requirements.in
66-
idna==3.7
67-
# via requests
74+
h11==0.14.0
75+
# via uvicorn
76+
idna==3.10
77+
# via
78+
# anyio
79+
# requests
6880
imagesize==1.4.1
6981
# via sphinx
7082
jinja2==3.1.4
7183
# via sphinx
72-
libcst==1.1.0
84+
libcst==1.4.0
7385
# via docstrfmt
74-
livereload==2.6.3
75-
# via sphinx-autobuild
76-
markupsafe==2.1.1
86+
markupsafe==2.1.5
7787
# via
7888
# -r requirements.in
7989
# jinja2
8090
mypy-extensions==1.0.0
81-
# via
82-
# black
83-
# typing-inspect
84-
packaging==24.0
91+
# via black
92+
packaging==24.1
8593
# via
8694
# black
8795
# build
8896
# django-cms
8997
# sphinx
9098
pathspec==0.12.1
9199
# via black
92-
pep517==0.13.0
93-
# via build
94-
pip-tools==6.9.0
100+
pip-tools==7.4.1
95101
# via -r requirements.in
96-
platformdirs==4.1.0
102+
platformdirs==4.3.6
97103
# via
98104
# black
99105
# docstrfmt
100106
pyenchant==3.2.2
101107
# via
102108
# -r requirements.in
103109
# sphinxcontrib-spelling
104-
pygments==2.15.0
110+
pygments==2.18.0
105111
# via
106112
# -r requirements.in
107113
# furo
108114
# sphinx
109-
pytz==2022.6
115+
pyproject-hooks==1.1.0
110116
# via
111-
# babel
112-
# datetime
113-
# django
114-
pyyaml==6.0.1
117+
# build
118+
# pip-tools
119+
pytz==2024.2
120+
# via datetime
121+
pyyaml==6.0.2
115122
# via libcst
116-
requests==2.32.0
123+
requests==2.32.3
117124
# via sphinx
118-
six==1.16.0
119-
# via livereload
125+
sniffio==1.3.1
126+
# via anyio
120127
snowballstemmer==2.2.0
121128
# via sphinx
122-
soupsieve==2.3.2.post1
129+
soupsieve==2.6
123130
# via beautifulsoup4
124-
sphinx==5.3.0
131+
sphinx==8.0.2
125132
# via
126133
# -r requirements.in
127134
# docstrfmt
@@ -131,47 +138,59 @@ sphinx==5.3.0
131138
# sphinx-copybutton
132139
# sphinxcontrib-spelling
133140
# sphinxext-opengraph
134-
sphinx-autobuild==2021.3.14
141+
sphinx-autobuild==2024.9.19
135142
# via -r requirements.in
136-
sphinx-basic-ng==1.0.0b1
143+
sphinx-basic-ng==1.0.0b2
137144
# via furo
138-
sphinx-copybutton==0.5.1
145+
sphinx-copybutton==0.5.2
139146
# via -r requirements.in
140-
sphinxcontrib-applehelp==1.0.2
147+
sphinxcontrib-applehelp==2.0.0
141148
# via sphinx
142-
sphinxcontrib-devhelp==1.0.2
149+
sphinxcontrib-devhelp==2.0.0
143150
# via sphinx
144-
sphinxcontrib-htmlhelp==2.0.0
151+
sphinxcontrib-htmlhelp==2.1.0
145152
# via sphinx
146153
sphinxcontrib-jsmath==1.0.1
147154
# via sphinx
148-
sphinxcontrib-qthelp==1.0.3
155+
sphinxcontrib-qthelp==2.0.0
149156
# via sphinx
150-
sphinxcontrib-serializinghtml==1.1.5
157+
sphinxcontrib-serializinghtml==2.0.0
151158
# via sphinx
152-
sphinxcontrib-spelling==7.6.2
159+
sphinxcontrib-spelling==8.0.0
153160
# via -r requirements.in
154-
sphinxext-opengraph==0.7.5
161+
sphinxext-opengraph==0.9.1
155162
# via -r requirements.in
156-
sqlparse==0.5.0
163+
sqlparse==0.5.1
157164
# via django
165+
starlette==0.38.5
166+
# via sphinx-autobuild
158167
tabulate==0.9.0
159168
# via docstrfmt
160169
toml==0.10.2
161170
# via docstrfmt
162-
tornado==6.4.1
163-
# via livereload
164-
typing-extensions==4.9.0
171+
tomli==2.0.1
165172
# via
166-
# libcst
167-
# typing-inspect
168-
typing-inspect==0.9.0
169-
# via libcst
170-
urllib3==1.26.19
173+
# black
174+
# build
175+
# pip-tools
176+
# sphinx
177+
typing-extensions==4.12.2
178+
# via
179+
# anyio
180+
# asgiref
181+
# black
182+
# uvicorn
183+
urllib3==2.2.3
171184
# via requests
172-
wheel==0.38.3
185+
uvicorn==0.30.6
186+
# via sphinx-autobuild
187+
watchfiles==0.24.0
188+
# via sphinx-autobuild
189+
websockets==13.1
190+
# via sphinx-autobuild
191+
wheel==0.44.0
173192
# via pip-tools
174-
zope-interface==5.5.1
193+
zope-interface==7.0.3
175194
# via datetime
176195

177196
# The following packages are considered to be unsafe in a requirements file:

0 commit comments

Comments
 (0)