Skip to content

docs: add kapa ai bot #8010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/_static/kapa-ai.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#kapa-widget-container {
z-index: 10000 !important;
position: absolute !important;
}

.mantine-Modal-root {
z-index: 10000;
position: absolute;
}
27 changes: 27 additions & 0 deletions docs/_static/kapa-ai.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
document.addEventListener("DOMContentLoaded", function () {
var script = document.createElement("script");
script.src = "https://widget.kapa.ai/kapa-widget.bundle.js";
script.setAttribute("data-website-id", "08e64dae-cea6-4fbc-8207-1c8bd260a14c");
script.setAttribute("data-project-name", "django CMS");
script.setAttribute("data-project-color", "#A1C42C");
script.setAttribute("data-modal-title", "django CMS AI Bot - ask me anything!");

script.setAttribute("data-modal-size", "80%");
script.setAttribute("data-modal-image-hide", "true");
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");

script.setAttribute("data-button-height", "3em");
script.setAttribute("data-button-width", "4em");

// top right placement conflicts with text on some pages as well,
// so I chose the bottom right position as this is a dominant design pattern
// script.setAttribute("data-button-position-top", "10px");
// script.setAttribute("data-button-position-right", "10px");
script.setAttribute("data-button-image", "https://www.django-cms.org/static/img/django-logo.svg");
script.setAttribute("data-button-image-height", "11");
script.setAttribute("data-button-image-width", "60");
script.setAttribute("data-button-text-shadow", "none");

script.async = true;
document.head.appendChild(script);
});
Binary file removed docs/_static/screen1.png
Binary file not shown.
Binary file removed docs/_static/screen2.png
Binary file not shown.
Binary file removed docs/_static/screen3.png
Binary file not shown.
10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# include the following files in the build output
html_js_files = [
"kapa-ai.js",
]

# include the following files in the build output
html_css_files = [
"kapa-ai.css",
]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pyenchant>3
sphinx-autobuild
datetime
coverage
django~=3.2
django~=4.2
git+https://github.com/django-cms/django-cms@release/4.1.x
codespell
pip-tools
Expand Down
155 changes: 87 additions & 68 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,127 +1,134 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=requirements.txt requirements.in
#
alabaster==0.7.12
alabaster==1.0.0
# via sphinx
asgiref==3.5.2
anyio==4.6.0
# via
# starlette
# watchfiles
asgiref==3.8.1
# via django
babel==2.11.0
babel==2.16.0
# via sphinx
beautifulsoup4==4.11.1
beautifulsoup4==4.12.3
# via furo
black==24.3.0
black==24.8.0
# via docstrfmt
build==0.9.0
build==1.2.2
# via pip-tools
certifi==2024.7.4
certifi==2024.8.30
# via requests
charset-normalizer==2.1.1
charset-normalizer==3.3.2
# via requests
click==8.1.3
click==8.1.7
# via
# black
# docstrfmt
# pip-tools
codespell==2.2.2
# uvicorn
codespell==2.3.0
# via -r requirements.in
colorama==0.4.6
# via sphinx-autobuild
coverage==6.5.0
coverage==7.6.1
# via -r requirements.in
datetime==4.7
datetime==5.5
# via -r requirements.in
django==3.2.25
django==4.2.16
# via
# -r requirements.in
# django-classy-tags
# django-cms
# django-formtools
# django-sekizai
# django-treebeard
django-classy-tags==3.0.1
# djangocms-admin-style
django-classy-tags==4.1.0
# via
# django-cms
# django-sekizai
django-cms @ git+https://github.com/django-cms/django-cms@release/4.1.x
# via -r requirements.in
django-formtools==2.4
django-formtools==2.5.1
# via django-cms
django-sekizai==3.0.1
django-sekizai==4.1.0
# via django-cms
django-treebeard==4.5.1
django-treebeard==4.7.1
# via django-cms
djangocms-admin-style==3.2.0
djangocms-admin-style==3.3.1
# via django-cms
docstrfmt==1.4.4
docstrfmt==1.9.0
# via -r requirements.in
docutils==0.19
docutils==0.20.1
# via
# docstrfmt
# sphinx
furo==2022.12.7
exceptiongroup==1.2.2
# via anyio
furo==2024.8.6
# via -r requirements.in
idna==3.7
# via requests
h11==0.14.0
# via uvicorn
idna==3.10
# via
# anyio
# requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.4
# via sphinx
libcst==1.1.0
libcst==1.4.0
# via docstrfmt
livereload==2.6.3
# via sphinx-autobuild
markupsafe==2.1.1
markupsafe==2.1.5
# via
# -r requirements.in
# jinja2
mypy-extensions==1.0.0
# via
# black
# typing-inspect
packaging==24.0
# via black
packaging==24.1
# via
# black
# build
# django-cms
# sphinx
pathspec==0.12.1
# via black
pep517==0.13.0
# via build
pip-tools==6.9.0
pip-tools==7.4.1
# via -r requirements.in
platformdirs==4.1.0
platformdirs==4.3.6
# via
# black
# docstrfmt
pyenchant==3.2.2
# via
# -r requirements.in
# sphinxcontrib-spelling
pygments==2.15.0
pygments==2.18.0
# via
# -r requirements.in
# furo
# sphinx
pytz==2022.6
pyproject-hooks==1.1.0
# via
# babel
# datetime
# django
pyyaml==6.0.1
# build
# pip-tools
pytz==2024.2
# via datetime
pyyaml==6.0.2
# via libcst
requests==2.32.0
requests==2.32.3
# via sphinx
six==1.16.0
# via livereload
sniffio==1.3.1
# via anyio
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.3.2.post1
soupsieve==2.6
# via beautifulsoup4
sphinx==5.3.0
sphinx==8.0.2
# via
# -r requirements.in
# docstrfmt
Expand All @@ -131,47 +138,59 @@ sphinx==5.3.0
# sphinx-copybutton
# sphinxcontrib-spelling
# sphinxext-opengraph
sphinx-autobuild==2021.3.14
sphinx-autobuild==2024.9.19
# via -r requirements.in
sphinx-basic-ng==1.0.0b1
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-copybutton==0.5.1
sphinx-copybutton==0.5.2
# via -r requirements.in
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
sphinxcontrib-spelling==7.6.2
sphinxcontrib-spelling==8.0.0
# via -r requirements.in
sphinxext-opengraph==0.7.5
sphinxext-opengraph==0.9.1
# via -r requirements.in
sqlparse==0.5.0
sqlparse==0.5.1
# via django
starlette==0.38.5
# via sphinx-autobuild
tabulate==0.9.0
# via docstrfmt
toml==0.10.2
# via docstrfmt
tornado==6.4.1
# via livereload
typing-extensions==4.9.0
tomli==2.0.1
# via
# libcst
# typing-inspect
typing-inspect==0.9.0
# via libcst
urllib3==1.26.19
# black
# build
# pip-tools
# sphinx
typing-extensions==4.12.2
# via
# anyio
# asgiref
# black
# uvicorn
urllib3==2.2.3
# via requests
wheel==0.38.3
uvicorn==0.30.6
# via sphinx-autobuild
watchfiles==0.24.0
# via sphinx-autobuild
websockets==13.1
# via sphinx-autobuild
wheel==0.44.0
# via pip-tools
zope-interface==5.5.1
zope-interface==7.0.3
# via datetime

# The following packages are considered to be unsafe in a requirements file:
Expand Down
Loading