all repos — vite @ d0c288a583189c3efbe0bc1e387c726578dcfb38

a fast (this time, actually) and minimal static site generator

Add usage instructions to readme
Anirudh Oppiliappan x@icyphox.sh
Fri, 30 Oct 2020 21:55:31 +0530
commit

d0c288a583189c3efbe0bc1e387c726578dcfb38

parent

58fc704075879dde45fb34eeb595c202f953d770

2 files changed, 22 insertions(+), 13 deletions(-)

jump to
M main.gomain.go

@@ -22,28 +22,28 @@ // TODO: make arg parsing less shit

if len(args) <= 1 { fmt.Println(helpStr) - return + return } switch args[1] { case "init": - if len(args) <= 2 { - fmt.Println(helpStr) - return - } + if len(args) <= 2 { + fmt.Println(helpStr) + return + } initPath := args[2] viteInit(initPath) case "build": - _, err := os.Stat("config.yaml") - if err != nil { - return - } + _, err := os.Stat("config.yaml") + if err != nil { + return + } viteBuild() case "new": - if len(args) <= 2 { - fmt.Println(helpStr) - return - } + if len(args) <= 2 { + fmt.Println(helpStr) + return + } newPath := args[2] viteNew(newPath) }
M readmereadme

@@ -15,5 +15,14 @@ # doas make install

Requires `go` to be installed, obviously. +USAGE + + A simple and minimal static site generator. + + options: + init PATH create vite project at PATH + build builds the current project + new PATH create a new markdown post + [1]: https://github.com/icyphox/site