https://github.com/linkdd/plstblog
Staitc blog generator written in Perl
https://github.com/linkdd/plstblog
Last synced: about 1 year ago
JSON representation
Staitc blog generator written in Perl
- Host: GitHub
- URL: https://github.com/linkdd/plstblog
- Owner: linkdd
- License: bsd-3-clause
- Created: 2011-05-16T16:02:25.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2012-04-05T14:56:53.000Z (about 14 years ago)
- Last Synced: 2025-03-25T17:21:18.182Z (about 1 year ago)
- Language: Perl
- Homepage:
- Size: 115 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: COPYING
Awesome Lists containing this project
README
plstblog is a static blog generator written in Perl.
It is released under the BSD license.
Author: David Delassus
## REQUIREMENT
* XML::RSS
* Markdown :
* Digest::MD5
## USAGE
$ perl generate.pl [config file]
## CONFIGURATION
The configuration is pretty simple :
blogurl=http://example.com/blog
datefmt=%T %D
localpath=/path/to/your/blog
localposts=/path/to/your/articles/
tmpl.top=/path/to/your/header.template
tmpl.bot=/path/to/your/footer.template
tmpl.idx.top=/path/to/your/index/header.template
tmpl.idx.bot=/path/to/your/index/footer.template
The configuration is save in : `$HOME/.plstblog.conf` or `./plstblog.conf`.
### RSS 2.0
If you want generate a RSS 2.0 summary, just add this to your conf :
rss=yes
rss.title=Your RSS title
rss.link=http://example.com/
rss.lang=en
rss.description=Example of RSS summary
rss.author=author@example.com
### Templates
The templates are just HTML files with some special variables which are replaced by the generator.
For all templates, variables are :
* `{%rsslink%}` : Link to the RSS feeds (to put in ``).
* `{%rssicon%}` : Link to the RSS feeds (to put in ``).
For articles templates, variables are :
* `{%title%}` : Article's title.
* `{%idx%}` : Index of the article.
* `{%ohidden}` : If there is no previous article, its value is : `hidden` (can be added in a `class=` attribute).
* `{%nhidden}` : Same as above but for next article.
* `{%otitle%}` : Title of the previous article.
* `{%oidx%}` : Index of the previous article.
* `{%ntitle%}` : Title of the next article.
* `{%nidx%}` : Index of the next article.
Exemple of generated index :
TitleLast edition
{%title%}@date according to datefmt@
...
## Writing articles
Articles are written in *Markdown* syntax, put all of them into the folder `localposts` defined in your config file.
The filename must be named `..markdown`.