forked from wechaty/jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add two folders * merge README * clean docs menu * merge package.json * add github pages ci * fix linting for md * make the markdown linter happy! * 0.5.1 * fix link order * wip * 0.5.2 * add build * 0.5.3 * tune script * use docusaurus index, and rename news -> community, and old index -> news * change the blog post url to include the year/month/date * use "news" tag for important ones from all posts * clean * 0.5.4 * support deploy both jekyll & docusaurus * 0.5.5
- Loading branch information
Showing
172 changed files
with
5,773 additions
and
849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: NPM | ||
name: Editor CI | ||
|
||
on: [push, pull_request] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: GitHub Pages CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [ 12.x ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Config Git | ||
run: | | ||
git config --global user.name 'Huan @ GitHub Action' | ||
git config --global user.email '[email protected]' | ||
- name: Create orphan branch for gh-pages | ||
run: | | ||
git checkout --orphan gh-pages | ||
git reset --hard | ||
git commit --allow-empty -m "Orphan init" | ||
git checkout master | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build Homepage | ||
run: | | ||
bash -x ./scripts/build.sh | ||
- name: Bind git worktree with new-gh-pages folder and gh-pages branch | ||
run: | | ||
rm -fr new-gh-pages | ||
git worktree add new-gh-pages gh-pages | ||
- name: Copy files | ||
run: | | ||
mv docusaurus/build/* new-gh-pages/ | ||
mv _sites/* new-gh-pages/ | ||
- name: Deploy new-gh-pages | ||
run: | | ||
pushd new-gh-pages | ||
git add --all | ||
git commit -m "$(jq -r .version ../package.json)" | ||
git push -f origin gh-pages | ||
popd | ||
- name: Unbind new-gh-pages folder from gh-pages branch | ||
run: | | ||
git worktree remove new-gh-pages | ||
git branch -D gh-pages | ||
rm -fr new-gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ package-lock.json | |
|
||
.idea | ||
.DS_Store | ||
|
||
new-gh-pages/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# LICENSE | ||
## LICENSE | ||
|
||
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ code: | |
|
||
.PHONY: clean | ||
clean: | ||
rm -fr docs/_site | ||
rm -fr _site | ||
|
||
.PHONY: build | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
# wechaty.github.io | ||
## wechaty.js.org | ||
|
||
[](https://github.com/Wechaty/wechaty) | ||
[](https://github.com/wechaty/wechaty.github.io/actions?query=workflow%3ANPM) | ||
[](https://github.com/wechaty/wechaty.js.org/actions?query=workflow%3A%22GitHub+Pages+CI%22) | ||
|
||
[Wechaty Official Homepage](https://wechaty.github.io) | ||
 | ||
|
||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/0) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/1) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/2) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/3) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/4) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/5) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/6) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/7) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/0) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/1) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/2) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/3) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/4) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/5) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/6) | ||
[](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/7) | ||
|
||
## HOW TO POST BLOG | ||
[Contributors List](https://github.com/wechaty/wechaty/wiki/Contributors) | ||
|
||
Wechaty Official Homepage: <https://wechaty.js.org> | ||
|
||
## How to post a blog | ||
|
||
1. Fork it | ||
1. [Syncing your fork](https://help.github.com/cn/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) | ||
|
@@ -29,7 +33,7 @@ | |
|
||
Done!~ | ||
|
||
## CONTRIBUTE GUIDELINE | ||
## Contribution Guidelines | ||
|
||
### 1. Add Blog Header | ||
|
||
|
@@ -39,24 +43,21 @@ Example as follows: | |
|
||
```yaml | ||
--- | ||
|
||
title: "'Score Your Face Photo' a ML&Wechaty practice" | ||
date: 2017-09-18 09:00 +0800 | ||
author: your_github_username | ||
header: | ||
teaser: your_teaser_image_path | ||
title: "'Score Your Face Photo' a ML&Wechaty practice" | ||
author: your_github_username | ||
image: your_teaser_image_path | ||
--- | ||
|
||
> Author: [@your_github_username](https://github.com/your_github_username) your one-line bio at here | ||
<One line abstract for your blog post> | ||
|
||
> Code: [@yourcode](your_code_path) | ||
<Your beautiful blog post contents...> | ||
``` | ||
|
||
### 2. Writing Style | ||
|
||
* 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` | ||
* Find a good image for the blog to make it more beautiful. | ||
* Embed the photo & video before publishing, save all external file to the blog `/assets/${current_year}` directory. | ||
- 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` | ||
- Find a good image for the blog to make it more beautiful. | ||
- Embed the photo & video before publishing, save all external file to the blog `/assets/${current_year}` directory. | ||
|
||
see more: [Do not include Date in URL](https://github.com/wechaty/wechaty.github.io/issues/79) | ||
|
||
|
@@ -80,10 +81,10 @@ Example | |
|
||
The titles in markdown files will be added an anchor automatically, you can use that to add your own anchor links. And here is some of the rules how the blog generate the anchor: | ||
|
||
* convert the title directly to anchor | ||
* spaces will be replaced by dash `-` | ||
* `/`, `&`, `?` and `.` will be eliminated | ||
* Chinese character will be kept in the anchor | ||
- convert the title directly to anchor | ||
- spaces will be replaced by dash `-` | ||
- `/`, `&`, `?` and `.` will be eliminated | ||
- Chinese character will be kept in the anchor | ||
|
||
#### Example | ||
|
||
|
@@ -125,25 +126,82 @@ npm install | |
npm test | ||
``` | ||
|
||
## OTHERS | ||
### Docusaurus | ||
|
||
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. | ||
|
||
1. Installation: `yarn` | ||
1. Local Development: `yarn start` | ||
> This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server. | ||
1. Build: `yarn build` | ||
> This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
1. Deployment `GIT_USER=<Your GitHub username> && USE_SSH=true yarn deploy` | ||
> If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. | ||
## Directory Structure | ||
|
||
We use different branch to support multi language: | ||
|
||
- master: English version | ||
- zh: Chinese version | ||
|
||
If you want to contribute to English version code, you can pull request to `master` branch. | ||
|
||
If you want to contribute to Chinese version code, you can pull request to `zh` branch. | ||
|
||
## Welcome to contribute | ||
|
||
### Why contribute? | ||
|
||
As an open source product, Wechaty thrives from contributions of community members. Whatever your skill set is, there is a lot you can do to help us make Wechaty better! So start forking! | ||
|
||
At the same time, we also meet up offline all over the world, here is some activities: | ||
|
||
- [Wechaty Contributor Dinner](https://wechaty.github.io/2017/04/26/wechaty-meeting/) | ||
- [The memorabilia of The First Chatie WWDC Party](https://wechaty.github.io/2017/06/06/the-first-chatie-wwdc-party/) | ||
- [Shanghai WWDC - WeChaty Worldwide Developers Conference](https://wechaty.github.io/2017/08/28/wechaty-shanghai-meetup/) | ||
- [Wechaty Contributor Dinner with Data Girls](https://wechaty.github.io/2018/01/14/wechaty-contributor-dinner-data-girl/) | ||
- [Wechaty Country Wide Developer Conference](https://wechaty.github.io/2018/09/15/country-wide-developer-conference/) | ||
- ..... | ||
|
||
### How to contribute docs? | ||
|
||
- Fork this repo | ||
- Checkout to the right branch | ||
- English version: `git checkout master` | ||
- Chinese version: `git checkout zh` | ||
- Create your doc branch: `git checkout -b doc` | ||
- Write this doc in markdown | ||
- Commit your changes `git commit -am 'doc comment'` | ||
- Push to the branch | ||
- Create new Pull Request to the corresponding branch | ||
- English version: pull request to master branch | ||
- Chinese version: pull request to zh branch | ||
|
||
### More Contribution | ||
|
||
See more in: [Welcome to contribute](https://wechaty.github.io/docs/welcome-to-contribute) | ||
|
||
Contact [email protected] to learn more | ||
|
||
## Markdown Linting Rules | ||
|
||
[Markdown Linting Rules Documents](https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md) | ||
|
||
### JEKYLL THEME | ||
## Resources | ||
|
||
minima: <https://github.com/jekyll/minima> | ||
- [Migrating from gitbook to docsify.js](https://timdams.com/2019/05/02/migrating-from-gitbook-to-docsify-js/) | ||
- [Integrating GitBook with JSDoc to Document Your Open Source Project](https://gist.github.com/KevinAst/7e12648245ff2a8e9c1557135014b933) | ||
- [F8 2019: Using Docusaurus to Create Open Source Websites](https://www.youtube.com/watch?v=QcGJsf6mgZE) | ||
- [Jekyll Theme minima](https://github.com/jekyll/minima) | ||
|
||
## Maintainer | ||
|
||
1. @lijiarui, | ||
[Rui LI](https://github.com/lijiarui), | ||
Founder & CEO of Juzi.BOT | ||
1. @huan, | ||
[Huan LI](https://github.com/huan) | ||
([李卓桓](http://linkedin.com/in/zixia)), | ||
Tencent TVP of Chatbot, | ||
\<[email protected]\> | ||
1. @lijiarui, [Rui LI](https://github.com/lijiarui), Founder & CEO of Juzi.BOT | ||
1. @huan, [Huan LI](https://github.com/huan) ([李卓桓](http://linkedin.com/in/zixia)), Tencent TVP of Chatbot, \<[email protected]\> | ||
|
||
## Copyright & License | ||
|
||
* Code & Docs © 2019-now Wechaty Contributors <https://github.com/wechaty> | ||
* Code released under the Apache-2.0 License | ||
* Docs released under Creative Commons | ||
- Code & Docs © 2016-now Wechaty Contributors <https://github.com/wechaty> | ||
- Code released under the Apache-2.0 License | ||
- Docs released under Creative Commons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ email: [email protected] | |
mailchimp-list: https://zixia.us4.list-manage.com/subscribe/post?u=a8584b55dea5aa8bbc14bd1a0&id=d9899f0d70 | ||
|
||
include: ["_pages"] | ||
permalink: /:title/ | ||
permalink: /:year/:month/:day/:title/ | ||
|
||
# Plugins | ||
plugins: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.