02ed5caf6797e8bac899a5e262506183d48d23b9
[biaweb2.git] / Readme.md
1 # Readme
2
3 ## Overview
4
5 BiaWeb2 is a static site generator written in C++, that takes a directory tree
6 of documents (in Markdown format - more on that later) and outputs a website
7 with the same tree structure, based on a set of templates.
8
9 BiaWeb2 supports infinite nesting level of source sub-directories, with
10 each directory representing a "category". Thus, a website can have (say)
11 a structure like
12
13 + Home
14 + ----- Blog
15 + ------+------ Travel
16 + ------+------ History
17 + ------+------ Personal
18 + ------+------ Technology
19 + ----- Creative
20 + ------+------ Reviews
21 + ------+------ +------- Books
22 + ------+-------+--------+-------- Fiction
23 + ------+-------+--------+-------- Non-fiction
24 + ----- Miscellaneous
25
26 Thus the entire structure of the website is represented by the filesystem
27 hierarchy of directories (which I think is an intuitive way of organizing
28 categories).
29
30 `biaweb2` is a command-line program that performs the entire website
31 generation in one step. The usage is:
32
33 biaweb2 -i <inputdir> -o <outputdir> -t <templatedir> [-q]
34
35 Where `<inputdir>` is the input directory, `<outputdir>` is the destination
36 directory and `<templatedir>` is the location of the template files. The
37 `templates` directory in the __biaweb2__ source package provides a default
38 template that can be further customized to suit your needs. The main philosophy
39 of BiaWeb2 is to be as configuration-free as possible and hence most of the
40 customization for a specific website is within the templates themselves. The
41 option `-q` is quiet-mode, to suppress the messages.
42
43 ## Getting and compiling BiaWeb2
44
45 BiaWeb2 works on *nix-like operating systems.
46
47 To get BiaWeb2, clone the git repository (from the command line)
48
49 git clone https://gitlab.com/harishankarv/biaweb2.git
50
51 To compile you require the following dependencies and a C++ compiler. Check your
52 distribution package manager for more information
53
54 * libmarkdown2-dev or equivalent package
55 ([discount](https://www.pell.portland.or.us/~orc/Code/discount/))
56 * libfmt-dev or equivalent package ([fmt](https://github.com/fmtlib/fmt))
57 * scons ([scons](https://scons.org/))
58
59 Once you have got the dependencies, compile using scons from inside the
60 source directory of BiaWeb2 wherein you had cloned the repository
61
62 cd biaweb2/
63 scons
64
65 If successful, you should get an executable file `biaweb2` in the same directory
66 If not, check whether you have installed all the requirements.