Changeset 84 in code
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.md
r81 r84 20 20 $ go install marisa.chaotic.ninja/aya/cmd/aya@latest (1) 21 21 --- or --- 22 $ git clone https://git.chaotic.ninja/yakumo .izuru/aya22 $ git clone https://git.chaotic.ninja/yakumo_izuru/aya 23 23 $ cd aya 24 24 $ make … … 89 89 90 90 ## Hooks 91 92 91 There are two special plugin names that are executed every time the build 93 92 happens - `prehook` and `posthook`. You can define some global actions here like 94 content generation, or additional commands, like LESS to CSS conversion: 95 96 # .aya/post 97 98 #!/bin/sh 99 lessc < $AYA_OUTDIR/styles.less > $AYA_OUTDIR/styles.css 100 rm -f $AYA_OUTDIR/styles.css 93 content generation, or additional commands, like LESS to CSS conversion 101 94 102 95 Note, you can also place `.gcss` files for [gcss](https://github.com/yosssi/gcss) to process instead 103 96 104 97 ## Command line usage 105 106 `aya build` re-builds your site. 107 108 `aya build <file>` re-builds one file and prints resulting content to stdout. 109 110 `aya serve` serves your site over HTTP. 111 112 `aya var <filename> [var1 var2...]` prints a list of variables defined in the 113 header of a given markdown file, or the values of certain variables (even if 114 it's an empty string). 115 116 `aya watch` rebuilds your site every time you modify any file. 98 Read `aya(1)` 117 99 118 100 ## License 101 The software is distributed under the [MIT/X11](LICENSE) license. 119 102 120 The software is distributed under the MIT/X11 license. 103 ## Sites using Aya! 104 (I know, I made the majority of them, but they still count) 105 106 | Title | Author | Link | 107 |------------------------|--------------------------------------------------|---------------------------------------| 108 | Aya (project homepage) | Izuru Yakumo | https://aya.chaotic.ninja | 109 | Chaotic Ninja | Izuru Yakumo, Mima-sama | https://chaotic.ninja | 110 | Geidontei | Izuru Yakumo | https://geidontei.chaotic.ninja | 111 | ChaoticIRC Network | Izuru Yakumo | https://im.chaotic.ninja | 112 | Kanako | Izuru Yakumo | https://kanako.chaotic.ninja | 113 | Kill-9 The Revival | Various authors | https://kill-9.chaotic.ninja | 114 | PXIMG(7) | Izuru Yakumo | https://pximg.chaotic.ninja | 115 | Shinmyoumaru | Mima-sama | https://shinmyoumaru.chaotic.ninja | 116 | Suika | Izuru Yakumo | https://suika.chaotic.ninja | 117 | TechnicalMarisa | Izuru Yakumo | https://technicalmarisa.chaotic.ninja | 118 | Tengu Space | [DeviousTengu](https://fedi.tengu.space/devious) | https://tengu.space | 119 | WindowMaker Shrine | Izuru Yakumo | https://themes.chaotic.ninja | 121 120 122 121 --- -
trunk/aya.1
r70 r84 4 4 .Sh NAME 5 5 .Nm aya 6 .Nd A really fast static site generator 6 .Nd The fastest static site generator 7 .Sh SYNOPSIS 8 .Nm 9 .Op build 10 .Op clean 11 .Op serve 12 .Op var Ar file Ar variable 13 .Op watch 7 14 .Sh DESCRIPTION 8 15 Does it need one? … … 15 22 .It Easy to learn 16 23 .It Fast (of course) 24 .It Only 4 external dependencies! 17 25 .El 18 26 .Sh USAGE … … 40 48 .Sh HISTORY 41 49 .Nm 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 46 eventually reimplemented older features from 47 the original project. 50 was forked from 51 .Lk https://git.mills.io/prologic/zs 52 due to disgust with how the project 53 turned out to be. 54 Later on, features from the original 55 program were reimplemented and 56 it took a different path from both. 57 .Sh ENVIRONMENT 58 .Bl -tag -width 11n 59 .It Ev AYADIR 60 Directory where 61 extensions, layouts and 62 hooks placed in to be used 63 by the program 64 .It Ev PUBDIR 65 Directory where generated files are 66 located 67 .It Ev AYA_* 68 Internal variables regarding a 69 Markdown document in question, 70 see 71 .Dq aya var <file> 72 .El 73 .Sh EXIT STATUS 74 .Ex -std 48 75 .Sh AUTHORS 49 76 .Nm 50 77 is maintained by 51 78 .An Izuru Yakumo 52 .Aq Lk https://geidontei.chaotic.ninja/usr/yakumo_izuru/ 79 .Aq Mt yakumo.izuru@chaotic.ninja 80 .Pp 81 .Nm zs 82 was made by 83 .An Serge Zaitsev 84 .Aq Mt hello@zserge.com 53 85 .Sh BUGS 54 Report them to this mailing list 55 . Mt devel@chaotic.ninja86 If you find any, please report them to 87 .Aq Mt aya-dev@chaotic.ninja -
trunk/cmd/aya/buildall.go
r80 r84 39 39 modified = true 40 40 } 41 fmt.Println(" build:", path)41 fmt.Println("GEN", path) 42 42 return build(path, nil, vars) 43 43 } -
trunk/cmd/aya/main.go
r82 r84 4 4 import ( 5 5 "fmt" 6 "log" 6 7 "os" 7 8 "strings" … … 40 41 } else if len(args) == 1 { 41 42 if err := build(args[0], os.Stdout, globals()); err != nil { 42 fmt.Println("ERROR: " + err.Error()) 43 os.Exit(1) 43 log.Fatal("[build]" + err.Error()) 44 44 } 45 45 } else { 46 fmt.Println("ERROR: too many arguments") 47 os.Exit(1) 46 log.Fatal("[build] Too many arguments") 48 47 } 49 48 case "clean": 50 fmt.Println(" Removing generated site directory")49 fmt.Println("[clean] Removing generated site directory") 51 50 os.RemoveAll(PUBDIR) 52 51 case "help": … … 56 55 case "var": 57 56 if len(args) == 0 { 58 fmt.Println("var: filename expected") 59 os.Exit(1) 57 log.Fatal("[var] Filename expected") 60 58 } else { 61 59 s := "" 62 60 if vars, _, err := getVars(args[0], Vars{}); err != nil { 63 fmt.Println("var:" + err.Error())61 log.Fatal("[var]" + err.Error()) 64 62 } else { 65 63 if len(args) > 1 { … … 76 74 } 77 75 case "version": 78 fmt.Printf("%v\n", aya.PrintVersion())76 aya.PrintVersion() 79 77 os.Exit(0) 80 78 case "watch": … … 82 80 default: 83 81 if s, err := run(globals(), cmd, args...); err != nil { 84 fmt.Println(err)82 log.Fatal(err) 85 83 } else { 86 84 fmt.Println(s) -
trunk/cmd/aya/raw.go
r79 r84 1 1 // Copy files as-is from source to destination 2 // If there are heavy files, the generation process can slow down 2 3 package main 3 4 -
trunk/doc.go
r77 r84 4 4 // Requires zero configuration to get started 5 5 // Named after Aya Shameimaru from Touhou Project 6 7 // Current subcommands available:8 // build -- Generate the site, result can be found at .pub9 // build [file] -- Only generate the argument passed to standard output10 // serve -- Spawn an HTTP server in localhost port 8000, serving the .pub directory11 // var [file] -- Query variables from a markdown file12 // version -- Print version and exit13 // watch -- (Re)generate site while looking for changes14 6 15 7 // Aya is licensed under the MIT license -
trunk/serve.go
r78 r84 34 34 handler := &Handler{http.FileServer(http.Dir(Dir))} 35 35 http.Handle("/", handler) 36 addr := fmt.Sprintf(" :%d", Port)37 log.Printf(" Listening on %s\n", addr)36 addr := fmt.Sprintf("127.0.0.1:%d", Port) 37 log.Printf("[aya.HttpServe] Listening on %s\n", addr) 38 38 log.Fatal(http.ListenAndServe(addr, nil)) 39 39 } -
trunk/usage.go
r80 r84 9 9 fmt.Printf("aya/%v\n", PrintFullVersion()) 10 10 fmt.Println("Homepage: https://aya.chaotic.ninja") 11 fmt.Println("Repository: https://git.chaotic.ninja/ yakumo.izuru/aya")11 fmt.Println("Repository: https://git.chaotic.ninja/usr/yakumo_izuru/aya") 12 12 fmt.Println("==") 13 13 fmt.Println("build [file] · (Re)build a site or a file in particular")
Note:
See TracChangeset
for help on using the changeset viewer.