-
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.
- Loading branch information
陈彦霏
authored and
陈彦霏
committed
Nov 6, 2019
1 parent
6e367ee
commit 339956d
Showing
24 changed files
with
204 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
*.swp | ||
.vscode/ |
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 +1,3 @@ | ||
_build | ||
_build/ | ||
opt/ | ||
var/ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<script> | ||
(function(){ | ||
var bp = document.createElement('script'); | ||
var curProtocol = window.location.protocol.split(':')[0]; | ||
if (curProtocol === 'https') { | ||
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; | ||
} | ||
else { | ||
bp.src = 'http://push.zhanzhang.baidu.com/push.js'; | ||
} | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(bp, s); | ||
})(); | ||
</script> |
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,40 @@ | ||
<div id="course-ad2"> | ||
<h3>大牛课程</h3> | ||
|
||
{% for course in [ | ||
{ | ||
"url": "https://time.geekbang.org/column/intro/140?code=watzFY59C5wIYB3ECn%2FScBaIFq5k8pPz9UU8ADR%2Fd4s%3D&utm_term=SPoster", | ||
"url": "https://time.geekbang.org/column/intro/140?code=watzFY59C5wIYB3ECn%2FScBaIFq5k8pPz9UU8ADR%2Fd4s%3D", | ||
"path": "_static/linux-performance-course.jpg", | ||
}, | ||
{ | ||
"url": "https://time.geekbang.org/column/intro/112?code=S1Gimo52SvlZRR-d1JmFhwo3qiM%2FeyKiszh4wwpkW70%3D&utm_term=SPoster", | ||
"url": "https://time.geekbang.org/column/intro/112?code=S1Gimo52SvlZRR-d1JmFhwo3qiM%2FeyKiszh4wwpkW70%3D", | ||
"path": "_static/golang-core-course.jpg", | ||
}, | ||
{ | ||
"url": "https://time.geekbang.org/column/intro/154?code=VicNYaXq1%2Ff9xQ-rrWlMfr%2FPoyYAw4D8eN8mB5SZTjA%3D&utm_term=SPoster", | ||
"url": "https://time.geekbang.org/column/intro/154?code=VicNYaXq1%2Ff9xQ-rrWlMfr%2FPoyYAw4D8eN8mB5SZTjA%3D", | ||
"path": "_static/web-front-end-course.jpg", | ||
}, | ||
{ | ||
"url": "https://time.geekbang.org/column/intro/48?code=vPMg2o7CvYAvCtdAV7DY5UvvS1DzcRNcImRZy3KzttE%3D&utm_term=SPoster", | ||
"url": "https://time.geekbang.org/column/intro/48?code=vPMg2o7CvYAvCtdAV7DY5UvvS1DzcRNcImRZy3KzttE%3D", | ||
"path": "_static/zedhz-course.jpg", | ||
}, | ||
] %} | ||
<a href="{{ course.url }}"> | ||
<img src="{{ pathto(course.path, 1) }}" /> | ||
</a> | ||
{% endfor %} | ||
|
||
</div> | ||
|
||
<style> | ||
#course-ad2 img:hover { | ||
margin-left: 5px; | ||
} | ||
#course-ad2 a { | ||
text-decoration: none; | ||
} | ||
</style> |
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,23 @@ | ||
{% set disqus_domain='nodejs-book.disqus.com' %} | ||
|
||
<script> | ||
/** | ||
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. | ||
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ | ||
/* | ||
*/ | ||
|
||
var disqus_config = function () { | ||
this.page.url = window.location.href; // PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable | ||
this.page.identifier = window.location.pathname; // PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable | ||
}; | ||
|
||
(function() { // DON'T EDIT BELOW THIS LINE | ||
var d = document, s = d.createElement('script'); | ||
s.src = 'https://{{ disqus_domain }}/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
</script> | ||
|
||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
==== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:titlesonly: | ||
|
||
交流 <contact> | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# Author: fasion | ||
# Created time: 2019-11-04 09:34:59 | ||
# Last Modified by: fasion | ||
# Last Modified time: 2019-11-05 10:31:01 | ||
|
||
SELF_PATH=`realpath "$0"` | ||
SCRIPT_DIR_PATH=`dirname "$SELF_PATH"` | ||
DOC_ROOT_PATH=`dirname "$SCRIPT_DIR_PATH"` | ||
DOCS_PATH=`dirname "$DOC_ROOT_PATH"` | ||
REPO_PATH=`dirname "$DOCS_PATH"` | ||
VAR_PATH="$DOC_ROOT_PATH/var" | ||
CLONE_PATH="$VAR_PATH/clone" | ||
|
||
if [ -e "$CLONE_PATH" ]; then | ||
read -p "delete clone repo $CLONE_PATH (y or n)? " value | ||
if [ "$value" == "y" ]; then | ||
rm -rf "$CLONE_PATH" | ||
else | ||
exit 1 | ||
fi | ||
fi | ||
|
||
git clone $REPO_PATH $CLONE_PATH | ||
|
||
( | ||
cd "$CLONE_PATH" && \ | ||
"$CLONE_PATH/docs/zh_CN/scripts/setup.sh" && \ | ||
"$CLONE_PATH/docs/zh_CN/scripts/build.sh" && \ | ||
ossutil -e oss-cn-shanghai.aliyuncs.com cp -f -r "$CLONE_PATH/docs/zh_CN/_build/html" oss://works-nodejs/zh_CN/latest | ||
) |
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,21 @@ | ||
#!/bin/sh | ||
|
||
# Author: fasion | ||
# Created time: 2019-11-04 08:38:35 | ||
# Last Modified by: fasion | ||
# Last Modified time: 2019-11-04 08:44:15 | ||
|
||
SELF_PATH=`realpath "$0"` | ||
SCRIPT_DIR_PATH=`dirname "$SELF_PATH"` | ||
DOC_ROOT_PATH=`dirname "$SCRIPT_DIR_PATH"` | ||
DOCS_PATH=`dirname "$DOC_ROOT_PATH"` | ||
REPO_PATH=`dirname "$DOCS_PATH"` | ||
PYENV_PATH="$DOC_ROOT_PATH/opt/pyenv" | ||
PIP_PATH="$PYENV_PATH/bin/pip" | ||
REAL_PYENV_PATH="$HOME/opt/pythons/pyenv.sphinx" | ||
PYENV_BIN_PATH="$PYENV_PATH/bin" | ||
|
||
( | ||
cd "$DOC_ROOT_PATH" | ||
PATH="$PATH:$PYENV_BIN_PATH" make html | ||
) |
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,33 @@ | ||
#!/bin/bash | ||
# FileName: setup.sh | ||
# Author: Fasion Chan | ||
# @contact: fasionchan@gmail.com | ||
# @version: $Id$ | ||
# | ||
# Description: | ||
# | ||
# Changelog: | ||
# | ||
# | ||
|
||
SELF_PATH=`realpath "$0"` | ||
SCRIPT_DIR_PATH=`dirname "$SELF_PATH"` | ||
DOC_ROOT_PATH=`dirname "$SCRIPT_DIR_PATH"` | ||
DOCS_PATH=`dirname "$DOC_ROOT_PATH"` | ||
REPO_PATH=`dirname "$DOCS_PATH"` | ||
PYENV_PATH="$DOC_ROOT_PATH/opt/pyenv" | ||
PIP_PATH="$PYENV_PATH/bin/pip" | ||
REAL_PYENV_PATH="$HOME/opt/pythons/pyenv.sphinx" | ||
|
||
if [ ! -e "$REAL_PYENV_PATH" ]; then | ||
mkdir -p "$REAL_PYENV_PATH" | ||
virtualenv -p python3 "$REAL_PYENV_PATH" | ||
fi | ||
|
||
if [ ! -e "$PYENV_PATH" ]; then | ||
mkdir -p `dirname "$PYENV_PATH"` | ||
ln -s "$REAL_PYENV_PATH" "$PYENV_PATH" | ||
fi | ||
|
||
"$PIP_PATH" install -r "$REPO_PATH/requirements/docs.txt" | ||
"$PIP_PATH" install -r "$REPO_PATH/requirements/docs-dev.txt" |
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 |
---|---|---|
|
@@ -14,6 +14,6 @@ | |
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:titlesonly: | ||
|
||
文件读写 <read-write> |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
====== | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:titlesonly: | ||
|
||
文件系统 <fs/index> | ||
|
||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ Node.js之旅 | |
=========== | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:titlesonly: | ||
|
||
模块 <module> | ||
HTTP模块 <http> | ||
|
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,2 @@ | ||
formats: [] | ||
requirements_file: requirements/docs.txt |
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 @@ | ||
sphinx-autobuild==0.7.1 |
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,2 @@ | ||
Sphinx==1.8.2 | ||
sphinx-sitemap==0.3.1 |