Getting Started with blogstrap.py

MINTY PYTHONS' FRYING CIRCUITS
mox1
Wednesday, Jan 15th 2014

This post will explain how to get up and running with blogstrap.py. If your curious about blogstrap.py itself, check out my previous article.

You can obtain the most recent version of blogstrap.py at https://github.com/mox1/webpy-bootstrap-blog.

The README.md file on github explains how to get up and running quickly. This tutorial will assume you have already done that and you have a blogstrap.py instance up and running on http://localhost:8080.

Step 1 is to create a new user. This will serve as the blog owner (his/her info will appear in the About page and he/she will be colored differently when commenting), as well as the authentication needed to login to the admin interface. Start by navigating to http://localhost:8080/admin/admin

At this point you should see a simple user creation page, including a space for adding your username and e-mail address. This username is used publicly throughout the blog, including in comments, so choose wisely. This e-mail is used to login as well as for pulling your Gravatar for comments. Your e-mail is Not posted publicly, but is used when people use the form on the "Contact" page. Type in a password, while there are no requirements (We are all adults here right?!) I strongly suggest you take a second and come up with a secure one.

This might be a good time to mention the config.py file. This file contains a few settings that you can change, including some e-mail (SMTP) settings, allowed image formats and where to send errors.

After creating your account you should now be inside the Admin interface. Take a few seconds and click around the 6 tabs to see what is inside each one. After that please head directly to the Global Settings tab. Locate the Admin URL input box. This is the url where your admin interface resides. Currently blogstrap.py does not have any type of brute-force attacking protection. If an attacker chooses he can attempt to login to this interface all day long (hopefully you chose a strong password!). By changing this url (write down the new one!) you effectively hide the admin interface from the public. While this isn't perfect protection, it will go a long way in stopping hackers. Fill out the other fields on this page now if you wish, or not.

Once you have set the new admin interface you should be redirected back to your new url. Take a look up at the top of the browser and ensure the url is set to what you thought it was. If you ever forget your admin url, just restart your webserver and check the logs directory. Upon startup, blogstrap.py prints the current admin interface to the log (and to stdout).

Now head to the User Settings tab. Here you can set your contact info (which appears in the bottom right corner of most blog pages). I have mine set to /about#contact to direct users to the contact form. Feel free to set this to a href mailto, twitter page, etc. Whatever you wish. Also take a second to put some info into the About field. This is where you place the html that you want to appear on your About page. Have a look at mine for some inspiration.

Once you've done this, your blog is basically up and running. I would suggest your next steps be to upload an image or two. Creating a post requires two images (big and small) so start with at least two. Finally, create a new blog post. Don't forget that you have the full power of Bootstrap at your disposal when entering any HTML, including your about me page and blog posts.

Hopefully this is enough to get you started. In a future post I will cover the comment system and a few other features

If you would like to contribute to blogstrap.py, please pull from my Git repository and send pull requests. I would be happy to accept them!