/blog

Source code of my blog along with the auto post html file generator.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Personal blog generator

This blog contains the source code for my blog. All the built files are on the build branch.

Why?

The project started off as a way for me to learn more about python and file handling. I felt like a static site generating program would be a good way to start. Currently, I have hosted the build branch of this project here. I also have no plans to name this project in a way that is not obvious.

How does this work?

As of 11th August 2024, I have completely changed how the blog files are being generated by the generator. A new method was developed to make the generator more flexible to create more themes, but has also increased the complexity of the code slightly although not in a confusing manner. New themes are being worked on as well.

In every template, a builder.py file is present with a mandatory "build()" function that takes a dictionary as an argument and builds the files required by adding in custom data to its own template files by looping through each key in the dictionary. The dictionary contains the necessary information for the template to build itself. The generator loops through all posts in the specified content folder to create the dictionary and calls the builder file's build function to build the final blog output on the output/ directory.

If github actions is setup properly, the output folder generated is pushed to the build branch of the repository. The build branch can then be used to be hosted on github pages or similar services.

Media (stored locally) like images and audio are handled by storing them in the static folder. They are referenced in a post like so: static/filename.extension for convenience.

Can I use this in my personal projects?

Absolutely! I would love to see it used for a personal project. Credits are not mandatory but is always appreciated.

What is the license of this project?

The project is licensed under GNU General Public License.

How can I contribute?

I welcome contributions. If you want to add a new feature, please open an issue first and discuss it with me.