2018-02-01 13:55:35 +01:00
|
|
|
# Varia website
|
2017-09-13 12:19:56 +02:00
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
> https://varia.zone
|
2019-08-26 19:35:56 +02:00
|
|
|
|
2018-12-18 13:36:08 +01:00
|
|
|
## Pelican
|
2018-01-19 12:57:45 +01:00
|
|
|
|
2019-08-26 19:43:58 +02:00
|
|
|
The Varia website is made with Pelican, a static site generator written in
|
|
|
|
Python. This means that the website is first generated on a computer (using
|
|
|
|
Python, Jinja and Pelican) into a set of html pages, files and images. This set
|
|
|
|
of documents is then uploaded to the server.
|
2018-12-18 13:36:08 +01:00
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
One of the things that Pelican uses is _plugins_. They are used to add extra
|
2019-08-26 19:43:58 +02:00
|
|
|
features to the generation process of the website.
|
2018-12-18 13:36:08 +01:00
|
|
|
|
2019-08-26 19:43:58 +02:00
|
|
|
In this repository there is a folder called 'plugins' and another one called
|
|
|
|
'plugins-custom'.
|
2018-12-18 13:36:08 +01:00
|
|
|
|
2019-08-26 19:43:58 +02:00
|
|
|
The first one, 'plugins', is linked to the offical collection of plugins from
|
|
|
|
the Pelican project '[pelican-plugins](https://github.com/getpelican/pelican-plugins/)'.
|
2018-12-18 13:37:01 +01:00
|
|
|
|
2019-08-25 11:16:47 +02:00
|
|
|
The other one, 'plugins-custom', consists of plugins that we wrote ourself.
|
2018-12-18 13:36:08 +01:00
|
|
|
|
|
|
|
## Clone
|
|
|
|
|
|
|
|
To clone both the varia.website and pelican-plugins repository, add the --recurse-submodules option in your git clone command:
|
2018-01-27 12:26:51 +01:00
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
```
|
|
|
|
$ git clone https://git.vvvvvvaria.org/varia/varia.website.git --recurse-submodules
|
|
|
|
```
|
2018-08-22 21:52:18 +02:00
|
|
|
|
|
|
|
## Install
|
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
```
|
|
|
|
$ python3 -m venv .venv
|
|
|
|
$ source .venv/bin/activate
|
|
|
|
$ pip install -r requirements.txt
|
|
|
|
```
|
2018-08-22 21:52:18 +02:00
|
|
|
|
|
|
|
## Start
|
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
```
|
|
|
|
$ pelican --autoreload
|
|
|
|
```
|
2018-08-22 21:52:18 +02:00
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
Visit the website at [localhost:8000](http://localhost:8000)
|
2018-08-22 21:52:18 +02:00
|
|
|
|
2018-02-01 13:04:22 +01:00
|
|
|
## Update submodules
|
|
|
|
|
|
|
|
We are currently using two submodules:
|
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
- pelican-plugins ([https://github.com/getpelican/pelican-plugins](https://github.com/getpelican/pelican-plugins))
|
|
|
|
- plugins-custom ([https://git.vvvvvvaria.org/varia/plugins-custom](https://git.vvvvvvaria.org/varia/plugins-custom))
|
2018-02-01 13:04:22 +01:00
|
|
|
|
|
|
|
To update these submodules within your (already) cloned repository, first init the submodule, and then update it:
|
|
|
|
|
2019-08-25 11:16:47 +02:00
|
|
|
cd /path/to/submodule
|
2018-02-01 13:04:22 +01:00
|
|
|
|
|
|
|
git submodule init
|
|
|
|
|
|
|
|
git submodule update
|
|
|
|
|
2017-09-13 12:19:56 +02:00
|
|
|
## Posting Content
|
2019-08-25 11:18:41 +02:00
|
|
|
|
2019-08-26 19:43:58 +02:00
|
|
|
We're using Pelican to generate a static website. The main way to add content
|
|
|
|
to the website is by making 'posts' in the folder `content`. This can be done
|
|
|
|
either locally or via the gitlab interface by creating a new file. Make sure
|
|
|
|
that each article contains at least the following at the top of the document:
|
2017-09-13 12:19:56 +02:00
|
|
|
|
|
|
|
Title: een nieuw initiatief
|
|
|
|
Date: 2017-07-07 18:32
|
|
|
|
Category: news
|
2018-08-22 21:52:18 +02:00
|
|
|
Tags: event, workshop
|
|
|
|
slug: the-name-of-the-html-page
|
|
|
|
lang: nl OR en
|
2021-01-19 22:04:56 +01:00
|
|
|
event_start: 2017-07-07 18:32
|
|
|
|
event_duration:4h
|
|
|
|
featured_image: /images/image.png
|
2017-09-13 12:19:56 +02:00
|
|
|
|
2019-08-26 19:43:58 +02:00
|
|
|
Articles are written in a markup language called markdown.
|
|
|
|
|
2021-01-19 22:04:56 +01:00
|
|
|
[Here](https://daringfireball.net/projects/markdown/syntax) is an overview of
|
|
|
|
the syntax. You can also use the online editor in this Gitea interface to help
|
|
|
|
you.
|