Skip to content

cdbaca/ssg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

195 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The copycat ssg

I miss blogging. For the last year, my focus has been learning sql, some data analysis/report writing, and Python for work. This has been fun, but I want/need to work on other aspects of my life too.

While I'm familiar with Blogger, Wordpress, and other CMSs that allow you to just "plug and play", I'm not really interested in the bloat that comes with those systems. So, to combine the programming skills that I've gained, this project is just a small attempt to do something new/different/quirky. And hopefully respark a love of blogging and writing again.

Static site generators are pretty basic. The idea is simple:

  • Have a directory with markdown files
  • Convert those files into HTML, and input that content into a template generator like Jinja
  • Put the index, post files, and static files (like CSS) into the output directory
  • Serve those files up on a server like Github pages or whatever.

There's a ton out there on SSGs. Here are the different tutorials I'm using for guidance:

If you want your own version, you can clone the repository. Obviously, you'd want to delete any posts in the posts directory, and delete the entire 'docs' directory.

From there, to generate a new post, you can run:

python3 post.py "Input Post Title"

After writing your blog post, in that Markdown file (and changing the frontmatter of the post), save the file.

Once it's saved, you should be able to run:

python3 main.py

This will generate the HTML files for the blog, including the index, about, and tags page.

If you're using GitHub pages to host the site, you can simply change the top directory (ssg) to a git repository. Then head over to the settings of the repo in GitHub, click "Pages", and activate GitHub Pages for the repo. More info on that process here.

You can see my own version of this blog here.

Future Goals:

  • Generate a page that is instagram/micro.blog-like which allows me to post pictures
  • Generate a Now page
  • Make an RSS feed

About

A copycat static site generator to own your own data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors