Skip to content
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

Add chat bots. #2148

Closed
Amber1990Zhang opened this issue Jul 10, 2020 · 4 comments
Closed

Add chat bots. #2148

Amber1990Zhang opened this issue Jul 10, 2020 · 4 comments

Comments

@Amber1990Zhang
Copy link

Amber1990Zhang commented Jul 10, 2020

I use the material theme.

Description

I want to add a chat button for my doc site so that people can ask questions and get response more quickly. I want to use Comm100. I need somewhere to add the following code:

<!--Begin Comm100 Live Chat Code-->
<div id="comm100-button-f87c9787-cf25-4f2b-b92a-b14da3805db6"></div>
<script type="text/javascript">
  var Comm100API=Comm100API||{};(function(t){function e(e){var a=document.createElement("script"),c=document.getElementsByTagName("script")[0];a.type="text/javascript",a.async=!0,a.src=e+t.site_id,c.parentNode.insertBefore(a,c)}t.chat_buttons=t.chat_buttons||[],t.chat_buttons.push({code_plan:"f87c9787-cf25-4f2b-b92a-b14da3805db6",div_id:"comm100-button-f87c9787-cf25-4f2b-b92a-b14da3805db6"}),t.site_id=40000004,t.main_code_plan="f87c9787-cf25-4f2b-b92a-b14da3805db6",e("https://vue.comm100.com/livechat.ashx?siteId="),setTimeout(function(){t.loaded||e("https://standby.comm100vue.com/livechat.ashx?siteId=")},5e3)})(Comm100API||{})
</script>
<!--End Comm100 Live Chat Code-->

Does mkdocs support adding page elements and custom events?

@martinbira
Copy link

This is not the correct place for Material related questions. The answer however lies in the following extension: https://facelessuser.github.io/pymdown-extensions/extensions/snippets/

@Amber1990Zhang
Copy link
Author

Amber1990Zhang commented Jul 10, 2020

This is not the correct place for Material related questions. The answer however lies in the following extension: https://facelessuser.github.io/pymdown-extensions/extensions/snippets/

thanks for your reply. But are we talking about the same issue?
Am I supposed to ask a question on StackOverflow?

@martinbira
Copy link

Well, the Material issue board os a better idea :)

@facelessuser
Copy link
Contributor

Yeah, the snippets extension could be used or template overrides depending on where you want the button to appear. This is kind of a custom thing though that you'd have to research some. I'm not sure the maintainers of mkdocs should be expected to offer consultation for custom solutions.

Stackoverflow or general message boards may be a more appropriate place to ask this, but I think from the two suggested solutions here, with minimal research, you should be able to pull off what you need.

@waylan waylan closed this as completed Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants