当前位置:网站首页>Open source project site must-have & communication area function
Open source project site must-have & communication area function
2022-08-01 02:35:00 【Xiaoxin】
写作背景:
The two screenshots below are from two open source projects,Their documentation both contain the same function--聊天室,Developers who follow the project together can exchange questions about the project together,Great for connecting developers together.
Next I go through the navigation site in my self-built【https://vp.it200.cn/】Come to demonstrate how to increase the function of this chat room in your own website.
开源项目【wechaty】: https://wechaty.js.org/

开源项目【micro-app】: https://micro-zoe.github.io/micro-app/docs.html#/

GITTER:
【wechaty】和【micro-app】Both projects were adopted Gitter to achieve the chat room function.Gitter 是一个聊天和网络平台,通过消息、内容和发现,帮助管理、发展和连接社区.And with freedom and unlimited、The easy-to-create feature is especially suitable for communication of open source projects.

create a community:
Through the following two steps, you will get a community of your own,We see that the name of the community is「[email protected]/community」:



Create a new room associated with the open source project under the community:
You can check the last option to automatically initiate one PR 来修改 README,Adding a badge to the room makes it easier for followers of open source projects to discover the chat room.


Get integrated scripts quickly:
脚本生成:
If you try to open the documents of the previous two open source projects,You will find their chat room entrances are in the bottom right corner of the page with the name 【OPEN CHAT】,So do we need it COPY A copy of this style?当然是不需要的,这里推荐使用Sidecar来生成配置.It is very simple to enter your room name to generate,将配置 Copy Go to your open source project site to complete the configuration.

集成到 VuePress2:
默认 vuepress 没有提供 index.html 文件,它是通过在 docs 目录下的 README.md 来生成的,vuepress支持解析 markdown 文件中的 vue 代码片段,So the script we generated above can be passed in Vue 的 onMounted Dynamically added at execution time:
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
((window.gitter = {}).chat = {}).options = {
room: 'IT200-OSpoon/it200.cn'
};
const script=document.createElement('script');
script.src='https://sidecar.gitter.im/dist/sidecar.v1.js';
script.defer = true;
script.async = true;
document.head.appendChild(script);
})
</script>
注:可以看到我们在 onMounted Such as when adding scripts room 做了修改,This is also a problem found when integrating,Although it is displayed at the top of the chat [email protected]符号,But we are practicalroom 是“-”.

结语:
Today, the integration of this chat room function is introduced here,Hurry up and add such a communication space to your open source project~
边栏推荐
- 设备树的树形结构到底是怎样体现的?
- OSD读取SAP CRM One Order应用日志的优化方式
- 【uniCloud】云对象的应用与提升
- 785. 快速排序
- RTL8762DK WDG (six)
- Browser download shortcut to desktop (PWA)
- HIRO: Hierarchical Reinforcement Learning 】 【 Data - Efficient Hierarchical Reinforcement Learning
- SC7A20 (Silan Micro-Accelerometer) Example
- Solve the problem that Excel opens very slowly after installing MySQL
- ROS2 series of knowledge (4): understand the concept of [service]
猜你喜欢
解决安装MySQL后,Excel打开很慢的问题
YOLO怎么入门?怎么实现自己的训练集?
HCIP(14)
Daily practice of LeetCode - Circular linked list question (interview four consecutive questions)
Google Earth Engine - Error resolution of Error: Image.clipToBoundsAndScale, argument 'input': Invalid type
【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
LeetCode每日一练 —— 环形链表问题(面试四连问)
The fledgling Xiao Li's 112th blog project notes: Wisdom cloud intelligent flower watering device actual combat (1) - basic Demo implementation
IDEA modifies the annotation font
How to download the Keil package
随机推荐
Chain programming, packages, access
Rasa 3.x Learning Series - Using Lookup Tables to Improve Entity Extraction
Soft Exam Senior System Architect Series: Basic Knowledge of Information Systems
WAASAP WebClient UI页面标签的决定逻辑介绍
Modify Postman installation path
LeetCode每日一练 —— 环形链表问题(面试四连问)
Talking about hardware device computing storage and data interaction
指定set 'execution.savepoint.path'后,重启flinksql报这个错是啥
By Value or By Reference
Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file
Game Security 03: A Simple Explanation of Buffer Overflow Attacks
MYSQL transactions
纽约大学等 | TM-Vec:用于快速同源检测和比对的模版建模向量
RTL8762DK RTC (5)
win10 固定本机IP
When opening a MYSQL table, some can display editing, some do not, how to set.
数据中台建设(七):数据资产管理
787. 归并排序
Introduction to machine learning how to?
SC7A20 (Silan Micro-Accelerometer) Example