bliper

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

commit 57dc42f717af996fa4365282f0967eacaa9f3793
parent 556a5f41fb8a36904bb0cc4f04293f9377b01443
Author: cipher <haris@2f30.org>
Date:   Mon Dec  2 19:43:58 +0200

some updated files and demo for pages that do not appear on menu

Diffstat:
README | 4++++
bin/bliper-generate.pl | 2+-
pages-b/readme-again | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 1 deletion(-)
diff --git a/README b/README @@ -68,6 +68,10 @@ output pages is the directory which produced all new pages (again, sample included). +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. diff --git a/bin/bliper-generate.pl b/bin/bliper-generate.pl @@ -8,7 +8,7 @@ my $main_page = 'output/index.html'; my $indir = 'main-articles'; # the input directory name my $outdir = 'output'; # the output directory name my $pagedir = 'pages'; # individual pages directory -my $b_pages = 'b_pages'; # pages that do not show at menu +my $pages_b = 'pages-b'; # pages that do not show at menu my @maint = qx(cat template/main-top); # top section for main page my @mainb = qx(cat template/main-bottom); # bottom section for main page my @footer = qx(cat template/footer); # footer for every page incl main diff --git a/pages-b/readme-again b/pages-b/readme-again @@ -0,0 +1,77 @@ +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/ 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 + |-- README + |-- TODO + |-- bin + | |-- bliper-create-post.sh + | |-- bliper-deploy.sh + | |-- bliper-generate.pl + | `-- bliper-menu-creation.sh + |-- main-articles + | |-- 2013-11-07-readme + | `-- 2013-11-10-markdown-notes + |-- output + | |-- images + | | `-- puffytron.jpg + | `-- style.css + |-- pages + | |-- about + | `-- contact + `-- template + |-- footer + |-- main-bottom + |-- main-top + |-- page-bottom + `-- page-top + +_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 + replaces all "insertmenu"(in capital) 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_ + is the directory which serves as the place to create all posts in markdown. + +_output_ + is the directory which all generated pages are placed. Edit the style.css + file according to your needs. + +_pages_ + is the directory which produced all new pages (again, sample included). + +_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. + +I've included a demo file in input/markdown-notes. Just run `bliper-generate.pl` in your main directory, `bliper-menu-creation.sh` and `$BROWSER output/index.html` to see the demo. There is also the option to rsync the files to your server with `bliper-deploy.sh`