Jorge – minimal site generator with Markdown and org-mode support

facundo_olano1 pts0 comments

GitHub - facundoolano/jorge: A personal site generator with org-mode support · GitHub

/" data-turbo-transient="true" />

Skip to content

Type / to search

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

facundoolano

jorge

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star<br>71

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>202 Commits<br>202 Commits

.github/workflows

.github/workflows

commands

commands

config

config

docs

docs

markup

markup

site

site

.gitignore

.gitignore

LICENSE

LICENSE

Makefile

Makefile

README.md

README.md

go.mod

go.mod

go.sum

go.sum

main.go

main.go

View all files

Repository files navigation

jorge

A personal (small + opinionated) site generator with org-mode (and markdown) support.

Installation

Download the latest release binary for your platform, for example:

$ wget https://github.com/facundoolano/jorge/releases/latest/download/jorge-darwin-amd64 \<br>-O jorge && chmod +x jorge && sudo mv jorge /usr/local/bin

Alternatively, install with go (make sure that $GOPATH/bin is in your path):

$ go install github.com/facundoolano/jorge@latest

ArchLinux users can use an AUR helper, such as yay, to install jorge directly from AUR:

$ yay -S jorge

Example usage

Create a new website with jorge init:

$ jorge init myblog<br>site name: My Blog<br>site url: https://myblog.olano.dev<br>author: Facundo Olano<br>added myblog/.gitignore<br>added myblog/includes/post_preview.html<br>added myblog/layouts/base.html<br>added myblog/layouts/default.html<br>added myblog/layouts/post.html<br>added myblog/src/assets/css/main.css<br>added myblog/src/blog/goodbye-markdown.md<br>added myblog/src/blog/hello-org.org<br>added myblog/src/blog/index.html<br>added myblog/src/blog/tags.html<br>added myblog/src/feed.xml<br>added myblog/src/index.html

This initializes a new project with default configuration, styles and layouts, and a couple of sample posts.<br>(You can, of course, use a different site structure or just skip the init command altogether).

To preview your site locally, use jorge serve:

$ cd myblog<br>$ jorge serve<br>wrote target/feed.xml<br>wrote target/blog/goodbye-markdown/index.html<br>wrote target/blog/my-first-post/index.html<br>wrote target/blog/hello-org/index.html<br>wrote target/blog/index.html<br>wrote target/index.html<br>wrote target/blog/tags/index.html<br>serving at http://localhost:4001

The site is renders the files found at src/ in the target/ directory.<br>You can add new pages by just adding files to src/ but, for the common case of adding blog posts,<br>the jorge post creates files with the proper defaults:

$ jorge post "My First Post"<br>added src/blog/my-first-post.org<br>$ cat src/blog/my-first-post.org<br>title: My First Post<br>date: 2024-02-21 13:39:59<br>layout: post<br>lang: en<br>tags: []<br>draft: true<br>#+OPTIONS: toc:nil num:nil<br>#+LANGUAGE: en

(Posts are created as .org files by default, but you can chage it to prefer markdown or another text format).

If you still have jorge serve running, you can see the new post by browsing to http://localhost:4001/blog/my-first-post. You can then add some content and the browser tab will automatically refresh to reflect your changes:

> src/blog/my-first-post.org $ cat >> src/blog/my-first-post.org EOF<br>*** Hello world!

this is my *first* post.<br>EOF

Posts created with jorge post are drafts by default. Remove the draft: true to mark it ready for publication:

$ sed -i '' '/^draft: true$/d' src/blog/my-first-post.org

Finally, you can render a minified version of your site with jorge build:

$ jorge build<br>wrote target/index.html<br>wrote target/assets/css/main.css<br>wrote target/blog/hello/index.html<br>wrote target/blog/my-first-post/index.html<br>wrote target/feed.xml<br>wrote target/tags/index.html

And that's about it. For more details see the:

Tutorial

Development blog

Built with jorge

jorge docs

olano.dev

porracin.com

toostveen.nl

Acknowledgements

jorge started as a Go learning project and was largely inspired by Jekyll. Most of the heavy lifting is done by external libraries:

osteele/liquid to render liquid templates. Some Jekyll-specific filters were copied from osteele/gojekyll.

niklasfasching/go-org to render org-mode files as HTML.

yuin/goldmark to render Markdown as HTML.

go-yaml to parse YAML files and template headers.

tdewolff/minify to minify HTML, CSS, XML and JavaScript files.

About<br>A personal site generator with org-mode support<br>jorge.olano.dev/<br>Resources<br>Readme<br>GPL-3.0 license<br>Activity<br>Stars<br>71 stars<br>Watchers<br>3 watching<br>Forks<br>7 forks<br>Report repository

Releases

Packages

Used by

Contributors

Languages

You can’t perform that action at this time.

jorge blog html post myblog target

Related Articles