Changeset 70 in code
Legend:
- Unmodified
- Added
- Removed
-
trunk/aya.1
r69 r70 24 24 Removes the generated 25 25 site directory 26 .It serve 27 Serves the .pub 28 directory over 29 HTTP 26 30 .It var 27 31 Print a list of variables 28 32 defined in a given 29 markdown file 33 markdown file, 34 including empty 35 variables. 30 36 .It watch 31 37 (Re-)build a site if 32 any file changed and 33 serve it over HTTP 38 any file changed. 34 39 .El 35 40 .Sh HISTORY 36 41 .Nm 37 was originally forked from prologic/zs by Izuru 38 out of disgust with the latest revision, so he 39 used a earlier commit as a base, and then 42 was originally forked from 43 prologic/zs by Izuru out of disgust 44 with the latest revision, so he used an 45 earlier commit as a base, and then 40 46 eventually reimplemented older features from 41 zserge'soriginal project.47 the original project. 42 48 .Sh AUTHORS 43 49 .Nm … … 45 51 .An Izuru Yakumo 46 52 .Aq Lk https://geidontei.chaotic.ninja/usr/yakumo_izuru/ 53 .Sh BUGS 54 Report them to this mailing list 55 .Mt devel@chaotic.ninja -
trunk/cmd/aya/main.go
r69 r70 1 // $TheSupernovaDuo: cmd/aya/main.go,v 0.6. 0 2023/9/13 07:50:00 yakumo_izuru Exp $1 // $TheSupernovaDuo: cmd/aya/main.go,v 0.6.1 2023/9/16 11:43:00 yakumo_izuru Exp $ 2 2 package main 3 3 … … 363 363 } 364 364 365 // Serve the public directory over HTTP and watch for changes365 // Serve the public directory over HTTP 366 366 func serve() { 367 http.Handle("/", http.FileServer(http.Dir(PUBDIR))) 367 root := http.Dir(PUBDIR) 368 http.Handle("/", http.FileServer(root)) 369 log.Printf("Serving the %s directory over http://localhost:8000. Interrupt with ^C.\n", PUBDIR) 368 370 log.Fatal(http.ListenAndServe(":8000", nil)) 369 371 } … … 379 381 // Print usage notes 380 382 func printUsage() { 381 fmt.Printf("%v <command> [args]\n", os.Args[0]) 383 fmt.Printf("Usage: %s <command> [args]\n", os.Args[0]) 384 fmt.Printf("Where <command> is one of\n") 382 385 fmt.Printf("\n") 383 fmt.Printf("Where <command> is:\n") 384 fmt.Printf("\tbuild\tGenerate site\n") 385 fmt.Printf("\tclean\tRemoves the generated site directory\n") 386 fmt.Printf("\tvar\tQuery variable(s) from a markdown file\n") 387 fmt.Printf("\tversion\tPrint program version and exit\n") 388 fmt.Printf("\twatch\t(Re)generate site while looking for changes (it also serves on HTTP)\n") 389 fmt.Printf("\n") 390 fmt.Printf("Other commands may be dynamically added by plugins found in %v\n", AYADIR) 386 fmt.Printf("\tbuild\t(Re-)builds site or a specific file\n") 387 fmt.Printf("\tclean\trm -rf %s\n", PUBDIR) 388 fmt.Printf("\tserve\tServes the %s directory over HTTP\n", PUBDIR) 389 fmt.Printf("\tvar\tPrint a list of variables defined in a given file, or values of certain variables\n") 390 fmt.Printf("\twatch\t(Re-)builds site and looks for changes\n") 391 391 os.Exit(0) 392 392 } … … 414 414 case "help": 415 415 printUsage() 416 case "serve": 417 serve() 416 418 case "var": 417 419 if len(args) == 0 { … … 439 441 case "watch": 440 442 buildAll(true) 441 serve()442 443 default: 443 444 if s, err := run(globals(), cmd, args...); err != nil { -
trunk/doc.go
r69 r70 1 package aya 1 2 // Package aya is [...] 2 3 … … 18 19 19 20 // Ayaya~ 20 package aya
Note:
See TracChangeset
for help on using the changeset viewer.