Verify your installation:

$ wb

Writer's Block


    wb [command]

Available commands:

    wb new [layout_root]
    wb gen [layout_root] [build_root] [target_domain]


    wb new my-wiki
    wb gen my-wiki /tmp/my-wiki-dev # and navigate to file:///tmp/my-wiki-dev/index.html
    wb gen my-wiki /tmp/my-wiki-prod

Create your first site

You can now create your first site.

We’ll create a new Layout Root in my-wiki directory.

$ wb new my-wiki

⚠️ You can run wb new on your existing markdown files directory. It won’t override anything, only copy the default templates to your Layout Root and this is all you need to generate the site.

The next step is to drop your markdown files into my-wiki directory and generate the HTML site in some Build root, for example /tmp/my-wiki-dev:

$ wb gen my-wiki /tmp/my-wiki-dev

You can now visit /tmp/my-wiki-dev/index.html file in your browser to get started.


Because wb comes with no built-in development server by design, you can automate your site generation using the standard unix tools, for example:

$ while true; do
wb gen my-wiki /tmp/my-wiki-dev && sleep 1

🙀 But I really want to run a web server locally!

Use one, use any. E.g. you can run python -m http.server in your Build root. Just make sure the generated site refers to the fully qualified URL you’re serving it from, in this case (see the third argument desciption in the section below).

Generate for the internets

If you wish to deploy your site, you need to provide wb gen with a third argument - domain that will designate the deployment target URL. All the links wb generates will be prefixed with it.

$ wb gen my-wiki /tmp/my-wiki-prod

It is up to you to choose your preferred method of deployment. For example, if you have a VPS with SSH access you can use rsync:

rsync -avz -e ssh /tmp/my-wiki my-vps:/home/weberver/my-wiki/

That’s it, enjoy.


Improve this page

fingerprint aafa982b -- generated for at 2021-05-02 11:16:15.048859Z