This is a guide to setting up microblog for absolute beginners.
Once python is correctly installed, you can use it to download:
Python is a programming language. We will use it to run the microblog code.
dateutil and toml are modules. Modules are subcomponents of python that do specific tasks, but which you might not need in every project. dateutil helps to format dates, and toml reads the settings file.
Your folder now includes:
as well as some other stuff.
A box will pop up.
python microblog.py ./default.tpl ./demo.txt > result.HTML
What does this code do?
Hint: you can name the output file whatever you like (for example, blog.html or index.html)
In this folder, there will be a new file called result.html. Open it. Congratulations - you have made your first microblog!
Some other things have been generated:
Whenever you re-run the code from step 5, all these files will be deleted and overwritten with a new version.
Look at the example in demo.txt for how to lay out posts.
Typing in a program like VSCodium will make it easier to see if there are additional 'blank lines' saved in you code where they aren't supposed to be (compared to using Notepad, for example)
Whenever you want to update your blog, re-upload these files and folders:
A good place to put your blog if you are making a hobby website for the first time is neocities
The code expects there to be some other files and folders, which do not come as part of the example setup
Put full-size pictures in images. Make a thumbnail version of each, under the same name, and put them in thumbs.
(a thumbnail version means 'the same image, but a lot smaller' - it means your page will load faster, and be easier on bandwidth and slower connections)
microblog will display .jpg and .png files.
The default.tpl template code links to a file called style.css. This file does not exist yet - you can create it.
template.css handles how areas of your microblog are laid out. It doesn't include any information about how to display it (apart from some borders to show where the boxes are). If you make a separate styles.css file, containing fonts, background images, better borders and more, then that makes it faster to swap styles in the future without worrying about changing the layout by accident.
(But as you become more skilled with CSS, there are lots of different ways you could display the layout boxes too)
At the bottom of each blog post, microblog generates three links for interacting with your blog. If you're not ready to set these up yet, add this code to your style.css:
.buttons {display: none;}
Now they simply won't appear.
Tags cannot contain a colon (:) or a pipe (|) but can contain a hyphen (-) - for example if you want to make subtags.
Failed to interpret a date from a string. Your file or posts may be malformed. Check if your file starts with a line break
This error message means there is a mistake in content.html (or whatever your blog post content file is called). Check #7 - Time to Blog and ensure your file is laid out correctly.