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
use *;
/// Returns the reference description of a page, addressed by its slug.
///
/// A slug that is not in the table has no description: the line is then
/// omitted rather than filled with an invented sentence. The reference
/// site only prints a description on the pages it has one for, so the
/// omission is the faithful behaviour.
///
/// # Arguments
///
/// - `&str` - The page slug.
///
/// # Returns
///
/// - `Option<&'static str>` - The description, or `None` when the slug
/// has no entry.
pub
/// Derives the slug of a route: its last path segment, without the
/// `.html` suffix and without the trailing slash.
///
/// The slug is what the reference table is keyed by, so it has to be
/// the *page* name and not the whole route: `/guide/getting-started.html`
/// is the `getting-started` page, and the site root has no slug at all.
///
/// # Arguments
///
/// - `&str` - The page route.
///
/// # Returns
///
/// - `&str` - The slug, empty for the site root.
pub
/// Returns the description of the page a route points at.
///
/// # Arguments
///
/// - `&str` - The page route.
///
/// # Returns
///
/// - `Option<&'static str>` - The description, or `None` when the page
/// has no entry in the reference table.
pub