@@ -57,7 +57,7 @@ lightbot:
57
57
58
58
If you like to translate a tutorial to different languages,
59
59
first, check that your language is in the [list of languages][languages]. If not, add it.
60
- Then, you can translate [tutorials][tutorials] and
60
+ Then, you can translate [tutorials][tutorials] and
61
61
62
62
## How to add a web page
63
63
@@ -92,7 +92,7 @@ Each element in the structure can be either
92
92
` ` ` yaml
93
93
- lightbot
94
94
` ` `
95
- - a category, in which case the we write
95
+ - a category, in which case the we write
96
96
` ` ` yaml
97
97
- category: symbols
98
98
` ` `
@@ -104,7 +104,70 @@ Each element in the structure can be either
104
104
- lightbot
105
105
` ` `
106
106
107
+
108
+ # # How to use the offline version
109
+
110
+ This website also has an offline version.
111
+ The offline version is updated by [travis][travis] and can be accessed via the [offline-build branch][offline-build].
112
+
113
+ You can download the [offline version][offline-build-download].
114
+ You can extract it, store it e.g. on a USB device or serve it via a webserver.
115
+
116
+ To keep your local copy updated, you can install git.
117
+ Then, you clone the repository once :
118
+
119
+ git clone --branch offline-build https://github.com/CoderDojoPotsdam/intro.git
120
+
121
+ Everytime you want to update the local copy, run
122
+
123
+ git pull
124
+
125
+ # # How to build the offline version
126
+
127
+ You can build the offline version.
128
+ To clone the offline material, execute this command :
129
+
130
+ ` git clone --branch offline https://github.com/CoderDojoPotsdam/intro.git _site/offline`
131
+
132
+ Then, you can run the jekyll command to build and serve the offline website :
133
+
134
+ ` jekyll serve --trace`
135
+
136
+ Now, your webpage should be available at http://localhost:4000/.
137
+ Notice that some additional links appear which are only available as offline verison.
138
+
139
+ # # How to add offline content
140
+
141
+ Offline links are supported in the `links` section of a tutorial.
142
+ If your links look like this :
143
+
144
+ ` ` ` yaml
145
+ links:
146
+ - name: Online
147
+ url: http://lightbot.com/flash.html
148
+ ` ` `
149
+
150
+ You can also add an offline link to a file stored in the
151
+ [offline branch][offline-branch].
152
+ Offline links are only displayed if the offline verison is generated, see above.
153
+
154
+ Here, you can see that we add an offline link
155
+ to the [lightbot/index.html][offline-branch-lightbot] file :
156
+ ` ` ` yaml
157
+ links:
158
+ - name: Online
159
+ url: http://lightbot.com/flash.html
160
+ - name: Offline
161
+ url: offline/lightbot/index.html
162
+ offline: true
163
+ ` ` `
164
+
107
165
[new-issue] : https://github.com/CoderDojoPotsdam/intro/issues/new
108
166
[edit-tutorials] : https://github.com/CoderDojoPotsdam/intro/edit/master/_data/tutorials.yml
109
167
[tutorials] : https://github.com/CoderDojoPotsdam/intro/blob/master/_data/tutorials.yml
110
168
[languages] : https://github.com/CoderDojoPotsdam/intro/blob/master/_data/languages.yml
169
+ [offline-build] : https://github.com/CoderDojoPotsdam/intro/tree/offline-build
170
+ [offline-build-download] : https://github.com/CoderDojoPotsdam/intro/archive/offline-build.zip
171
+ [travis] : https://travis-ci.org/CoderDojoPotsdam/intro/
172
+ [offline-branch] : https://github.com/CoderDojoPotsdam/intro/tree/offline
173
+ [offline-branch-lightbot] : https://github.com/CoderDojoPotsdam/intro/blob/offline/lightbot/index.html
0 commit comments