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
//! This crate provides the core functionality of Eric's Blog Generator.
//!
//! It is primarily meant to be driven by the `ebg` binary, but in theory it can
//! be used as a library if you try hard enough.
//!
//! The site generator process goes through several phases:
//!
//! 1. Indexing
//! 2. Rendering
//! 3. Generation
//!
//! In a more traditional compiler, these phases correspond roughly to parsing,
//! compilation, and linking.
//!
//! The program is largely serial right now, but the hope is it can be pipelined
//! and parallelized to be an exceptionally fast site generator.
//!
//! ## Indexing
//!
//! The indexing phase is responsible for reading the site's configuration and
//! all the source files. The end result is a data structure that can be used to
//! compute metadata about the site, links between pages, etc.
//!
//! ## Rendering
//!
//! The rendering phase is responsible for taking any markdown source pages and generating the HTML
//! for them.
//!
//! ## Generation
//!
//! The final step is to write out all the rendered contents into the
//! destination directory. Many files are copied directly, but this also
//! generates HTML pages from the rendered markdown contents of the last phase.
use GeneratorError;
use Diagnostic;
pub type Result<T> = Result;