README.md 1.75 KB
Newer Older
Cédric Moreau's avatar
Cédric Moreau committed
1 2
# Duniter website

3
Public site available at https://duniter.org/fr
Cédric Moreau's avatar
Cédric Moreau committed
4 5 6 7 8

## Reproduce it locally

You may want to reproduce this website locally, for developement purposes for example. Here are the instructions.

Cédric Moreau's avatar
Cédric Moreau committed
9
Clone the sources
Cédric Moreau's avatar
Cédric Moreau committed
10

Joel LE CORRE's avatar
Joel LE CORRE committed
11
    git clone https://github.com/duniter/website_fr.git
florck's avatar
florck committed
12

Cédric Moreau's avatar
Cédric Moreau committed
13
Install python stuff
Cédric Moreau's avatar
Cédric Moreau committed
14

Joel LE CORRE's avatar
Joel LE CORRE committed
15
    cd website_fr
Cédric Moreau's avatar
Cédric Moreau committed
16 17
    virtualenv .
    source bin/activate
18
    pip install pelican pelican-youtube markdown beautifulsoup4
Cédric Moreau's avatar
Cédric Moreau committed
19

20 21 22 23
Install system dependencies for plantuml plugin (plantuml and GraphViz utilities):
```bash
apt install plantuml graphviz
```
24

Cédric Moreau's avatar
Cédric Moreau committed
25
Generate the site
Cédric Moreau's avatar
Cédric Moreau committed
26 27 28

    pelican

Cédric Moreau's avatar
Cédric Moreau committed
29
Serve it
Cédric Moreau's avatar
Cédric Moreau committed
30

Joel LE CORRE's avatar
Joel LE CORRE committed
31
    ./develop_server.sh start 8556
Cédric Moreau's avatar
Cédric Moreau committed
32

Joel LE CORRE's avatar
Joel LE CORRE committed
33 34 35 36
The website should be available at : http://localhost:8556

## Manage the development server

florck's avatar
florck committed
37
Parameters available
Joel LE CORRE's avatar
Joel LE CORRE committed
38 39 40 41 42 43 44 45
* default port: 8556
* start <port_number>
* restart <port_number>
* stop

If you want to use an another port number :
1) Edit the ```SITEURL``` variable in ```pelicanconf.py``` file
2) ./develop_server.sh {start|restart} <port_number>
46 47 48

## Generate production site

florck's avatar
florck committed
49 50 51
To permit a nice-looking license inclusion in the wiki, we use a pre-run script that should be ran before creating the site with pelican:


52 53 54 55 56 57 58 59
You just need to give the production configuration file to Pelican:

    pelican -s publishconf.py

You may want to change the production parameters, like the domain name: just edit `publishconf.py` and modify the `SITEURL` to whatever value you want.

For example if you want to host the site at `https://my.website.org`, set:

60
    SITEURL = u'https://my.website.org'
61 62 63 64 65 66

## Plantuml plugin documentation

 * Plantuml plugin documentation : https://github.com/Scheirle/pelican-plugins/tree/master/plantuml
 * Plantuml documentation: http://plantuml.com
 * Plantuml support DOT language of GraphViz: http://www.graphviz.org/Gallery.php