Skip to content

Commit eb42ac5

Browse files
committed
document how to setup extent and use the offline version
1 parent 76a664c commit eb42ac5

File tree

1 file changed

+65
-2
lines changed

1 file changed

+65
-2
lines changed

_docs/README.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ lightbot:
5757
5858
If you like to translate a tutorial to different languages,
5959
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
6161
6262
## How to add a web page
6363
@@ -92,7 +92,7 @@ Each element in the structure can be either
9292
```yaml
9393
- lightbot
9494
```
95-
- a category, in which case the we write
95+
- a category, in which case the we write
9696
```yaml
9797
- category: symbols
9898
```
@@ -104,7 +104,70 @@ Each element in the structure can be either
104104
- lightbot
105105
```
106106

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+
107165
[new-issue]: https://github.com/CoderDojoPotsdam/intro/issues/new
108166
[edit-tutorials]: https://github.com/CoderDojoPotsdam/intro/edit/master/_data/tutorials.yml
109167
[tutorials]: https://github.com/CoderDojoPotsdam/intro/blob/master/_data/tutorials.yml
110168
[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

Comments
 (0)