A dummy-simple Python script that makes it very easy to create and maintain a static blog using markdown files. Once configured, adding a new post is as simple as creating a new markdown file, writing your new post, and running the script.
- Completely static html design with zero JavaScript
- Reactive design that scales to all devices
- Tag system
- Post archive browser
- RSS.xml generation
- Formatting using markdown
- Clone the repository:
git clone https://github.com/VilktorK/DummySimpleBlogGenerator
- Install Dependencies:
pip install markdown Jinja2
- Configure
config.py
:
- Open
config.py
and modify the default settings:
'site_title': 'Your Blog Title'
'site_subtitle': 'Your Blog Subtitle'
'site_url': 'https://yourdomain.com'
- Configuring the header and footer
- The Home, Archive, and Tags pages are created automatically
- By default the only customizable pages are
about.md
andcontact.md
located in the pages directory - To create more pages add a new
nameofnewpagehere.md
file to the pages directory with the same formatting asabout.md
andcontact.md
- To this new page appear in the header, add a new entry to
config.py
like this:
{'url': '/index.html', 'text': 'Home'},
{'url': '/about.html', 'text': 'About'},
{'url': '/nameofnewpagehere.html', 'text': 'My New Page'},
{'url': '/contact.html', 'text': 'Contact'},
{'url': '/archive.html', 'text': 'Archive'},
{'url': '/tags.html', 'text': 'Tags'},
- The
nameofnewpagehere.md
will automatically becomenameofnewpagehere.html
when compiled - New footer entries can be added the same way
- Making a new post
- Add a new post to the post directory like
postname.md
anytime you want to make a new post. - A post must always use this header format for proper indexing:
---
title: My Blog Post Title
date: 2024-10-16
tags: [tagone, tagtwo, tagthree]
---
- Compiling the site
- Simply run
generator.py
and your new blog will be generated in the output folder - To add new posts or pages just add them to their corresponding folder and run
generator.py
again - You can safely delete the contents of the output directory at any time since your site's actual data is stored in the
pages
andposts
directories.
- All formatting is handled by the "markdown" python library.
- https://github.com/Python-Markdown/markdown
- Images do not yet scale with the page
- Code snippets don't scale either, oops