Package: publicstatic
This is a static website builder with the following features:Works out of the box.Capable for blogs and websites with arbitrary content structure.Usesmarkdownpage
sources andJinja2templates.Includes neat and responsive default theme based onTwitter
Bootstrap 3.Provides optional JavaScript, CSS and HTML minification.Can generatesitemap.xml,robots.txt,humans.txt, and atom feed for blog posts.SupportsLESSstylesheets.Local host site preview.Code hightlighting based onGoogle Code
Prettify.Supports Disqus comments and Google Analytics.Tags.InstallationThe latest stable version could be installed from PyPI:pip install publicstaticUse this command to install latest development version directly from
GitHub:pip install -e git+git://github.com/dreikanter/public-static#egg=public-staticDefault website configuration uses Yahoo’s yuicompressor for CSS and
JavaScript minification. To use this toolJava
runtimeshould be
preinstalled.Basic usageThe following command creates a new website source in the current
directory:pub initUse the following commands to add posts or pages:pub post "Good news everyone!"
pub page "True story"With default configuration this commands will create a new post supposed
to be located athttp://example.com/posts/good-news-everyone, and a
pagehttp://example.com/true-story.After adding some content the website should be built.pub buildThis command will generate HTML pages using text content and template
files. Build output will also include CSS files and any other assets
included to the website source. Generated website could be previewed
right on the local host:pub run -b-boption tells public-static to open site root page using the
default browser.The last operation is to deploy generated web content to the destination
server:pub deployThis command suppose to use external tool likersyncorawsto
synchronize local web content directory to the remote one. The actual
command should be predefined in the configuration file asdeploy_cmdparameter value. See someexamples on
wiki.Use--helpfor detailed command line arguments description.Page file formatEach page is a plain text/markdown file complemented with the optional
metadata in the header. The format is pretty straightforward. Here is an
example:title: Hello World!
updated: 2012-06-05 13:49:38
template: default
custom-field: Custom field value

# Hello world!

This is the main page contents section.Some details:All header fields are optional. The whole header could be omitted if
you lazy enough.Bothcreatedandupdatedfield values should comply the
default format which isYYYY-MM-DDHH:MM:SS.templatevalue is to be transformed to[tpl_path]\[name].htmlfile name wheretpl_pathis defined by configuration andnameis what specified in the page header.All header fields are accessible from template body by name. E.g.{{title}}will be replaced by the actual title if it’s specified.Any number of custom header fields could be added.Custom field names should consist of alphanumeric characters, dashes
and underscores. All names are case-sensitive.Page header fields could have single-line values only.Everything beneath the key-value header definition is to be treated
as page content. Template name for this section is{{ content }}.ConfigurationPublic-static configuration resides in a yaml-formatted filepub.confin the root of each website directory.initcomand
generates this file with default parameter values and a brief comment
for each of them. Configuration supposed to be updated after site
creation to fit user requirements like site structure, deployment
destination, etc.Content migrationThere is a great tool to export Wordpress data to
public-static-compatible files:wp2md.Troubleshootingpubcommand is not available after installation.Ifpyenvis used for Python version
management, runpyenv rehashafter calling pip install.pip fails to install package dependencies on Windows, saying “The
process cannot access the file because it is being used by another
process”.There are two possible solutions. 1. This behavior is specific to 64-bit
version of Python. So try to replace it with x86 one. 2. If you still
need 64-bit version of Python, try to install the problematic package
manually (e.g. ‘pip install markdown’), and then repeat ‘pip install
publicstatic’ command.LicensingCopyright © 2013 byAlex Musayev. License:MIT.