Skip to content

Commit

Permalink
docs: Added chatbot
Browse files Browse the repository at this point in the history
Signed-off-by: Trey <[email protected]>
  • Loading branch information
TreyWW committed May 13, 2024
1 parent d477f14 commit b962d1d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material mkdocs-git-committers-plugin-2
- run: pip install mkdocs-material mkdocs-git-committers-plugin-2 mkdocs-markdownextradata-plugin
- run: mkdocs gh-deploy --force
env:
UMAMI_PAGE_URL: ${{ secrets.UMAMI_PAGE_URL }}
Expand Down
22 changes: 11 additions & 11 deletions docs/overrides/partials/integrations/analytics/custom.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% if config.extra.analytics.property and config.extra.analytics.id %}
<script defer src="{{ config.extra.analytics.property }}" data-website-id="{{ config.extra.analytics.id }}">
</script>
{% if config.extra.analytics.chatbot %}
<script>
console.log("loading chatbot...")
</script>
{{ config.extra.analytics.chatbot }}
{% else %}
<script>
console.log("cannot load chatbot from env")
</script>
{% endif %}
{% endif %}

{% if chatbot.script %}
<script>
console.log("loading chatbot...")
</script>
{{ chatbot.script | safe }}
{% else %}
<script>
console.log("cannot load chatbot from env")
</script>
{% endif %}
7 changes: 6 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,17 @@ nav:
- Changelog:
- changelog/index.md

plugins:
- search
- markdownextradata

extra:
analytics:
provider: custom
property: !ENV UMAMI_PAGE_URL
id: !ENV UMAMI_WEBSITE_ID
chatbot: !ENV CHATBOT_SCRIPT
chatbot:
script: !ENV CHATBOT_SCRIPT
status:
new: Recently added
deprecated: Deprecated
16 changes: 15 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ model-bakery = "1.17.0"
mkdocs = "^1.5.3"
mkdocs-material = "^9.5.15"
mkdocs-git-committers-plugin-2 = "^2.3.0"
mkdocs-markdownextradata-plugin = "^0.2.5"

[tool.poetry.group.mysql]
optional = true
Expand Down

0 comments on commit b962d1d

Please sign in to comment.