Find a file
Niklas Fasching 5dadf8c4c2 html: Support pretty relative links
Hugo defaults to serving files with pretty urls [1] - this means
`/posts/foo.org` is served at `/posts/foo/`. This works because servers
default to serving index.html when a directory is specified and hugo renders
the post to `/posts/foo/index.html` instead of `/posts/foo.html`. To make
relative links work we need to (1) remove the fake `foo/` subdirectory from
unrooted links and (2) replace any `.org` suffix with `/`.

[1] https://gohugo.io/content-management/urls/#pretty-urls
2021-01-02 20:48:28 +01:00
.github/workflows Migrate from travisci to github actions 2021-01-02 20:42:59 +01:00
blorg blorg: ignore draft pages 2020-07-24 18:45:22 +02:00
etc Migrate from travisci to github actions 2021-01-02 20:42:59 +01:00
org html: Support pretty relative links 2021-01-02 20:48:28 +01:00
.gitignore Migrate from travisci to github actions 2021-01-02 20:42:59 +01:00
go.mod Setup go.mod 2021-01-02 20:42:16 +01:00
go.sum Setup go.mod 2021-01-02 20:42:16 +01:00
LICENSE Add MIT License 2018-12-20 20:30:14 +01:00
main.go Introduce blorg: MVP static site generator 2020-06-26 18:52:43 +02:00
Makefile Add make preview & update README with basic development instructions 2019-09-22 02:02:32 +02:00
README.org Migrate from travisci to github actions 2021-01-02 20:42:59 +01:00

go-org

An Org mode parser and static site generator in go. Take a look at github pages

https://raw.githubusercontent.com/niklasfasching/go-org/master/etc/example.png

Please note

  • the goal for the html export is to produce sensible html output, not to exactly reproduce the output of org-html-export.
  • the goal for the parser is to support a reasonable subset of Org mode. Org mode is huge and I like to follow the 80/20 rule.

usage

command line

$ go-org
USAGE: org COMMAND [ARGS]
- org render FILE OUTPUT_FORMAT
  OUTPUT_FORMAT: org, html, html-chroma
- org blorg init
- org blorg build
- org blorg serve

as a library

see main.go and hugo org/convert.go

development

  1. make setup install
  2. change things
  3. make preview (regenerates fixtures & shows output in a browser)

in general, have a look at the Makefile - it's short enough.