Skip to content

Commit

Permalink
docs: add github button
Browse files Browse the repository at this point in the history
  • Loading branch information
hughfenghen committed Jan 21, 2024
1 parent 850f377 commit c48d52d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
20 changes: 20 additions & 0 deletions doc-site/.dumi/theme/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

export default function (api) {
// github-button
api.addHTMLHeadScripts(() => `
var timer = setInterval(() => {
console.log(111)
if (performance.now() > 10000) {
clearInterval(timer)
return
}
if (document.querySelector('.github-button') == null) return
clearInterval(timer)
var s = document.createElement('script')
s.src = 'https://buttons.github.io/buttons.js'
document.body.appendChild(s)
}, 100);
`)
}
2 changes: 1 addition & 1 deletion doc-site/.dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
socialLinks: {
github: 'https://github.com/hughfenghen/WebAV'
},
footer: '欢迎 Star <a href="https://github.com/hughfenghen/WebAV">WebAV</a> 项目,碰到问题请去 <a href="https://github.com/hughfenghen/WebAV/issues/">WebAV Issues</a> 中反馈'
footer: '碰到问题请去 <a href="https://github.com/hughfenghen/WebAV/issues/">WebAV Issues</a> 中反馈 <br/> <a class="github-button" href="https://github.com/hughfenghen/WebAV" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star hughfenghen/WebAV on GitHub">Star</a>'
},
...(process.env.NODE_ENV === 'development' ? {
base: '/',
Expand Down
7 changes: 0 additions & 7 deletions doc-site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@ $ yarn start
# build docs
$ yarn run build
```

## TODO

- AVCanvs DOM 位置错误
- DEMO 兼容性提醒组件
- Guide 介绍,概念、核心 API,贡献
- google analytics
2 changes: 1 addition & 1 deletion doc-site/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: WebAV Doc Site
hero:
title: WebAV
description: WebAV Doc Site
description: '<strong>WebAV Doc Site</strong>'
actions:
- text: Guide
link: /guide/
Expand Down

0 comments on commit c48d52d

Please sign in to comment.