Beautifully simple static site generator in Python
Helpful Site is a static site generator written on top of Python-Markdown, Jinja2 and Crammit. It aims to provide a friendly interface for building web pages from markdown and minifying css and js files. You can check out a rendering of the sample pages here => http://helpfulsheep.com/toys/helpful-site/
Specifically, Helpful Site provides you with:
The project provides a number of ./manage.py commands that use the files from the src directory to generate a static site inside the dist directory.
To create a new page, run
After adding content to the page, run
to build the html files. If you plan to serve your site from a subdirectory such as http://www.example.com/blog/, you should update the config.yaml file and run
./manage.py build --prod
To update the css and js files, you should run
You can also run
to remove the entire dist folder and
./manage.py reset --all
to remove the src folder as well. You can run
to start a local server and last but not least,
to both minify and build the files.
Building your site on top of this should be a matter of customizing the files in the config directory i.e. config.yaml and template files and adding your own css and js files to the src directory. As far as media goes, there is no recommended strategy, but you could store your files inside each post’s directory and use relative links to point to them. This should provide the greatest flexibility while also keeping your posts atomic - limited to a single directory.
Google Chrome seems to screw up the font size from time to time when loading the pages. According to this post, it seems to be caused by using rem units in the css files.
If you do funky stuff, such as delete the dist folder while the server is running, you might end up with a socket.error: [Errno 98] Address already in use error when trying to restart it. You will need to manually find the server process and kill -9 it.
Yes, this is written in Python 2. I am sorry. No, there are no tests. I am even sorrier for that.
Contributions are more than welcome and are generally rewarded with a huge THANK YOU! and a [virtual] hug. Feel free to tackle any issues you may have and send me a pull request afterwards.
If you have bigger plans, feel free to drop me a line at firstname.lastname@example.org.
TODO: Figure out how to actually get changelog content.
Changelog content for this version goes here.
TODO: Brief introduction on what you do with files - including link to relevant help section.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|helpful_site-0.1.0-py2.py3-none-any.whl (10.0 kB) Copy SHA256 Checksum SHA256||py2.py3||Wheel||Jul 21, 2015|
|helpful-site-0.1.0.tar.gz (58.7 kB) Copy SHA256 Checksum SHA256||–||Source||Jul 21, 2015|