Skip to content

Commit

Permalink
初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
guyue-ls committed Jul 28, 2020
0 parents commit 7a9b45f
Show file tree
Hide file tree
Showing 15 changed files with 924 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
root: true,
env: {
node: true,
jest: true,
},
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
},
parserOptions: {
parser: "babel-eslint",
},
overrides: [
{
files: ["**/__tests__/*.{j,t}s?(x)"],
env: {
jest: true,
},
},
],
};
23 changes: 23 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on:
push:
branches:
- master

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "12.x"

- name: Markdown lint
run: |
npm install
npm run lint
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NPM
node_modules/

# VuePress
docs/.vuepress/dist/

# IDE
.idea/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
printWidth: 120,
trailingComma: "es5",
};
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 崂山科技文档中心

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/laoshan-tech/docs/Lint?style=flat-square)
![Netlify](https://img.shields.io/netlify/6048725f-3d36-4e06-b121-485f1cbbf8d7?style=flat-square)
![GitHub](https://img.shields.io/github/license/laoshan-tech/docs?style=flat-square)
62 changes: 62 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = (ctx) => ({
head: [["link", { rel: "icon", href: "/logo.png" }]],
locales: {
"/": {
lang: "zh-CN",
title: "崂山科技",
description: "研究穿墙技术 架构解决方案",
},
"/en/": {
lang: "en-US",
title: "LaoShan Tech",
description: "VPN technology research and solution architecture",
},
},
themeConfig: {
repo: "laoshan-tech/docs",
smoothScroll: true,
editLinks: true,
docsDir: "docs",
locales: {
"/": {
label: "简体中文",
selectText: "选择语言",
ariaLabel: "选择语言",
editLinkText: "在 GitHub 上编辑此页",
lastUpdated: "上次更新",
nav: require("./nav/zh"),
sidebar: {},
},
"/en/": {
label: "English",
selectText: "Languages",
ariaLabel: "Select language",
editLinkText: "Edit this page on GitHub",
lastUpdated: "Last Updated",
nav: require("./nav/en"),
sidebar: {},
},
},
},
extraWatchFiles: [".vuepress/nav/en.js", ".vuepress/nav/zh.js"],
plugins: [
[
"vuepress-plugin-clean-urls",
{
normalSuffix: "/",
indexSuffix: "/",
notFoundPath: "/404.html",
},
],
["vuepress-plugin-mathjax", { target: "svg", macros: { "*": "\\times" } }],
"vuepress-plugin-nprogress",
[
"vuepress-plugin-medium-zoom",
{
selector: ".my-wrapper .my-img",
delay: 1000,
},
],
["@vuepress/back-to-top"],
],
});
25 changes: 25 additions & 0 deletions docs/.vuepress/nav/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = [
{
text: "Development",
link: "/dev/",
},
{
text: "Learn More",
ariaLabel: "Learn More",
items: [
{
text: "Miscellaneous",
items: [
{
text: "License",
link: "/misc/license/",
},
{
text: "Release Notes",
link: "/misc/release-notes/",
},
],
},
],
},
];
25 changes: 25 additions & 0 deletions docs/.vuepress/nav/zh.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = [
{
text: "测试环境",
link: "/dev/",
},
{
text: "了解更多",
ariaLabel: "了解更多",
items: [
{
text: "其他",
items: [
{
text: "开源许可",
link: "/misc/license/",
},
{
text: "Release Notes",
link: "/misc/release-notes/",
},
],
},
],
},
];
Binary file added docs/.vuepress/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
home: true
heroImage: /logo.png
actionText: 快速上手 →
actionLink: /guide/
features:
- title: 优雅
details: 遵从良好的运维习惯,规避对系统的破坏性操作。
- title: 健壮
details: 无论平稳时期还是敏感时期,外连网络均能稳定运行。
- title: 高速
details: 优选网络线路,助力高速互联。
footer: AGPL Licensed | Copyright © 2020-present LaoShan-Tech
---
14 changes: 14 additions & 0 deletions docs/en/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
home: true
heroImage: /logo.png
actionText: Get Started →
actionLink: /guide/
features:
- title: Elegant
details: Follow good operation and maintenance habits and avoid destructive operations on the system.
- title: Robust
details: Regardless of the stable period or the sensitive period, the external network can operate stably.
- title: High-speed
details: Optimize network lines to facilitate high-speed interconnection.
footer: AGPL Licensed | Copyright © 2020-present LaoShan-Tech
---
30 changes: 30 additions & 0 deletions docs/misc/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
sidebar: auto
---

# 开源许可

崂山科技整体采用 [GNU Affero General Public License v3.0](https://github.com/dongfeng-project/documents/blob/master/LICENSE) 开源协议,简称 AGPL 协议。

AGPL 协议是基于 GPL 协议修改而来,加入额外条款,其目的是为了 Copyleft 条款应用于在网络上运行的应用程序(如 Web 应用),从而避免有人以应用服务提供商方式逃避 GNU 通用公共许可协议。

## 条款

- 允许修改项目代码
- 允许商用
- 一旦在修改本项目源代码的基础上对外发布修改版本,或以修改版本提供 Web 应用服务,则必须采用 AGPL 协议公开源代码

## 常见问题

- AGPL 是否要求修改版的源代码公开?

AGPL 不要求你发布你的修改版或者任何一部分修改版。你有自由修改并自用,而不必发布。这个规则也适用于机构(包括公司);机构可以做出修改版并在内部使用而不向其他外部组织发布。

但是如果你以某种方式把修改版向公众发布,AGPL 就要求你向用户提供修改版的源代码。

因此,AGPL 允许程序按某些方式发布,而不允许用其他的方式发布;但是,是不是发布由你来决定。

## 参考

- [GNU 许可证常见问题](https://www.gnu.org/licenses/gpl-faq.zh-cn.html)
- [为什么 GPL 是更好的开源许可证?](http://www.ruanyifeng.com/blog/2010/02/why_gpl_is_a_better_choice.html)
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "laoshan-tech-docs",
"version": "1.0.0",
"description": "Documents of LaoShan Tech",
"main": "index.js",
"dependencies": {
"vuepress": "^1.5.2"
},
"devDependencies": {
"eslint": "^7.5.0",
"lint-md-cli": "^0.1.2",
"prettier": "^2.0.5"
},
"scripts": {
"lint": "lint-md .",
"dev": "vuepress dev docs",
"build": "vuepress build docs",
"view-info": "vuepress view-info docs"
},
"repository": {
"type": "git",
"url": "git+https://github.com/laoshan-tech/docs.git"
},
"author": "laoshan-tech",
"license": "AGPL",
"bugs": {
"url": "https://github.com/laoshan-tech/docs/issues"
},
"homepage": "https://github.com/laoshan-tech/docs#readme"
}

0 comments on commit 7a9b45f

Please sign in to comment.