Skip to content

Publishing

Ram Kaniyur edited this page Nov 22, 2017 · 8 revisions

So you have a bunch of posts - but Leven's job is to turn them into a website.

1. Build the Website

leven build

This builds your website into the out directory. You can test it by running a static server in there, but that's entirely optional.

2. Deploy to Something

These are a few of the options for deploying your server onto the Internet.

2.1. Deploy to Netlify

This is the simplest place to upload your site. Just drag-and-drop the out folder onto the Netlify app wherever it asks you to (on the homepage for the first deploy, and in the deploy tab for subsequent deploys), and you're done!

2.2. Deploy via Git

This process can be used for Netlify, for GitHub Pages and probably for many other services, too, but it's more involved.

First you'll need to initialize a git repo in your blog directory (not in the out directory).

git init
git remote add origin { your-git-repo }

Then, whenever you want to publish the blog, push the out subtree.

leven build
git add out
git commit -m 'Blog updated.'
git subtree push --prefix out origin master

And with that, your blog should be online!

Clone this wiki locally