|
| 1 | +# Gitoyen website |
| 2 | + |
| 3 | +The gitoyen website is build on |
| 4 | +[pelican](http://docs.getpelican.com/en/3.6.3/), |
| 5 | +this repo contains the source code and content needed to generate the |
| 6 | +static website. |
| 7 | + |
| 8 | + |
| 9 | +## Getting started |
| 10 | + |
| 11 | +Pelican is based on python in order to make the site works you will need |
| 12 | +at least python and pip installed. |
| 13 | +Once this has been done run the following commands into this repository |
| 14 | +folder: |
| 15 | + |
| 16 | +### Virtualenv |
| 17 | + |
| 18 | +If you want to keep things isolated on your machine you will have to |
| 19 | +install virtualenv, this step is not mandatory but is recommended. |
| 20 | +On debian just type: `apt-get install python-virtualenv` |
| 21 | + |
| 22 | +Create a virtualenv in the root of the repository: `virtualenv ./venv` |
| 23 | + |
| 24 | +Source the virtualenv in order to isolate your current session: |
| 25 | +`source venv/bin/activate`, you can disable it later by typing `deactivate` |
| 26 | +in the same shell session. |
| 27 | + |
| 28 | + |
| 29 | +### Install and run |
| 30 | + |
| 31 | + - `pip install -e .` will install the dependencies needed |
| 32 | +by pelican |
| 33 | + - `gitoyen serve` will serve the website in development mode |
| 34 | +(i.e: livereload, local port) |
| 35 | + |
| 36 | + |
| 37 | +## Repository organisation |
| 38 | + |
| 39 | +The website is build on multiple sources: |
| 40 | + |
| 41 | + - `gitoyen.py` this is the command line helper file, it provides a list |
| 42 | +of usefull command for development. This script is installed when running |
| 43 | +`pip install -e .`. It is based on [Click](http://click.pocoo.org/5/) |
| 44 | + - `pelicanconf.py` is a python file for the configuration of the pelican |
| 45 | +engine. It contains for example the path of the different directories which |
| 46 | +will be used to build the website. |
| 47 | + - `filters.py` some jinja2 filters which will add features for generating |
| 48 | +the website. |
| 49 | + - `content/` contains the site content in Markdown files, it is separated |
| 50 | +in two subdirs: `pages`, `blog` the first subdir contains the pages of the |
| 51 | +site, the second contains a list of blog articles. |
| 52 | + - `templates/` some jinja templates for administration, it is used by |
| 53 | +`gitoyen.py` file. |
| 54 | + - `theme/` jinja templates and static files for generating the website. |
| 55 | + - `plugins/` pelican plugins, currently there is only one installed to |
| 56 | +generate tables of content. |
| 57 | + - `setup.py` contains instructions on how to install the gitoyen cli and |
| 58 | +the dependencies for running the dev environment. |
0 commit comments