├── chapters.yml ├── .gitignore ├── wangdoc-deploy-rsa.enc ├── loppo.yml ├── .travis.yml.bak ├── deploy.sh ├── README.md ├── package.json └── .github └── workflows └── wangdoc.yml /chapters.yml: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | package-lock.json 4 | -------------------------------------------------------------------------------- /wangdoc-deploy-rsa.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangdoc/frontpage/HEAD/wangdoc-deploy-rsa.enc -------------------------------------------------------------------------------- /loppo.yml: -------------------------------------------------------------------------------- 1 | dir: docs 2 | output: dist 3 | site: Documents 4 | theme: wangdoc-frontpage 5 | customization: false 6 | themeDir: loppo-theme 7 | direction: ltr 8 | -------------------------------------------------------------------------------- /.travis.yml.bak: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | 5 | # script: npm run build 6 | # deploy: 7 | # provider: pages 8 | # skip_cleanup: true 9 | # github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard 10 | # local_dir: dist 11 | # repo: wangdoc/website 12 | # target_branch: master 13 | # on: 14 | # branch: master 15 | 16 | branches: 17 | only: 18 | - master 19 | 20 | install: 21 | - npm ci 22 | # keep the npm cache around to speed up installs 23 | cache: 24 | directories: 25 | - "$HOME/.npm" 26 | 27 | script: bash ./deploy.sh 28 | env: 29 | global: 30 | - ENCRYPTION_LABEL: bb6a8c216dbe 31 | - COMMIT_AUTHOR_EMAIL: yifeng.ruan@gmail.com 32 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e # Exit with nonzero exit code if anything fails 3 | 4 | # Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc 5 | ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" 6 | ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" 7 | ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} 8 | ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} 9 | openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in wangdoc-deploy-rsa.enc -out wangdoc-deploy-rsa -d 10 | chmod 600 wangdoc-deploy-rsa 11 | eval `ssh-agent -s` 12 | ssh-add wangdoc-deploy-rsa 13 | 14 | # Now that we're all set up, we can push. 15 | # git push $SSH_REPO $TARGET_BRANCH 16 | npm run build-and-commit 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 网道(WangDoc.com)是一个文档网站,提供互联网开发文档,正在建设中。 2 | 3 | ### 目标 4 | 5 | 这个项目的目标是,提供高质量的、自主版权的、可以自由使用的中文软件文档。 6 | 7 | 我们的追求是: 8 | 9 | > “复杂的技术,简单的讲解。” 10 | 11 | ### 自由使用 12 | 13 | 网站的所有内容采用知识共享 3.0 许可证,与维基百科相同。 14 | 15 | 你可以自由使用本站所有内容(包括用于商业用途),不必支付任何费用,条件是使用时保持署名(“来自网道项目”),以及采用相同方式共享。 16 | 17 | 你也许会问,为什么要做一个自由使用的文档网站? 18 | 19 | 回答是,为什么不呢。知识不同于其他物品,会越用越多。使用这些文档的人越多,它们就越有价值,我们努力让大家多消费这些文档。 20 | 21 | ### 开放源码 22 | 23 | 这个网站的所有页面,源码都是开放的,包括你现在看到的[这个页面](https://github.com/wangdoc/frontpage/blob/master/README.md)。 24 | 25 | 所有文档仓库都托管在 [GitHub](https://github.com/wangdoc),你可以在那里追踪项目进展。欢迎大家参与文档写作和维护,你可以克隆源码仓库,提交 Pull Request,或者通过 Issue 反映问题。 26 | 27 | 我们采用[《中文技术文档写作规范》](https://github.com/ruanyf/document-style-guide)。 28 | 29 | ### 广告 30 | 31 | 为了生存和长期发展,本站接受广告。如果有意投放,欢迎发邮件联系。 32 | 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontpage", 3 | "version": "0.0.1", 4 | "description": "wangdoc.com's frontpage", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "loppo -t wangdoc-frontpage", 8 | "build-and-commit": "npm run build && npm run commit", 9 | "server": "loppo server", 10 | "commit": "gh-pages --dist dist --dest dist --branch master --add --repo git@github.com:wangdoc/website.git", 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "keywords": [ 14 | "Wangdoc", 15 | "document" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/wangdoc/frontpage.git" 20 | }, 21 | "husky": { 22 | "hooks": { 23 | "pre-push": "npm update" 24 | } 25 | }, 26 | "author": "Ruan Yifeng", 27 | "license": "ISC", 28 | "devDependencies": { 29 | "gh-pages": "^5.0.0", 30 | "husky": "^4.3.8", 31 | "loppo": "^0.6.25", 32 | "loppo-theme-wangdoc-frontpage": "^0.5.7" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.github/workflows/wangdoc.yml: -------------------------------------------------------------------------------- 1 | name: Frontpage CI 2 | on: 3 | push: 4 | branches: 5 | - master 6 | 7 | jobs: 8 | page-generator: 9 | name: Generating pages 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | with: 15 | persist-credentials: false 16 | - name: Setup Node.js 17 | uses: actions/setup-node@main 18 | with: 19 | node-version: '14' 20 | - name: Install dependencies 21 | run: npm install 22 | - name: Build pages 23 | run: npm run build 24 | - name: Deploy to website 25 | uses: JamesIves/github-pages-deploy-action@3.7.1 26 | with: 27 | GIT_CONFIG_NAME: wangdoc-bot 28 | GIT_CONFIG_EMAIL: yifeng.ruan@gmail.com 29 | REPOSITORY_NAME: wangdoc/website 30 | ACCESS_TOKEN: ${{ secrets.WANGDOC_BOT_TOKEN }} 31 | BASE_BRANCH: master 32 | BRANCH: master # The branch the action should deploy to. 33 | FOLDER: dist # The folder the action should deploy. 34 | TARGET_FOLDER: dist 35 | CLEAN: false # Automatically remove deleted files from the deploy branch 36 | COMMIT_MESSAGE: update from frontpage 37 | 38 | 39 | --------------------------------------------------------------------------------