Commit graph

19 commits

Author SHA1 Message Date
Kisaragi Hiu
ab8d3bc16a
highlight: support highlighting lines in the default writer
The hl_lines key is specifically the same as Hugo's key.
2022-07-18 03:56:15 +09:00
Kisaragi Hiu
9b56fc914c
highlight: Expose node params so we can pass options to Chroma 2022-07-18 03:51:04 +09:00
Niklas Fasching
67951ec664 Update chroma: v0.10.0 -> v2 2022-05-30 17:31:54 +02:00
Niklas Fasching
7344ea2e86 Add version flag
go 1.18 embeds vcs info into binaries by default [1] allowing us to provide a
rudimentary version cmd in just a few lines. (version) vcs tags are not
embedded for now - just the commit hash should be good enough for now though.

[1] https://tip.golang.org/doc/go1.18
2022-03-27 01:20:09 +01:00
Niklas Fasching
f2286d48ff cli: Fix support for reading input from stdin - prefer file input
Apparently that way of detecting data on stdin is not really fool
proof. Instead of improving that let's just swap the order and look for a file
first. yolo.
2021-12-26 23:25:30 +01:00
Niklas Fasching
c82b26b540 cli: Support reading input from stdin 2021-12-26 23:17:19 +01:00
Niklas Fasching
703066682e Update to go v1.16 and embed more extensive default blorg.org
Instead of the bare bones default config we embedded as a string until now we
can use go 1.16 embed to embed the test blorg.org which makes a much better
starting config (if only to see what's possible).
2021-03-01 14:10:34 +01:00
Niklas Fasching
02df432d76 Refactor main cmd: Improve error messages and code layout 2021-01-23 20:50:57 +01:00
Niklas Fasching
30dd2794cf Introduce blorg: MVP static site generator
hugo is nice - but it's huge. I've never built a static site generator before
and thought the world could use one more - it's not like there's already enough
choice out there!

No, but seriously. I love hugo and it has all the bells and whistles and you
should definitely use that and not this. I just like reinventing the wheel to
learn about stuff - and I like the 80/20 rule. This gives like 60% of what I
want already and is tiny fraction of hugo in terms of LOC (hugo without it's
bazillion dependencies is like 80k+ - this is like 500 and very likely won't
ever grow above let's say 5k).

Also org mode is awesome and why not use it as a configuration format as
well. Let's see where this goes. YOLO.
2020-06-26 18:52:43 +02:00
Niklas Fasching
3018ace8d0 Implement inline source blocks
https://orgmode.org/manual/Structure-of-Code-Blocks.html
2020-04-16 14:58:13 +02:00
Niklas Fasching
56ecb2d401 Add some documentation & split Document into Configuration+Document 2019-01-02 19:17:17 +01:00
Niklas Fasching
c26d39284c Improve main.go: log error to stderr, output to stdout 2018-12-18 23:53:32 +01:00
Niklas Fasching
2947d7632d Support basic #+INCLUDE (src/example/export block only)
including org files is more complex - e.g. footnotes need to be namespaced to
their source file. org does this by prefixing each included files footnotes
with a number - but even that is not enough as it doesn't guarantee
uniqueness.

As I don't have a usecase for it, I'll avoid the additional complexity for
now.
2018-12-14 17:09:00 +01:00
Niklas Fasching
04df30a7b5 Convert panics to errors for public interface 2018-12-14 16:37:32 +01:00
Niklas Fasching
b1a03e2d27 Make highlightCodeBlock render enclosing div tags on separate lines 2018-12-11 16:09:39 +01:00
Niklas Fasching
9826aa2143 Add make target to automatically regenerate html fixtures
After changing something the fixtures need to be updated to reflect the new
output. This just moves those steps from my bash history to make.
2018-12-11 15:42:41 +01:00
Niklas Fasching
8cefd9fabc Set up github pages 2018-12-11 15:42:41 +01:00
Niklas Fasching
6adad92e8b Update main.go: Log to stdout & support both html and html-chroma
Could be moved into a flag but I'll significantly refactor the main.go later on
anyways - for now this works TM
2018-12-11 14:42:05 +01:00
Niklas Fasching
fc982125c9 Restructure directory layout: org subpackage 2018-12-02 18:37:55 +01:00
Renamed from cmd/org/org.go (Browse further)