~ubuntu-za/+junk/ubuntuza-site

« back to all changes in this revision

Viewing changes to README.rst

  • Committer: Raoul Snyman
  • Date: 2014-12-18 21:42:20 UTC
  • Revision ID: raoul@snyman.info-20141218214220-8u4nn1868g9d5i3p
Added a readme file to get up and running

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Getting Started
 
2
===============
 
3
 
 
4
The Ubuntu-ZA site is a static HTML site generated by the `Nikola <http://getnikola.com/>`_ site generator. Nikola is
 
5
written in Python and is in the Ubuntu repository.
 
6
 
 
7
 
 
8
Installing Nikola (Ubuntu 14.10 and higher)
 
9
-------------------------------------------
 
10
The minimum version of Nikola required is 7.0. If you're running Ubuntu 14.10 Utopic Unicorn, you'll have 7.0.1 in the
 
11
repositories and you can just install it using apt-get::
 
12
 
 
13
    $ sudo apt-get install nikola
 
14
 
 
15
 
 
16
Installing Nikola (Ubuntu 14.04 and lower)
 
17
-------------------------------------------
 
18
If you're on an earlier version of Ubuntu, you'll need to install the latest version of Nikola. The best way to do this
 
19
is to create a virtual environment and install it in there.
 
20
 
 
21
First, install ``python-virtualenv`` and a number of other packages you will need::
 
22
 
 
23
    $ sudo apt-get install python-virtualenv python-dev libxml2-dev libxslt1-dev zlib1g-dev
 
24
 
 
25
Then you need to create a virtual environment. Navigate to a root folder for your virtual environment, and then create
 
26
your virtual environment::
 
27
 
 
28
    $ cd ~/Projects
 
29
    $ virtualenv --system-site-packages venv
 
30
 
 
31
Once that is done, you need to install Nikola itself::
 
32
 
 
33
    $ ./venv/bin/pip install --upgrade nikola
 
34
 
 
35
You may want to create a symlink for ease-of-use::
 
36
 
 
37
    $ ln -s /path/to/venv/bin/nikola /path/to/ubuntuza-site/nikola
 
38
 
 
39
 
 
40
Building the Site
 
41
-----------------
 
42
Once you have Nikola installed, you probably want to see the site. First we need to build it::
 
43
 
 
44
    $ nikola build
 
45
 
 
46
If you've created the symlink, you'll want to use it like this::
 
47
 
 
48
    $ ./nikola build
 
49
 
 
50
 
 
51
Running the Site
 
52
----------------
 
53
To preview the site, it's as easy as running a local web server::
 
54
 
 
55
    $ nikola serve
 
 
b'\\ No newline at end of file'