Skip to content

Commit

Permalink
Merge two final (#416)
Browse files Browse the repository at this point in the history
* 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
huan authored Aug 12, 2020
1 parent c0f043d commit 19b2444
Show file tree
Hide file tree
Showing 172 changed files with 5,773 additions and 849 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm.yml → .github/workflows/editor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: NPM
name: Editor CI

on: [push, pull_request]

Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/gh-pages.yml
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ package-lock.json

.idea
.DS_Store

new-gh-pages/
14 changes: 2 additions & 12 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@
"no-trailing-punctuation": {
"punctuation": ".,;:!"
},
"MD002": { "level": 2 },
"MD013": false,
"MD024": false,
"MD033": {
"allowed_elements": [
"cite",
"code",
"del",
"dl",
"dt",
"dd",
"script",
"var"
]
},
"MD033": false,
"first-line-h1": false,
"no-hard-tabs": true,
"no-trailing-spaces": {
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
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)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ code:

.PHONY: clean
clean:
rm -fr docs/_site
rm -fr _site

.PHONY: build
build:
Expand Down
142 changes: 100 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# wechaty.github.io
## wechaty.js.org

[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-brightgreen.svg)](https://github.com/Wechaty/wechaty)
[![NPM](https://github.com/wechaty/wechaty.github.io/workflows/NPM/badge.svg)](https://github.com/wechaty/wechaty.github.io/actions?query=workflow%3ANPM)
[![GitHub Pages CI](https://github.com/wechaty/wechaty.js.org/workflows/GitHub%20Pages%20CI/badge.svg)](https://github.com/wechaty/wechaty.js.org/actions?query=workflow%3A%22GitHub+Pages+CI%22)

[Wechaty Official Homepage](https://wechaty.github.io)
![Wechaty Docusaurus](docs/images/wechaty-docusaurus.png)

[![fame0](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/0)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/0)
[![fame1](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/1)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/1)
[![fame2](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/2)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/2)
[![fame3](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/3)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/3)
[![fame4](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/4)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/4)
[![fame5](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/5)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/5)
[![fame6](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/6)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/6)
[![fame7](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/images/7)](https://sourcerer.io/fame/huan/wechaty/wechaty.github.io/links/7)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/0)](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/0)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/1)](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/1)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/2)](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/2)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/3)](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/3)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/4)](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/4)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/5)](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/5)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/6)](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/links/6)
[![contributor](https://sourcerer.io/fame/huan/wechaty/wechaty.js.org/images/7)](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)
Expand All @@ -29,7 +33,7 @@

Done!~

## CONTRIBUTE GUIDELINE
## Contribution Guidelines

### 1. Add Blog Header

Expand All @@ -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)

Expand All @@ -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

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ email: [email protected]
mailchimp-list: https://zixia.us4.list-manage.com/subscribe/post?u=a8584b55dea5aa8bbc14bd1a0&amp;id=d9899f0d70

include: ["_pages"]
permalink: /:title/
permalink: /:year/:month/:day/:title/

# Plugins
plugins:
Expand Down
8 changes: 5 additions & 3 deletions _includes/menu-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
<a class="nav-link" href="{{site.baseurl}}/news/">News</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{site.baseurl}}/developers/">Developers</a>
<a class="nav-link" href="{{site.baseurl}}/community/">Community</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/wechaty/PMC#wechaty-committers" target="_blank">Talks</a>
<a class="nav-link" href="{{site.baseurl}}/docs/">Docs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://wechaty.js.org" target="_blank">Docs</a>
<a class="nav-link" href="{{site.baseurl}}/developers/">Developers</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/wechaty/wechaty-getting-started" target="_blank">Get Started</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/wechaty/PMC#wechaty-committers" target="_blank">Talks</a>
</li>
2 changes: 1 addition & 1 deletion _includes/sidebar-featured.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h4 class="font-weight-bold spanborder"><span>Featured</span></h4>
<ol class="list-featured">
{% for post in site.tags.featured %}

{% if post.tags contains 'home' %}
{% if post.tags contains 'news' %}
<!-- in home page, we only display posts with tag `home` -->
{% unless home %}{% continue %}{% endunless %}
{% else %}
Expand Down
2 changes: 0 additions & 2 deletions _pages/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: Contact
permalink: /contact.html
---

<!-- markdownlint-disable MD033 -->

<form action="https://formspree.io/{{site.email}}" method="POST">
<p class="mb-4">Please send your message to {{site.name}}. We will reply as soon as possible!</p>
<div class="form-group row">
Expand Down
14 changes: 7 additions & 7 deletions _pages/privacy-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ permalink: /privacy-policy.html

"{{site.name}}" takes your privacy seriously. To better protect your privacy we provide this privacy policy notice explaining the way your personal information is collected and used.

#### Collection of Routine Information
## Collection of Routine Information

This website track basic information about their visitors. This information includes, but is not limited to, IP addresses, browser details, timestamps and referring pages. None of this information can personally identify specific visitor to this website. The information is tracked for routine administration and maintenance purposes.

#### Cookies
## Cookies

Where necessary, this website uses cookies to store information about a visitor’s preferences and history in order to better serve the visitor and/or present the visitor with customized content.

#### Advertisement and Other Third Parties
## Advertisement and Other Third Parties

Advertising partners and other third parties may use cookies, scripts and/or web beacons to track visitor activities on this website in order to display advertisements and other useful information. Such tracking is done directly by the third parties through their own servers and is subject to their own privacy policies. This website has no access or control over these cookies, scripts and/or web beacons that may be used by third parties. Learn how to [opt out of Google’s cookie usage](http://www.google.com/privacy_ads.html).

#### Links to Third Party Websites
## Links to Third Party Websites

We have included links on this website for your use and reference. We are not responsible for the privacy policies on these websites. You should be aware that the privacy policies of these websites may differ from our own.

#### Security
## Security

The security of your personal information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.

#### Changes To This Privacy Policy
## Changes To This Privacy Policy

This Privacy Policy is effective and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page.

We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. If we make any material changes to this Privacy Policy, we will notify you either through the email address you have provided us, or by placing a prominent notice on our website.

#### Contact Information
## Contact Information

For any questions or concerns regarding the privacy policy, please [contact us here]({{site.baseurl}}/contact.html).
Loading

0 comments on commit 19b2444

Please sign in to comment.