diff --git a/README.md b/README.md index 629b658..63b82cd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # jorge A personal (small + opinionated) site generator with [org-mode](https://orgmode.org/) (and markdown) support. -(NOTE: this is stil a WIP, the doc below is a wishlist, not the current behavior.) - ## Installation Download the [latest release binary](https://github.com/facundoolano/jorge/releases/latest) for your platform, for example: @@ -13,46 +11,81 @@ Alternatively, install with go: $ go install github.com/facundoolano/jorge@latest -## Usage +## Example usage + +Create a new website with `jorge init`: ```bash $ jorge init myblog -> site name: My Blog -> author: Facundo Olano -> url: https://myblog.olano.dev +site name: My Blog +site url: https://myblog.olano.dev +author: Facundo Olano +added myblog/.gitignore +added myblog/includes/post_preview.html +added myblog/layouts/base.html +added myblog/layouts/default.html +added myblog/layouts/post.html +added myblog/src/assets/css/main.css +added myblog/src/blog/goodbye-markdown.md +added myblog/src/blog/hello-org.org +added myblog/src/blog/index.html +added myblog/src/blog/tags.html +added myblog/src/feed.xml +added myblog/src/index.html +``` - added myblog/README.md - added myblog/.gitignore - added myblog/config.yml - added myblog/layouts/base.html - added myblog/layouts/post.html - added myblog/src/index.html - added myblog/assets/css/main.css - added myblog/src/blog/hello.org - added myblog/src/feed.xml - added myblog/src/tags.html +This initializes a new project with default configuration, styles and layouts, and a couple of sample posts. +(You can, of course, use a different site structure or just skip the init command altogether). +To preview your site locally, use `jorge serve`: + +```bash $ cd myblog -$ jorge post "My First Post" - added draft src/blog/my-first-post.org - -# serve the site locally with live reload $ jorge serve - server running at http://localhost:4001/ +wrote target/feed.xml +wrote target/blog/goodbye-markdown.html +wrote target/blog/my-first-post.html +wrote target/blog/hello-org.html +wrote target/blog/index.html +wrote target/index.html +wrote target/blog/tags.html +server listening at http://localhost:4001 +``` -# browse to the new post -$ open http://localhost:4001/blog/my-first-post +The site is renders the files found at `src/` in the `target/` directory. +You can add new pages by just adding files to `src/` but, for the common case of adding blog posts, +the `jorge post` creates files with the proper defaults: -# add some content -$ cat >> src/blog/test.org <> src/blog/my-first-post.org <