bliper

static html page generation in perl
git clone git://git.2f30.org/bliper.git
Log | Files | Refs | README | LICENSE

README (3484B)


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
bliper (BLog engine In PERl) v0.2
=================================

A perl script that reads all posts from main-articles/ as markdown and creates
them as HTML articles in output/ dir. It also reads and creates individual
pages based on files that exist in pages/ and pages-b/ directory.

Deps: Text-Markdown (http://search.cpan.org/~bobtfish/Text-Markdown-1.000031/)

It also creates a main page as index.html with all links to posts and pages
generated.

Files included are:

.
|-- LICENSE
|-- Makefile
|-- README
|-- TODO
|-- bin
|   |-- bliper-blog.sh
|   |-- bliper-create-post.sh
|   |-- bliper-deploy.sh
|   |-- bliper-generate.pl
|   `-- bliper-menu-creation.sh
|-- changelog
|-- main-articles
|   |-- 2013-11-07-readme
|   `-- 2013-11-10-markdown-notes
|-- output
|   |-- images
|   |   `-- puffytron.jpg
|   `-- style.css
|-- pages
|   |-- about
|   `-- contact
|-- pages-b
|   `-- readme-again
`-- template
    |-- footer
    |-- main-bottom
    |-- main-top
    |-- page-bottom
    `-- page-top

bin/bliper-blog.pl
	simple script to check if posts exist in main-articles/. If no posts
	exist, 'blog' page will not be created.

bin/bliper-create-post.sh
	use this instead of `touch <file>' for your posts. It just prepends `date
	'+%Y-%m-%d'` to the beginning of the filename.

bin/bliper-deploy.sh
	is a script tha "deploys" the website. It's based on rsync and I've
	included a sample config. Just change "user@host:/path/to/output" with
	the real one.

bin/bliper-generate.pl
	is the main script that parses every post in input/ and recreates it as
	HTML in output/. It also creates the index.html page and appends all links
	to posts.

bin/bliper-menu-creation.sh
	upon generation, a file called 'tmp' gets created. Then, this script
	comes and replaces all "INSERTMENU" strings in templates with the real
	menu. Nothing fancy, but you need to run this before deployment or
	viewing to generate your menus in all pages.

main-articles
	files in this directory will be linked in 'blog' page. If no articles
	exist, blog page will not be created.

Makefile
	just type 'make' to generate your site. It calls bin/bliper-generate.pl
	and bin/bliper-menu-creation.sh. When you edit your
	bin/bliper-deploy.sh, you can deploy your site with 'make deploy'.
	Possible options are: make, make clean, make deploy.

output
	is the directory which all generated pages are placed. Edit the style.css
	file according to your needs.

pages
	is the directory where all individual pages live (check the included
	sample).

pages-b
	is the directory which produces pages that do not appear on the menu.
	You can link to them through other pages with markdown.

template
	main-top is the top section of the main page.
	main-bottom is the bottom section of the main page.
	page-top is a generic template for the top section of any post page.
	page-bottom is a generic template for the bottom section of any post page.
	footer is just the footer appended in all pages.

To view the demo, run `make` in your main bliper directory. This calls
bin/bliper-generate.pl and bin/bliper-menu-creation.sh. If you need to view the
results, just run `$BROWSER output/index.html`

When your site is ready, edit `bin/bliper-deploy.sh` accordingly and just `make
deploy` on your main bliper directory.

There is also support for disqus individualy for pages and articles. Just
uncomment the disqus section on template/article-bottom and/or
template/pate-bottom to enable disqus on articles and/or pages.