dannyvankooten / gozer Goto Github PK
View Code? Open in Web Editor NEWFast, opinionated and simple static site generator in a single static binary.
License: MIT License
Fast, opinionated and simple static site generator in a single static binary.
License: MIT License
Hi, when running gozer -h
or gozer --help
I get:
Usage of ./gozer:
-c string
(default "config.toml")
-config string
(default "config.toml")
-r string
-root string
Which seems to be an automatically generated help text. When I run gozer
(no arguments) I get a more useful help text:
Gozer - a fast & simple static site generator
Usage: gozer [OPTIONS] <COMMAND>
Commands:
build Deletes the output directory if there is one and builds the site
serve Builds the site and starts an HTTP server on http://localhost:8080
new Creates a new site structure in the given directory
Options:
-r, --root <ROOT> Directory to use as root of project (default: .)
-c, --config <CONFIG> Path to configuration file (default: config.toml)
go version: go1.21.4 linux/amd64
Are you accepting contributions? If so, I would be happy to take a stab at implementing this if its something you would like added.
P.S. I saw your reddit post about this project and thought it looked cool! I'm working on setting up my blog using gozer and have enjoyed it so far <3
Is it possible to do server-side syntax highlighting on markdown codeblocks, or would you recommend I use another project on-top to edit the generated static site?
Hi Danny,
I found that gozer build
panics after removing the public/
directory
$ gozer build
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x8402fe]
goroutine 1 [running]:
main.copyFile({0x8f3c44, 0x6}, {0x0, 0x0}, {0x8f28f1, 0x5})
/home/user/code/gozer/fs.go:48 +0x5e
main.buildSite.copyDirRecursively.func2({0x8f3c44, 0x6}, {0x0, 0x0}, {0x4fa025?, 0x8f3c44?})
/home/user/code/gozer/fs.go:79 +0x7d
path/filepath.WalkDir({0x8f3c44, 0x6}, 0xc00033fcb8)
/home/user/go/pkg/mod/golang.org/[email protected]/src/path/filepath/path.go:530 +0x4a
main.copyDirRecursively(...)
/home/user/code/gozer/fs.go:77
main.buildSite({0x0, 0x0}, {0x8f8fa6, 0xb})
/home/user/code/gozer/gozer.go:508 +0x829
main.main()
/home/user/code/gozer/gozer.go:415 +0x3d2
Steps to reproduce:
$ gozer new # Create new gozer project
$ rm -r public/ # Remove `public/`
$ gozer build # panics
This seems to be related to the WalkDirFunc
callback in filepath.WalkDir()
. The docs describe how the err
argument in WalkDirFunc
can be non-nil in some cases.
I stumbled upon this after accidentally removing my public
directory so definitely user error on this one haha! Happy to post a PR with a fix to log the error instead of panicking if that would be alright.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.