Skip to content

Commit 9517f84

Browse files
authored
Merge pull request #1 from wechaty/master
update
2 parents ba253c3 + 84e79d1 commit 9517f84

File tree

618 files changed

+28752
-2682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

618 files changed

+28752
-2682
lines changed

.file-name-linter.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
"assets": [
99
"^assets/",
1010
"/[0-9\\-a-z]+\\.",
11-
"\\.(jpg|jpeg|png|gif|zip|pdf)$"
11+
"\\.(jpg|jpeg|png|gif|webp|zip|pdf|docx|doc|txt)$"
1212
]
1313
},
1414
"ignore": [
15-
"assets/js/viewer-js",
16-
"assets/js/sidecar-gitter.js",
15+
"assets/js",
16+
"assets/css",
17+
"assets/images",
18+
"assets/developers/wechaty",
1719
"tests/fixtures"
1820
]
1921
}

.github/CODEOWNERS

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# https://help.github.com/articles/about-codeowners/
33
#
44

5-
/docs/_posts/ @lijiarui
5+
* @lijiarui
6+
* @wechaty/contributors

.github/PULL_REQUEST_TEMPLATE.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ e.g.
77

88
``` md
99
---
10-
title: "'Score Your Face Photo' a ML&Wechaty practice"
11-
date: 2017-09-18 09:00 +0800
12-
author: huyingxi
13-
---
14-
> Author: [@huyingxi](https://github.com/huyingxi/wechaty_selfie) enjoying ML&Wechaty at BUPT
10+
title: "'Score Your Face Photo' a ML&Wechaty practice"
11+
author: huyingxi
12+
image: /assets/2020/your-blog-title/teaser.jpg
13+
---
14+
15+
YOUR_FIRST_SENTENCE_SHOULD_BE_A_SUMMARY_FOR_YOUR_POST
16+
1517
```
1618

1719
- [ ] Keep all filenames & url as lowercase, and use `-` to connect words instead of space. e.g. `2017-10-06-wechat-pc-impactor` instead of `2017-10-06-WeChat PC Impactor`,
18-
- [ ] Embed the photo & video before publishing, save all external file to the blog `/download/2018` directory.
19-
- [ ] Add `<!--more-->` section to just show the abstract in blog homepage.
20+
- [ ] Embed the photo & video before publishing, save all external file to the blog `/assets/2020` directory.
2021
- [ ] Add teaser image for the blog
21-
- [ ] Add your self as an author to the author data file at <https://github.com/wechaty/wechaty.github.io/blob/master/_data/authors.yml> with your GitHub username. And please also remember to reference yourself with the Github username in your blog post, so that we can have nice author information besides your blog after we published it!
22+
- [ ] Add your self as an author to the author data file at <https://github.com/wechaty/wechaty.js.org/blob/master/_developers/YOUR_GITHUB_USERNAME.yml> with your GitHub username. And please also remember to reference yourself with the Github username in your blog post, so that we can have nice author information besides your blog after we published it!
2223

