This repository has been archived by the owner on Jan 14, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
README.html
91 lines (66 loc) · 2.62 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>README.html</title>
</head>
<body>
<h1>freedombox.org</h1>
<p>Source code for the freedombox.org website</p>
<h2>Compiling</h2>
<p>freedombox.org is a simple set of static web pages. These pages are
generated by a static site generator called lektor. To see the final
HTML output of this source code one needs to install lektor and
compile with it.</p>
<ol>
<li><p>Install dependencies.</p>
<pre><code>$ sudo apt install virtualenv python-dev libssl-dev
</code></pre></li>
<li><p>Create a virtual python environment. Lektor is not available as a
Debian package so we install it from source code. In order not to
mess up the existing system with its installation and to be able
use it without administrator privileges, will install in a Python
virtual environment (basically a directory) and use the environment
whenever we need lektor.</p>
<pre><code>$ virtualenv lektorenv
</code></pre></li>
<li><p>Activate the environment. This will set proper Python paths
etc. so that when Python packages are installed, they will be done
to this virtual environment directory.</p>
<pre><code>$ source lektorenv/bin/activate
</code></pre></li>
<li><p>Install lektor.</p>
<pre><code>$ pip install lektor
</code></pre></li>
<li><p>Compile the project.</p>
<pre><code>$ lektor build
</code></pre>
<p>This will create an output directory in ~/.cache/lektor/builds and
place all the generated files there. If you wish to output to a
specific directory do it as follows:</p>
<pre><code>$ lektor build --output-path=my_build_output_dir
</code></pre></li>
</ol>
<h2>Recompling</h2>
<p>To recompile the project, simply activate the virtual environment and
compile the project.</p>
<h2>Lektor's Web Interface</h2>
<p>Lektor provides a built-in web server that is useful for creating new
content. Instead of editing lektor files for creating new pages, one
can create that them from a simple web interface provided by lektor
server. Creating new models, flowblocks, styling content etc. will
still need to be done using regular text editors.</p>
<p>When a server is started, any changes to source directory will
automatically result in a rebuild of the project.</p>
<ol>
<li><p>To run lektor server.</p>
<pre><code>$ lektor server
</code></pre>
<p>This will start a web server on 5000 port and will also start
monitoring your source code directory for changes to build them
immediately.</p></li>
<li><p>Visit http://localhost:5000</p></li>
</ol>
</body>
</html>