当前位置:网站首页>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~
边栏推荐
- 数据中台建设(七):数据资产管理
- SC7A20 (Silan Micro-Accelerometer) Example
- How to get started with YOLO?How to implement your own training set?
- sqlserver cannot connect remotely
- Key Points Estimation and Point Instance
- 785. 快速排序
- Handwritten binary search tree and test
- Chinese version of Pylint inspection rules
- 被 CSDN,伤透了心
- 软考高级系统架构设计师系列之:系统开发基础知识
猜你喜欢
MYSQL Classic Interview Questions
HCIP(15)
Completely closed Chrome updated and in the top right corner of the tip
how to edit the table of contents of an epub ebook
Data Middle Office Construction (VII): Data Asset Management
Solve the problem that Excel opens very slowly after installing MySQL
MYSQL two-phase commit
By CSDN, torn
IDEA修改注释字体
【分层强化学习】HIRO:Data-Efficient Hierarchical Reinforcement Learning
随机推荐
ECCV2022 Workshop | Multi-Object Tracking and Segmentation in Complex Environments
sqlserver无法远程连接
【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
初出茅庐的小李第112篇博客项目笔记之机智云智能浇花器实战(1)-基础Demo实现
HIRO: Hierarchical Reinforcement Learning 】 【 Data - Efficient Hierarchical Reinforcement Learning
Completely closed Chrome updated and in the top right corner of the tip
测试
Summary of MVCC
WebApi 打个Attribute 统一处理异常
IDEA 找不到或无法加载主类 或 Module “*“ must not contain source root “*“ The root already belongs to module “*“
数据中台建设(七):数据资产管理
GDB source code analysis series of articles five: dynamic library delay breakpoint implementation mechanism
北京突然宣布,元宇宙重大消息
YOLO怎么入门?怎么实现自己的训练集?
【入门教程】Rollup模块打包器整合
High dimensional Gaussian distribution basics
元宇宙改变人类工作模式的四种方式
2022 CSP-J1 CSP-S1 Round 1 Preliminary Competition Registration Guide
Key Points Estimation and Point Instance
【分层强化学习】HIRO:Data-Efficient Hierarchical Reinforcement Learning