Static site generator in python.
Static web site generator, based on well understood MVC_ - Model, View,
Controller - design philosophy. The general idea behind MVC from web
application’s perspective is
… code-block:: text
+--------+
|template|
+--------+
|
V
+-------+ +----------+ +------+ +-----+
|request|-->|controller|--->|action|<---|model|
+-------+ +----------+ +------+ +-----+
|
V
+---------+
|HTML page|
+---------+
|
V
goes to the client +-------------+
<---------------------|http-response|
+-------------+
The general idea being that,
pagd
follows, more or less, a similar principle to build a web-site from a
collection of files organised as a directory tree. Here is a brief idea on how
it is done
… code-block:: text
+------+ +---------+ +-------------+
|layout|--->|generator|<---->|page-iterator|
+------+ +---------+ +-------------+
| ^
| | +------------+
V +<---------|page-context|
+---------+ | +------------+
|Html-page| |
+---------+ | +-------------+
| +<---------|page-template|
| | +-------------+
V +------------+
+--------+ |page-content|
|web-site| +------------+
+--------+
generates static output, hence can be hosted anywhere.
pluggable layouts.
pagd.myblog
layout for publishing my blog articles.pagd
everything that needs to get done by pagd is done through pagd
command
line interface.
command line interface comes with simple sub-commands like,
create
, to create a new layout.gen
, to generate static web site from a source layout.sub-commands are plugins and can be extended by implementing
pagd.interfaces.ICommand interface.
to use pagd as python library, refer to script.py
module under pagd
package.
web-site templates can be designed using tayra template
_.
reStructuredText directives,
pagd.myblog
layout is loaded with batteries.
config.json
attributegoogle_webfonts
.only part that cannot be configured, customized or entirely replaced, is
the name of the tool 😉
License: GPLv3 license
_
Requires: Linux/OS-X, Python-3.x, Pluggdapps.
Status: Core design stable. Not expected to change.
Refer to glossary_ and documentation for default layout pagd.myblog_.
package documentation
_.pagd is under development - you can hack the code, contribute back with
github <https://github.com/prataprc/pagd>
_. Note that the original
repository is maintained with mercurial and uses hg-git plugin to publish it
on github.
… _MVC: http://en.wikipedia.org/wiki/Model-view-controller
… _GPLv3 license: http://www.gnu.org/licenses/
… _python-markdown: https://pypi.python.org/pypi/Markdown
… _docutils: https://pypi.python.org/pypi/docutils
… _pygments: https://pypi.python.org/pypi/pygments
… _python-lxml: https://pypi.python.org/pypi/lxml
… _google-webfonts: http://www.google.com/fonts
… _magnific-popup: https://github.com/dimsemenov/Magnific-Popup
… _tayra template: http://pythonhosted.org/tayra
… _pagd.myblog: http://pythonhosted.org/pagd/myblog.html
… _glossary: http://pythonhosted.org/pagd/glossary.html
… _package documentation: http://pythonhosted.org/pagd
… _changelog: http://pythonhosted.org/pagd/CHANGELOG.html
… _todo: http://pythonhosted.org/pagd/TODO.html
… _mailing-list: http://groups.google.com/group/pluggdapps