This powers pauldariye.com
, built using micro
and deployed on now
.
The inspiration for this comes from the native behavior you get when deploying
static directories using now
. Under the hood, they make
use of the serve
library.
I reused a lot of the code from this awesome library micro-gallery
. Inspiration also came from @rauchg 's blog and work with the Zeit team.
Check out other awesome things others have built using
micro
.
Install and run:
git clone [email protected]:pauldariye/pd.git
cd pd && yarn
yarn start
Visit http://localhost:3000
Use the single command to deploy with now
.
You may need to install this package on your machine.
now
The entire "app" is one function that routes using the url
property on the req
object. It is as basic as they come.
Every directory in the root
of our site, in my case _pd
is included in the directory listings unless it is blacklisted.
Posts are generated on the fly from any file in a directory with the .md
extension to html
using showdownjs
and injected into the page markup using the template found in ./views/index.hbs
.
Just like @andreasmcdermott 's micro-gallery
lib, I would like to make this a tool available to anyone. The goal is to be able to host a site like mine on pretty much any environment that supports markdown
. Just like my site, you will be able to read your blog posts on GitHub, the web, or any place else. I would like to call it micro-site
.