blob: 23a675e1031214037a662246b9dc75b9693cbdbc (
plain)
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
|
========
README
========
This is the flatpages file plugin. It allows you to add pages to your
MediaGoblin instance which are not generated from user content. For
example, this is useful for these pages:
* About this site
* Terms of service
* Privacy policy
* How to get an account here
* ...
How to add pages
================
To add pages, you must edit template files on the file system in your
`local_templates` directory.
The directory structure looks kind of like this::
local_templates
|- flatpagesfile
|- flatpage1.html
|- flatpage2.html
|- ...
The ``.html`` file contains the content of your page. It's just a
template like all the other templates you have.
Here's an example::
{% extends "flatpagesfile/base.html" %}
{% block mediagoblin_content %}
<h1>About this site</h1>
<p>
This site is a MediaGoblin instance set up to host media for
me, my family and my friends.
</p>
{% endblock %}
.. Note::
If you have a bunch of flatpages that kind of look like one
another, take advantage of Jinja2 template extending and create a
base template that the others extend.
|