A frontend-only blog platform.
Written with 100% HTML/CSS/JS(jQuery), all you need for this site to work is a httpd
, no matter it's from busybox or apache.
Only about 20KB in size (uncompressed), whole framework is even smaller than the favicon itself!
- A well-working web hosting platform does not exist when you're Chinese and lack of financial support.
- I know GitHub Pages supports Jekyll (and that thing is just awesome!), but I decide to keep my attitude to both Ruby and Python. This post gets the point.
- Here is a similar project, but it's abandoned and I don't like the way it work.
- To block search engines from crawling my posts. That little hashtag in URL does it well.
- Less is more.
Feature | Component |
---|---|
Inspiration | TexMe (Huge thanks!) |
Web hosting | GitHub Pages (without Jekyll) |
Styling | TexMe (base CSS), this page (content appearance) and GitHub (some tweaks) |
Markdown parsing | |
Code highlighting | highlight.js |
Commenting | Gitment (in Chinese) |
Toolbar icons | bytesize-icons |
Misc things | jQuery (aka the javascript life-saver) |
Disclaimer: MIT license means I DO NOT provide any warranty for this platform. Since I designed this thing for personal usage only, I may change ANYTHING at ANYTIME (take a look at commit logs). Think before you fork.
If you decide to create a blog based on this platform, here's a checklist of necessary steps:
- Fork this repo (but not my content repo!)
- Create your own content repo
- Enable GitHub Pages on both repos
- You might want to rename your fork for a shorter URL
- Register an OAuth application for Gitment
- Modify
config.js
:titleSuffix
: String to put after your page titlecontentPath
: Path to your Markdown files on web server, usually/<name of your content repo>
gitment.owner
: Your GitHub usernamegitment.repo
: Name of your content repogitment.oauth
: Client ID & Client Secret of your newly-created OAuth applicationmarked._headingsEx
: True if you want to have a permalink hashtag show on every headingsmarked._extensions
: True if you want to use<pre>
-based extensions (Documentions coming soon)
- Commit your blog frontpage with filename
default.md
onto your content repo - Check if your blog works
Additional steps, if you like:
- Upload a new
favicon.ico
- Change page style via modifying
styles.css
(page style) andhljs.css
(code highlight style) - Minimize all HTML/CSS/JS files (not recommended though)
As mentioned above this is a personal project, but if you've got some shiny ideas just let me know by sending PM or PR.
Whatever you do, here are some rules that you'd better obey:
- Take a look at
TODO.md
. Entries there are what I really wanted/needed to do. - Do not introduce any "fancy" or unworthy feature or code. This platform is born to be lightweight. Less is more.
- If you dislike the idea of building such a blog, then just go. Go find one you like. Don't argue with me.
Is it safe to make my OAuth client secret public?
More questions coming soon