23-
[See more](https://github.com/wechaty/wechaty.github.io#contribute-guideline)
24+
[See more](https://github.com/wechaty/wechaty.js.org#contribute-guideline)

.github/workflows/gh-pages.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: GitHub Pages CI
5+
6+
on:
7+
- push
8+
- pull_request
9+
10+
jobs:
11+
test:
12+
name: Test & Build
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
node: [12]
17+
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- name: Install Dependencies
26+
run: |
27+
npm install
28+
sudo make install
29+
- name: Test
30+
run: npm test
31+
- name: Build
32+
run: npm run build
33+
34+
deploy:
35+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
36+
name: Deploy GitHub Pages
37+
needs: [test]
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
node-version: [ 12.x ]
42+
steps:
43+
- uses: actions/checkout@v2
44+
- name: Use Node.js ${{ matrix.node-version }}
45+
uses: actions/setup-node@v1
46+
with:
47+
node-version: ${{ matrix.node-version }}
48+
- name: Config Git
49+
run: |
50+
git config --global user.name 'Huan @ GitHub Action'
51+
git config --global user.email 'zixia@zixia.net'
52+
- name: Create orphan branch for gh-pages
53+
run: |
54+
git checkout --orphan gh-pages
55+
git reset --hard
56+
git commit --allow-empty -m "Orphan init"
57+
git checkout master
58+
- name: Install dependencies
59+
run: |
60+
npm install
61+
sudo make install
62+
- name: Bind git worktree with new-gh-pages folder and gh-pages branch
63+
run: |
64+
rm -fr new-gh-pages
65+
git worktree add new-gh-pages gh-pages
66+
- name: Build and copy all homepage files to new-gh-pages/ together
67+
run: |
68+
bash -x ./scripts/build.sh new-gh-pages
69+
- name: Deploy new-gh-pages
70+
run: |
71+
pushd new-gh-pages
72+
git add --all
73+
git commit -m "$(jq -r .version ../package.json)"
74+
git push -f origin gh-pages
75+
popd
76+
- name: Unbind new-gh-pages folder from gh-pages branch
77+
run: |
78+
git worktree remove new-gh-pages
79+
git branch -D gh-pages
80+
rm -fr new-gh-pages

.github/workflows/npm.yml

-25
This file was deleted.

.gitignore

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
_site
1+
_site/
2+
.jekyll-cache/
3+
node_modules/
4+
t/
5+
t.*
6+
27
.sass-cache
38
.jekyll-metadata
49
Gemfile.lock
510
.DS_Store
611
.*.swp
7-
node_modules/
812
package-lock.json
913

1014
.idea
15+
.DS_Store
16+
17+
new-gh-pages/

.markdownlint.json

+3-12
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
"no-trailing-punctuation": {
44
"punctuation": ".,;:!"
55
},
6+
"MD002": { "level": 2 },
67
"MD013": false,
7-
"MD033": {
8-
"allowed_elements": [
9-
"cite",
10-
"code",
11-
"del",
12-
"dl",
13-
"dt",
14-
"dd",
15-
"script",
16-
"var"
17-
]
18-
},
8+
"MD024": false,
9+
"MD033": false,
1910
"first-line-h1": false,
2011
"no-hard-tabs": true,
2112
"no-trailing-spaces": {

.vscode/settings.json

+20
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,45 @@
7171
"typescript",
7272
],
7373
"cSpell.words": [
74+
"Algolia",
7475
"Bojie",
7576
"Chaofei",
7677
"Chunhong",
7778
"DIAO",
79+
"Giftie",
7880
"Juzi",
7981
"Mcat",
82+
"Padchat",
8083
"Roadmap",
8184
"Silkage",
8285
"Toolset",
86+
"Weibo",
8387
"Xiaoya",
8488
"Xiaoyu",
8589
"Zhengxin",
8690
"allowfullscreen",
91+
"apos",
92+
"botie",
93+
"cheatsheet",
94+
"clsx",
8795
"dchaofei",
8896
"diaozxin",
8997
"dingdayu",
98+
"disqus",
99+
"endunless",
100+
"favicon",
101+
"gitter",
102+
"itchat",
90103
"jcai",
104+
"mailchimp",
105+
"osschat",
106+
"popd",
107+
"pushd",
91108
"redmaple",
109+
"stylelint",
110+
"tofront",
92111
"windmemory",
112+
"worktree",
93113
"yamllint"
94114
],
95115
}

404.html

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
layout: default
3+
---
4+
5+
<style type="text/css" media="screen">
6+
.container {
7+
margin: 10px auto;
8+
max-width: 600px;
9+
text-align: center;
10+
}
11+
h1 {
12+
margin: 30px 0;
13+
font-size: 4em;
14+
line-height: 1;
15+
letter-spacing: -1px;
16+
}
17+
</style>
18+
19+
<div class="container">
20+
<h1>404</h1>
21+
22+
<p><strong>Page not found :(</strong></p>
23+
<p>
24+
Sorry, but the page you were trying to view does not exist --- perhaps you can try searching for it below.
25+
</p>
26+
</div>
27+
28+
<script>
29+
var GOOG_FIXURL_LANG = 'en';
30+
var GOOG_FIXURL_SITE = '{{ site.url }}'
31+
</script>
32+
<script src="https://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js">
33+
</script>
34+

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wechaty.js.org

Gemfile

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
source "https://rubygems.org"
2+
ruby RUBY_VERSION
23

3-
gem "github-pages", group: :jekyll_plugins
4-
5-
gem "tzinfo-data"
6-
gem "wdm", "~> 0.1.0" if Gem.win_platform?
4+
# Hello! This is where you manage which Jekyll version is used to run.
5+
# When you want to use a different version, change it below, save the
6+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
7+
#
8+
# bundle exec jekyll serve
9+
#
710

811
# If you have any plugins, put them here!
12+
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
913
group :jekyll_plugins do
10-
gem "jekyll-paginate"
11-
gem "jekyll-sitemap"
12-
gem "jekyll-gist"
13-
gem "jekyll-feed"
14-
gem "jemoji"
15-
gem "jekyll-include-cache"
16-
gem "jekyll-algolia"
17-
end
14+
gem 'jekyll-feed'
15+
gem 'jekyll-sitemap'
16+
gem 'jekyll-paginate'
17+
gem 'jekyll-seo-tag'
18+
end

LICENSE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# LICENSE
1+
## LICENSE
22

33
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
44

55
<https://creativecommons.org/licenses/by-sa/4.0/>
66

7-
Copyright (c) 2016-now, Huan LI (李卓桓) <zixia@zixia.net> <https://github.com/huan/>
7+
Copyright (c) 2016-now, Wechaty Contributors <https://github.com/wechaty>
88

99
This license lets others remix, tweak, and build upon your work even for commercial purposes, as long as they credit you and license their new creations under the identical terms. This license is often compared to “copyleft” free and open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use. This is the license used by Wikipedia, and is recommended for materials that would benefit from incorporating content from Wikipedia and similarly licensed projects.

Makefile

+20-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,33 @@ all: serve
66

77
.PHONY: install
88
install:
9-
(cd .. && bundle install && bundle update)
9+
gem install bundler
10+
bundle install && bundle update
1011

1112
.PHONY: test
1213
test:
1314
npm run test
1415

16+
.PHONY: code
17+
code:
18+
code .
19+
20+
.PHONY: clean
21+
clean:
22+
rm -fr _site
23+
24+
.PHONY: build
25+
build:
26+
bundle exec jekyll build
27+
1528
.PHONY: serve
1629
serve:
17-
(cd .. && bundle exec jekyll serve --incremental)
30+
bundle exec jekyll serve --incremental
31+
32+
.PHONY: docker
33+
docker:
34+
docker-compose -f config/docker-compose.yml up
1835

1936
.PHONY: fit-image
2037
fit-image:
21-
./scripts/fit-image.sh ../assets/
38+
./scripts/fit-image.sh assets/

0 commit comments

Comments
 (0)