about summary refs log tree commit diff
path: root/config.example.h
blob: 372d2668f4040a601191c6c55e48ae19b35593fc (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*!
 * @file config.example.h
 * @brief Example configuration header of sternenblog
 */

/*!
 * @name Operational Settings
 * @{
 */

/*!
 * @brief Directory entries are stored in
 *
 * Directory blog entries are stored in.
 * Must either be an absolute path or start with "./".
 * Dotfiles and subdirectories will be ignored.
 */
#define BLOG_DIR "/srv/sternenblog/"

/*!
 * @brief Wether the server uses https for sternenblog
 *
 * sternenblog will use `BLOG_USE_HTTPS` when building an external
 * URL to pages: If it is `1`, it will use `https://` as prefix, otherwise
 * `http://`.
 *
 * This is currently only relevant for the RSS and Atom feeds.
 */
#define BLOG_USE_HTTPS 1

/*!
 * @brief Enable / Disable strict access check
 *
 * If enabled, sternenblog will only serve files which are either owned
 * by the user or group it is running as. This usually means that in order
 * to be served files must be `chown`ed to the group or user the webserver
 * is running as. Consequently it is harder to accidentally make files public.
 *
 * If disabled, sternenblog will serve any file in `BLOG_DIR` it can read.
 *
 * @see BLOG_DIR
 */
#define BLOG_STRICT_ACCESS 1

//! @}

/*!
 * @name Site Metadata
 * @{
 */

/*!
 * @brief Site title
 *
 * Title of the site to serve.
 * Will be used for the feeds and in templates to, e. g. set the HTML title tag.
 */
#define BLOG_TITLE "sternenblog"

/*!
 * @brief Site's Author
 *
 * Name of the author of the site served.
 * Used to set the feed's author in the atom feed,
 * ignored for RSS (since it is not recommended to
 * use for single author feeds there which is the only type
 * sternenblog can handle).
 *
 * Optional setting, if missing replaced by the username
 * sternenblog is running as.
 */
#define BLOG_AUTHOR "Jane Doe"

/*!
 * @brief Site description
 *
 * Description of the site to serve.
 * Will be used for the feeds and may be utilized by templates.
 *
 * @see https://cyber.harvard.edu/rss/rss.html#requiredChannelElements
 */
#define BLOG_DESCRIPTION "my personal blog"

//! @}

/*!
 * @name Caching
 * @{
 */

/*!
 * @brief Time a browsers should cache a response of sternenblog
 *
 * Time in seconds that should be the value of the `max-age` field
 * of the `Cache-Control` header. It determines the time in seconds
 * a response of sternenblog should be considered “fresh”.
 *
 * During this time browsers will used the cached version of the
 * response (if present) for a given URL. This is useful to reduce
 * server load, since browsers will request resources less often
 * which means they have to be generated less often as well
 * (especially the index).
 *
 * The value should be at least the time you expect users to spend
 * on your website although you might want to go lower if your
 * website updates _very_ frequently.
 *
 * The header will also be set for the feeds, but the RSS
 * `ttl` element won't be generated based on this value.
 *
 * Optional setting.
 *
 * Requires HTTP/1.1, but sternenblog won't check the used protocol version
 * before sending this header.
 *
 * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
 */
#define BLOG_CACHE_MAX_AGE 3600

//! @}

/*!
 * @name Template settings
 * @{
 */

/*!
 * @brief CSS url to use it `template/simple.c`
 *
 * CSS Stylesheet to use for the entire site. The default template will use
 * the Stylesheet URL given here if present.
 *
 * Optional setting.
 */
#define BLOG_CSS "/sternenblog.css"
//! @}