Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
astronomersiva committed Aug 4, 2018
1 parent 8d3b033 commit 2da84e3
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
61 changes: 60 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,60 @@
A custom built static site generator that will one day power [sivasubramanyam.me](https://sivasubramanyam.me) 🏋️‍
A custom built static site generator that powers [sivasubramanyam.me](https://sivasubramanyam.me) 🏋️‍

### Why?

Having written several build tools at work over the last few years, I wanted to try my hands at
rolling out a full featured static site generator. I had been using Flask earlier to run several
applications and I also used that to power my site. Over the years, those applications were
decommissioned but the static site remained. It was getting increasingly difficult to maintain
a static site on Flask and I wanted to see what all it takes to build a static site generator.

This was a great learning experience to be honest.

### Tell me more

* Built with NodeJS.
* Supports Liquid templates.
* Supports minification and uglification of JS and CSS file(with `.browserlist.rc`).
* Does asset revision of CSS and JS files.
* Minifies output HTML.
* Live-reload during development.
* Copies CNAME to `build` directory, so will work with GH Pages.
* Supports including html in md by implementing a custom md syntax. `::: include table.html :::`.

### Directory structure

```
.
├── CNAME
├── README.md
├── layouts
│   ├── post.html // will be used for markdown posts
│   └── tag.html // will be used to generate tag wise listing of posts
├── pages
│   ├── 404.html
│   ├── about.html // each of these will be put under a separate folder in build
│   └── index.html
├── posts
│   ├── post.md
│   ├── another-post.md
└── static
├── css
│   └── styles.css // possible to have sub folders
├── images
└── js
   └── custom-scripts.js
```

### Installation

* Install `npm` and `Node`.
* Run `npm i -g @astronomersiva/lego`.

### Usage

* Run `lego s` to run a server.
* Run `lego` to create an optimised build.

### License

MIT © [Sivasubramanyam A](https://sivasubramanyam.me/)
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "lego",
"name": "@astronomersiva/lego",
"version": "0.0.1",
"description": "A custom built static site generator that will one day power [sivasubramanyam.me](https://sivasubramanyam.me) 🏋️‍",
"main": "index.js",
Expand All @@ -9,6 +9,9 @@
"bin": {
"lego": "bin/lego"
},
"engines": {
"node": ">= 8"
},
"repository": {
"type": "git",
"url": "git+https://github.com/astronomersiva/lego.git"
Expand Down

0 comments on commit 2da84e3

Please sign in to comment.