docwu 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/docwu/post.rb +1 -1
- data/lib/docwu/utils.rb +6 -0
- data/lib/docwu/version.rb +1 -1
- data/lib/docwu/worker.rb +5 -27
- data/lib/docwu.rb +34 -5
- data/lib/template_files/Gemfile +3 -0
- data/lib/template_files/Gemfile.lock +28 -0
- data/lib/template_files/README.md +3 -0
- data/lib/template_files/_deploy/assets/images/shared/folder/README.txt +1 -0
- data/lib/template_files/_deploy/assets/images/shared/folder/text.png +0 -0
- data/lib/template_files/_deploy/assets/images/shared/folder/user.png +0 -0
- data/lib/template_files/_deploy/assets/images/shared/icons/li-1.gif +0 -0
- data/lib/template_files/_deploy/assets/images/shared/icons/li-2.gif +0 -0
- data/lib/template_files/_deploy/assets/images/shared/icons/li-3.gif +0 -0
- data/lib/template_files/_deploy/assets/javascripts/application.js +0 -0
- data/lib/template_files/_deploy/assets/javascripts/document_folder.js +0 -0
- data/lib/template_files/_deploy/assets/javascripts/document_post.js +0 -0
- data/lib/template_files/_deploy/assets/stylesheets/application.css +215 -0
- data/lib/template_files/_deploy/assets/stylesheets/document_folder.css +12 -0
- data/lib/template_files/_deploy/assets/stylesheets/document_post.css +103 -0
- data/lib/template_files/_deploy/assets/stylesheets/index.css +12 -0
- data/lib/template_files/_deploy/document/help/README.html +124 -0
- data/lib/template_files/_deploy/document/help/index.html +71 -0
- data/lib/template_files/_deploy/document/juices/README.html +67 -0
- data/lib/template_files/_deploy/document/juices/index.html +71 -0
- data/lib/template_files/_deploy/document/learning/README.html +108 -0
- data/lib/template_files/_deploy/document/learning/index.html +166 -0
- data/lib/template_files/_deploy/document/learning/markdown/index.html +73 -0
- data/lib/template_files/_deploy/document/learning/markdown/lesson_1.html +184 -0
- data/lib/template_files/_deploy/document/learning/ruby/1.html +102 -0
- data/lib/template_files/_deploy/document/learning/ruby/index.html +73 -0
- data/lib/template_files/_deploy/document/learning//345/210/235/345/255/246/350/200/205/346/225/231/347/250/213/index.html +73 -0
- data/lib/template_files/_deploy/document/learning//345/210/235/345/255/246/350/200/205/346/225/231/347/250/213/markdown-basic.html +140 -0
- data/lib/template_files/_deploy/document/projects/hui800/index.html +63 -0
- data/lib/template_files/_deploy/document/projects/passport800/index.html +63 -0
- data/lib/template_files/_deploy/document/projects/tuan800/index.html +63 -0
- data/lib/template_files/_deploy/document/projects/zhe800/index.html +63 -0
- data/lib/template_files/_deploy/index.html +241 -0
- data/lib/template_files/assets/images/shared/folder/README.txt +1 -0
- data/lib/template_files/assets/images/shared/folder/text.png +0 -0
- data/lib/template_files/assets/images/shared/folder/user.png +0 -0
- data/lib/template_files/assets/images/shared/icons/li-1.gif +0 -0
- data/lib/template_files/assets/images/shared/icons/li-2.gif +0 -0
- data/lib/template_files/assets/images/shared/icons/li-3.gif +0 -0
- data/lib/template_files/assets/javascripts/application.js +0 -0
- data/lib/template_files/assets/javascripts/document_folder.js +0 -0
- data/lib/template_files/assets/javascripts/document_post.js +0 -0
- data/lib/template_files/assets/stylesheets/application.css +215 -0
- data/lib/template_files/assets/stylesheets/document_folder.css +12 -0
- data/lib/template_files/assets/stylesheets/document_post.css +103 -0
- data/lib/template_files/assets/stylesheets/index.css +12 -0
- data/lib/template_files/config.yml +18 -0
- data/lib/template_files/doc/help/README.md +34 -0
- data/lib/template_files/layouts/folder.mustache +67 -0
- data/lib/template_files/layouts/index.mustache +29 -0
- data/lib/template_files/layouts/partials/folder/post_outline.mustache +6 -0
- data/lib/template_files/layouts/partials/folder/posterity.mustache +49 -0
- data/lib/template_files/layouts/partials/shared/copyright.mustache +6 -0
- data/lib/template_files/layouts/partials/shared/header.mustache +10 -0
- data/lib/template_files/layouts/post.mustache +97 -0
- data/lib/template_files/static/_static.html +0 -0
- data/lib/template_files/topics/index.markdown +6 -0
- metadata +61 -4
data/lib/docwu/post.rb
CHANGED
data/lib/docwu/utils.rb
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
module Docwu
|
3
3
|
class Utils
|
4
4
|
class << self
|
5
|
+
def cp_r src, dest
|
6
|
+
if File.exists?(src)
|
7
|
+
FileUtils.cp_r(src, dest)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
5
11
|
def hash_deep_merge(hash, other_hash)
|
6
12
|
hash.merge(other_hash) do |key, oldval, newval|
|
7
13
|
oldval = oldval.to_hash if oldval.respond_to?(:to_hash)
|
data/lib/docwu/version.rb
CHANGED
data/lib/docwu/worker.rb
CHANGED
@@ -3,31 +3,6 @@ require 'date'
|
|
3
3
|
module Docwu
|
4
4
|
class Worker
|
5
5
|
|
6
|
-
# - folder1
|
7
|
-
# - assets:
|
8
|
-
# + javascripts
|
9
|
-
# + images
|
10
|
-
# + files
|
11
|
-
# - doc:
|
12
|
-
# + 市场相关
|
13
|
-
# = 个人相关
|
14
|
-
# + happy
|
15
|
-
# + john
|
16
|
-
# - xiaozhang
|
17
|
-
# + learning
|
18
|
-
# + 基本文档
|
19
|
-
# - folder2
|
20
|
-
# - layouts:
|
21
|
-
# - application.mustache
|
22
|
-
# - doc:
|
23
|
-
# + 基础资料
|
24
|
-
# - assets:
|
25
|
-
# + javascripts
|
26
|
-
# + images
|
27
|
-
# - layouts:
|
28
|
-
# - application.mustache
|
29
|
-
#
|
30
|
-
|
31
6
|
attr_reader :layouts, :data, :deploy_path, :folders, :topics
|
32
7
|
|
33
8
|
def initialize
|
@@ -96,9 +71,12 @@ module Docwu
|
|
96
71
|
def generate
|
97
72
|
# 删除要输出的路径
|
98
73
|
FileUtils.rm_rf(self.deploy_path)
|
74
|
+
FileUtils.mkdir_p(self.deploy_path)
|
75
|
+
|
76
|
+
::Docwu::Utils.cp_r("#{plain_path('/assets/')}", "#{self.deploy_path}")
|
99
77
|
|
100
|
-
#
|
101
|
-
|
78
|
+
# 复制静态文件里去
|
79
|
+
::Docwu::Utils.cp_r("#{plain_path('/static/')}", "#{self.deploy_path}")
|
102
80
|
|
103
81
|
self.folders.each do |folder|
|
104
82
|
folder.generate
|
data/lib/docwu.rb
CHANGED
@@ -25,23 +25,52 @@ module Docwu
|
|
25
25
|
|
26
26
|
_command = args.shift
|
27
27
|
|
28
|
-
_useful_cmds = ['g', 'generate', 's', 'server', '-h', '--help']
|
28
|
+
_useful_cmds = ['g', 'generate', 's', 'server', '-h', '--help', 'new']
|
29
29
|
|
30
30
|
unless _useful_cmds.include?(_command)
|
31
|
-
|
31
|
+
puts "command #{_command} is not available, not in (#{_useful_cmds.join('|')})"
|
32
|
+
exit
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
if ['new'].include?(_command)
|
37
|
+
_project_name = args.shift
|
38
|
+
|
39
|
+
if _project_name.nil?
|
40
|
+
puts 'error: You need input a project name! '
|
41
|
+
exit
|
42
|
+
end
|
43
|
+
|
44
|
+
_new_dest = "#{workspace}/#{_project_name}"
|
45
|
+
|
46
|
+
_template_src = "#{File.dirname(__FILE__)}/template_files"
|
47
|
+
|
48
|
+
if File.exists?(_new_dest) && File.directory?(_new_dest)
|
49
|
+
puts "error: #{_new_dest} already exists! Please check !"
|
50
|
+
else
|
51
|
+
FileUtils.cp_r("#{_template_src}", "#{_new_dest}")
|
52
|
+
|
53
|
+
system "cd #{_new_dest} && bundle install && bundle exec docwu generate"
|
54
|
+
puts "cd #{_new_dest} && bundle install && bundle exec docwu generate"
|
55
|
+
|
56
|
+
puts "[#{_new_dest}] already success created!"
|
57
|
+
end
|
58
|
+
|
59
|
+
exit
|
32
60
|
end
|
33
61
|
|
34
62
|
_default_params = {
|
35
63
|
'-p' => [5656],
|
36
64
|
'-a' => ['0.0.0.0'],
|
37
|
-
'-c' => ["#{workspace}/config.yml"]
|
38
|
-
'DOCWU_ENV' => ['development'],
|
39
|
-
'-d' => [(args.delete('-d') == '-d')]
|
65
|
+
'-c' => ["#{workspace}/config.yml"]
|
40
66
|
}
|
41
67
|
|
42
68
|
if ['--help', '-h'].include?(_command)
|
43
69
|
puts "docwu:"
|
44
70
|
|
71
|
+
puts " * docwu new [project_name] ; eg.: docwu new project"
|
72
|
+
puts ""
|
73
|
+
puts " * docwu g, docwu generate, docwu s, docwu server"
|
45
74
|
_default_params.each do |_cmd, _cfg|
|
46
75
|
puts " #{_cmd}, #{_cfg[1]} (default: #{_cfg[0]})"
|
47
76
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
coderay (1.0.9)
|
5
|
+
daemons (1.1.9)
|
6
|
+
docwu (0.0.7)
|
7
|
+
coderay
|
8
|
+
mustache_render
|
9
|
+
nokogiri
|
10
|
+
redcarpet
|
11
|
+
thin
|
12
|
+
eventmachine (1.0.3)
|
13
|
+
mini_portile (0.5.1)
|
14
|
+
mustache_render (0.0.25)
|
15
|
+
nokogiri (1.6.0)
|
16
|
+
mini_portile (~> 0.5.0)
|
17
|
+
rack (1.5.2)
|
18
|
+
redcarpet (3.0.0)
|
19
|
+
thin (1.5.1)
|
20
|
+
daemons (>= 1.0.9)
|
21
|
+
eventmachine (>= 0.12.6)
|
22
|
+
rack (>= 1.0.0)
|
23
|
+
|
24
|
+
PLATFORMS
|
25
|
+
ruby
|
26
|
+
|
27
|
+
DEPENDENCIES
|
28
|
+
docwu (= 0.0.7)
|
@@ -0,0 +1 @@
|
|
1
|
+
http://sc.chinaz.com/tubiao/121008316061.htm
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,215 @@
|
|
1
|
+
body {
|
2
|
+
padding: 0;
|
3
|
+
margin: 0;
|
4
|
+
color: #503E2C;
|
5
|
+
font-family: "Oxygen",Arial,"Hiragino Sans GB","Microsoft YaHei","STHeiti","WenQuanYi Micro Hei",SimSun,sans-serif;
|
6
|
+
font-size: 14px;
|
7
|
+
letter-spacing: 1px;
|
8
|
+
word-wrap: break-word;
|
9
|
+
}
|
10
|
+
|
11
|
+
a:hover {
|
12
|
+
color: red !important;
|
13
|
+
}
|
14
|
+
|
15
|
+
a {
|
16
|
+
color: #A68800;
|
17
|
+
}
|
18
|
+
|
19
|
+
a.button {
|
20
|
+
background-color: #AAB5B5;
|
21
|
+
border-radius: 10px;
|
22
|
+
-moz-border-radius: 10px;
|
23
|
+
color: white;
|
24
|
+
display: inline-block;
|
25
|
+
margin: 0 5px 5px 0;
|
26
|
+
padding: 5px 10px;
|
27
|
+
text-decoration: none;
|
28
|
+
}
|
29
|
+
|
30
|
+
img {
|
31
|
+
border: none;
|
32
|
+
}
|
33
|
+
|
34
|
+
.wrapper {
|
35
|
+
width: 1024px;
|
36
|
+
margin: 0 auto;
|
37
|
+
}
|
38
|
+
|
39
|
+
.clearfix:after {
|
40
|
+
clear: both;
|
41
|
+
content: ".";
|
42
|
+
display: block;
|
43
|
+
height: 0;
|
44
|
+
visibility: hidden;
|
45
|
+
}
|
46
|
+
|
47
|
+
pre {
|
48
|
+
padding: 10px;
|
49
|
+
font-size: 12px;
|
50
|
+
background-color: #F8F8F8;
|
51
|
+
border: 1px solid #DDDDDD;
|
52
|
+
border-radius: 3px 3px 3px 3px;
|
53
|
+
overflow: auto;
|
54
|
+
}
|
55
|
+
|
56
|
+
#header {
|
57
|
+
background: none repeat scroll 0 0 #007E8C;
|
58
|
+
padding: 10px;
|
59
|
+
}
|
60
|
+
|
61
|
+
#header .nav a {
|
62
|
+
color: #fff;
|
63
|
+
padding: 0 10px 0 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
#container {
|
67
|
+
padding: 5px;
|
68
|
+
}
|
69
|
+
|
70
|
+
#container .path {
|
71
|
+
margin: 10px 0;
|
72
|
+
padding: 5px;
|
73
|
+
height: 24px;
|
74
|
+
line-height: 24px;
|
75
|
+
overflow: hidden;
|
76
|
+
text-indent: 12px;
|
77
|
+
color: #666;
|
78
|
+
border: 1px solid #ccc;
|
79
|
+
}
|
80
|
+
|
81
|
+
#container .path a {
|
82
|
+
color: #666;
|
83
|
+
}
|
84
|
+
|
85
|
+
#container .posterity .folders li.post {
|
86
|
+
padding: 5px;
|
87
|
+
}
|
88
|
+
|
89
|
+
#container .posterity .folders li.post .introduction {
|
90
|
+
font-size: 80%;
|
91
|
+
}
|
92
|
+
|
93
|
+
#container .posterity .folders li.post a.read-link {
|
94
|
+
font-size: 80%;
|
95
|
+
color: #503E2C;
|
96
|
+
}
|
97
|
+
|
98
|
+
#container .content {
|
99
|
+
padding: 10px;
|
100
|
+
}
|
101
|
+
|
102
|
+
#container .information {
|
103
|
+
padding: 0;
|
104
|
+
margin: 0 0 10px;
|
105
|
+
}
|
106
|
+
|
107
|
+
#container .information .bar .high {
|
108
|
+
color: red;
|
109
|
+
}
|
110
|
+
|
111
|
+
#footer {
|
112
|
+
font-size: 12px;
|
113
|
+
text-align: center;
|
114
|
+
color: #999999;
|
115
|
+
}
|
116
|
+
|
117
|
+
#footer .wrapper {
|
118
|
+
border-top: 1px solid #DBDBDB;
|
119
|
+
margin: 8px auto auto;
|
120
|
+
padding-bottom: 10px;
|
121
|
+
padding-top: 10px;
|
122
|
+
width: 800px;
|
123
|
+
}
|
124
|
+
|
125
|
+
.dl-catalogs {
|
126
|
+
padding: 0;
|
127
|
+
margin: 0;
|
128
|
+
}
|
129
|
+
|
130
|
+
.dl-catalogs dd {
|
131
|
+
margin: 0;
|
132
|
+
line-height: 1.8;
|
133
|
+
display: none;
|
134
|
+
white-space:nowrap;
|
135
|
+
overflow: hidden;
|
136
|
+
font-size: 12px;
|
137
|
+
}
|
138
|
+
.dl-catalogs dd a {
|
139
|
+
color: #503E2C;
|
140
|
+
}
|
141
|
+
|
142
|
+
.dl-catalogs dd.catalog-link-h1 {
|
143
|
+
display: block;
|
144
|
+
padding-left: 10px;
|
145
|
+
background: url("/assets/images/shared/icons/li-1.gif") no-repeat scroll 3px 8px transparent
|
146
|
+
}
|
147
|
+
|
148
|
+
.dl-catalogs dd.catalog-link-h2 {
|
149
|
+
display: block;
|
150
|
+
padding-left: 20px;
|
151
|
+
background: url("/assets/images/shared/icons/li-2.gif") no-repeat scroll 13px 8px transparent
|
152
|
+
}
|
153
|
+
|
154
|
+
.dl-catalogs dd.catalog-link-h3 {
|
155
|
+
display: block;
|
156
|
+
padding-left: 30px;
|
157
|
+
background: url("/assets/images/shared/icons/li-3.gif") no-repeat scroll 23px 8px transparent
|
158
|
+
}
|
159
|
+
|
160
|
+
.dl-catalogs dd.catalog-link-h4 {
|
161
|
+
|
162
|
+
}
|
163
|
+
|
164
|
+
.dl-catalogs dd.catalog-link-h5 {
|
165
|
+
|
166
|
+
}
|
167
|
+
|
168
|
+
.dl-catalogs dd.catalog-link-h6 {
|
169
|
+
|
170
|
+
}
|
171
|
+
|
172
|
+
#container .posterity .folders .folder {
|
173
|
+
background-color: #EEEEEE;
|
174
|
+
clear: both;
|
175
|
+
padding: 18px 20px;
|
176
|
+
margin: 10px;
|
177
|
+
}
|
178
|
+
|
179
|
+
#container .posterity .folders .folder .self .info {
|
180
|
+
font-size: 12px;
|
181
|
+
float: right;
|
182
|
+
}
|
183
|
+
|
184
|
+
#container .posterity .folders .folder h3 {
|
185
|
+
margin: 0;
|
186
|
+
padding: 5px 0 10px;
|
187
|
+
}
|
188
|
+
|
189
|
+
#container .posterity .folders .folder .children {
|
190
|
+
float: right;
|
191
|
+
width: 835px;
|
192
|
+
}
|
193
|
+
|
194
|
+
|
195
|
+
#container .posterity .folders .folder .sub-folders a {
|
196
|
+
margin: 5px;
|
197
|
+
}
|
198
|
+
|
199
|
+
#container .posterity .folders .folder img.icon {
|
200
|
+
height: 128px;
|
201
|
+
}
|
202
|
+
|
203
|
+
#container .posterity .folders .folder img.sub-icon {
|
204
|
+
height: 32px;
|
205
|
+
width: 32px;
|
206
|
+
}
|
207
|
+
|
208
|
+
#container .posterity .folders .folder ul.posts {
|
209
|
+
padding-left: 15px;
|
210
|
+
}
|
211
|
+
|
212
|
+
#container .posterity .folders .folder ul.posts li {
|
213
|
+
line-height: 1.5;
|
214
|
+
}
|
215
|
+
|
@@ -0,0 +1,103 @@
|
|
1
|
+
|
2
|
+
#container .information {
|
3
|
+
text-align: center;
|
4
|
+
color: #666;
|
5
|
+
}
|
6
|
+
|
7
|
+
#container .information .bar {
|
8
|
+
padding: 5px;
|
9
|
+
}
|
10
|
+
|
11
|
+
#container .information .bar-tags {
|
12
|
+
}
|
13
|
+
|
14
|
+
#container .outline {
|
15
|
+
background: none repeat scroll 0 0 #F5FCEE;
|
16
|
+
border: 1px solid #DCDDDD;
|
17
|
+
color: #706A6A;
|
18
|
+
font-size: 13px;
|
19
|
+
line-height: 24px;
|
20
|
+
margin: 8px auto 0;
|
21
|
+
padding: 8px 16px;
|
22
|
+
text-align: left;
|
23
|
+
}
|
24
|
+
|
25
|
+
#container .container-block {
|
26
|
+
background: none repeat scroll 0 0 #EEEEEE;
|
27
|
+
}
|
28
|
+
|
29
|
+
#container .content {
|
30
|
+
margin: 0;
|
31
|
+
border-radius: 3px 3px 3px 3px;
|
32
|
+
padding: 3px;
|
33
|
+
}
|
34
|
+
|
35
|
+
#container .content .content-inner {
|
36
|
+
background-color: #FFFFFF;
|
37
|
+
border: 1px solid #CACACA;
|
38
|
+
padding: 10px;
|
39
|
+
}
|
40
|
+
|
41
|
+
#container .content .content-inner > p {
|
42
|
+
text-indent: 2em;
|
43
|
+
}
|
44
|
+
|
45
|
+
.content-workmark > *:first-child {
|
46
|
+
margin-top: 0 !important;
|
47
|
+
}
|
48
|
+
|
49
|
+
.content-workmark h1,
|
50
|
+
.content-workmark h2,
|
51
|
+
.content-workmark h3,
|
52
|
+
.content-workmark h4,
|
53
|
+
.content-workmark h5,
|
54
|
+
.content-workmark h6
|
55
|
+
{
|
56
|
+
cursor: text;
|
57
|
+
font-weight: bold;
|
58
|
+
line-height: 1.7;
|
59
|
+
margin: 1em 0 15px;
|
60
|
+
padding: 0;
|
61
|
+
position: relative;
|
62
|
+
}
|
63
|
+
|
64
|
+
.content-workmark h1 {
|
65
|
+
border-bottom: 2px solid #DDDDDD;
|
66
|
+
font-size: 2.5em;
|
67
|
+
}
|
68
|
+
|
69
|
+
.content-workmark h2 {
|
70
|
+
border-bottom: 1px solid #EEEEEE;
|
71
|
+
font-size: 1.6em;
|
72
|
+
margin-left: 5px;
|
73
|
+
}
|
74
|
+
|
75
|
+
.content-workmark h3 {
|
76
|
+
margin-left: 8px;
|
77
|
+
}
|
78
|
+
|
79
|
+
.content-workmark h4 {
|
80
|
+
margin-left: 10px;
|
81
|
+
}
|
82
|
+
|
83
|
+
.content-workmark h5 {
|
84
|
+
margin-left: 12px;
|
85
|
+
}
|
86
|
+
|
87
|
+
.content-workmark h6 {
|
88
|
+
margin-left: 14px;
|
89
|
+
}
|
90
|
+
|
91
|
+
#container .container-main {
|
92
|
+
float: left;
|
93
|
+
line-height: 1.5;
|
94
|
+
margin: 0 auto;
|
95
|
+
padding: 5px;
|
96
|
+
width: 795px;
|
97
|
+
}
|
98
|
+
|
99
|
+
#container .container-side {
|
100
|
+
float: right;
|
101
|
+
padding: 10px 8px 0 0;
|
102
|
+
width: 210px;
|
103
|
+
}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
5
|
+
<title>
|
6
|
+
《团800 Wiki 系统, 基本使用文档》 - 帮助 - 团800 Wiki大全
|
7
|
+
</title>
|
8
|
+
<script type='text/javascript' src='/assets/javascripts/application.js'></script>
|
9
|
+
<script type='text/javascript' src='/assets/javascripts/document_post.js'></script>
|
10
|
+
<link href="/assets/stylesheets/application.css" media="all" rel="stylesheet" />
|
11
|
+
<link href="/assets/stylesheets/document_post.css" media="all" rel="stylesheet" />
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<div id='header' class='clearfix'>
|
15
|
+
<div class='nav wrapper'>
|
16
|
+
<a href='/index.html'>首页</a>
|
17
|
+
|
18
|
+
<a href='/document/projects/tuan800/index.html' title='团800'>团800</a>
|
19
|
+
<a href='/document/projects/zhe800/index.html' title='折800'>折800</a>
|
20
|
+
<a href='/document/projects/hui800/index.html' title='惠800'>惠800</a>
|
21
|
+
<a href='/document/projects/passport800/index.html' title='团800通行证'>团800通行证</a>
|
22
|
+
<a href='/document/learning/index.html' title='学习教程'>学习教程</a>
|
23
|
+
<a href='/document/juices/index.html' title='每日果汁'>每日果汁</a>
|
24
|
+
<a href='/document/help/index.html' title='帮助'>帮助</a>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div id='container' class='wrapper clearfix'>
|
29
|
+
<div class='path'>
|
30
|
+
<a href='/index.html'>首页</a>
|
31
|
+
|
32
|
+
>
|
33
|
+
<a href='/document/help/index.html' title='帮助'>帮助</a>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div class='information'>
|
37
|
+
<h1>团800 Wiki 系统, 基本使用文档</h1>
|
38
|
+
|
39
|
+
<div class='bar'>
|
40
|
+
时间: 2013-08-30 19:41
|
41
|
+
|
42
|
+
<span class='bar-authors'>
|
43
|
+
作者:
|
44
|
+
<a href='javascript:;'>王进忠</a>
|
45
|
+
</span>
|
46
|
+
|
47
|
+
</div>
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class='container-block clearfix'>
|
54
|
+
<!-- container-main begin -->
|
55
|
+
<div class='container-main clearfix'>
|
56
|
+
|
57
|
+
<div class='content'>
|
58
|
+
<div class='content-inner content-workmark'>
|
59
|
+
<h1>
|
60
|
+
<a name="markup-h1-1"></a>团800 Wiki 系统</h1>
|
61
|
+
|
62
|
+
<h2>
|
63
|
+
<a name="markup-h2-2"></a>基本命令</h2>
|
64
|
+
|
65
|
+
<ol>
|
66
|
+
<li><p>更新代码</p></li>
|
67
|
+
<li>
|
68
|
+
<p>安装GEMS:</p>
|
69
|
+
|
70
|
+
<p>bundle install</p>
|
71
|
+
</li>
|
72
|
+
<li><p>开发环境开启服务器</p></li>
|
73
|
+
</ol>
|
74
|
+
<ul>
|
75
|
+
<li>bundle exec docwu s # 默认开启, <a href="http://127.0.0.1:5656">http://127.0.0.1:5656</a>
|
76
|
+
</li>
|
77
|
+
<li>bundle exec docwu s -p 3300 # 以3300端口开启服务器, <a href="http://127.0.0.1:3300">http://127.0.0.1:3300</a>
|
78
|
+
</li>
|
79
|
+
</ul>
|
80
|
+
<ol>
|
81
|
+
<li>当文档修改了,需要使用如下命令进行重新生成</li>
|
82
|
+
</ol>
|
83
|
+
<ul>
|
84
|
+
<li>bundle exec docwu g</li>
|
85
|
+
</ul>
|
86
|
+
<h2>
|
87
|
+
<a name="markup-h2-3"></a>TODO LISTS</h2>
|
88
|
+
|
89
|
+
<ul>
|
90
|
+
<li>当本地文档修改后,需要自动重建</li>
|
91
|
+
</ul>
|
92
|
+
<h2>
|
93
|
+
<a name="markup-h2-4"></a>Deploy 生产环境部署</h2>
|
94
|
+
|
95
|
+
<ul>
|
96
|
+
<li><p>可以使用 nginx, apache 等web server启动,<br>
|
97
|
+
注意将项目root指向 -> ruby_wiki/_deploy # !!!!</p></li>
|
98
|
+
<li><p>可以使用crontab进行项目自动部署</p></li>
|
99
|
+
</ul>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</div> <!-- container-main end -->
|
104
|
+
|
105
|
+
<div class='container-side clearfix'>
|
106
|
+
<h3>文档目录大纲</h3>
|
107
|
+
<dl class='dl-catalogs'>
|
108
|
+
<dd class='catalog-link-h1'><a href='#markup-h1-1' title='团800 Wiki 系统'>团800 Wiki 系统</a></dd>
|
109
|
+
<dd class='catalog-link-h2'><a href='#markup-h2-2' title='基本命令'>基本命令</a></dd>
|
110
|
+
<dd class='catalog-link-h2'><a href='#markup-h2-3' title='TODO LISTS'>TODO LISTS</a></dd>
|
111
|
+
<dd class='catalog-link-h2'><a href='#markup-h2-4' title='Deploy 生产环境部署'>Deploy 生产环境部署</a></dd>
|
112
|
+
</dl>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</div>
|
117
|
+
<div id='footer'>
|
118
|
+
<div class='wrapper'>
|
119
|
+
<p>© 2011-2013 团800文档</p>
|
120
|
+
<p>滴水石穿,点点积累</p>
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
</body>
|
124
|
+
</html>
|