Skip to content

Blog generator based on github projects with mathjax support

License

Notifications You must be signed in to change notification settings

vvksh/simple-blogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Blogger

This is a simple blog generator which creates a blog based on a user's github projects. It creates a post for each github project and uses the content of project README as post content.

How to create your own blog?

  • Clone this repo
  • Change githubUserName, linkedinUserName, twitterUserName in index.js to yours
  • Modify excluded_repos array in index.js based on your use case
  • Create a github repo: <<your-username>>.github.io
  • Commit changes and push to <<your-username>>.github.io
  • Your blog is live at <<your-username>>.github.io
  • You can also set up custom domain. See github-guide.

Motivation

I trired various blog generators such as Jekyll, Hugo, Ghost, but they seemed to require some maintenance overhead. Plus, for my use case, most of my post would be related to a coding project, so I didn't want to write a project README AND a corresponding "blog" post leading to duplication of work.

I also felt like the blog generators had too many nuts and bolts for my taste. I have tried to keep this project as vanilla as possible using plain javascript, css and html. The only dependencies are - showdownjs, highlight.js and mathjax -> used to render markdown (with code blocks and latex) as html.

Design choices

  • On demand rendering - every page load fetches info from github using their api
  • When a post is clicked, the README content is fetched as markdown text and rendered into HTML
  • Because of on-demand fetching, there is noticeable lag on page load, which is fine for my use case.
  • Uses showdownjs to convert markdown to HTML
  • Uses highlight.js and mathjax to format the code blocks and latex blocks once the markdown is converted to html
  • Excludes forked projects by default
  • Use whitey.css for theme. I took whitey.css from Typora editor
  • Can skip repos if you don't want to create a post for certain projects (eg: unfinished/not-started projects)

To-do

  • Look into latex rendering support Issue #1
  • Add support for non-project posts (don't wanna have to create a repo everytime you have to write a post). I am thinking of adding a special repo- "blog-posts" and fetch all files from that repo as posts. Issue #2
  • [Maybe] Add recent github commits/updates to the project page

About

Blog generator based on github projects with mathjax support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published