Update documentation

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/aya/trunk@65 cec141ff-132a-4243-88a5-ce187bd62f94
This commit is contained in:
yakumo.izuru
2023-05-07 13:59:02 +00:00
parent 27df8137c0
commit 9602f872e0
2 changed files with 35 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
// $TheSupernovaDuo: cmd/aya/main.go,v 0.5.x 2023/4/26 8:49:6 yakumo_izuru Exp $
// $TheSupernovaDuo: cmd/aya/main.go,v 0.5.x 2023/5/7 10:57:10 yakumo_izuru Exp $
package main
import (
@@ -300,7 +300,7 @@ func buildRaw(path string, w io.Writer) error {
_, err = io.Copy(w, in)
return err
}
// This function passes the files to build to their corresponding functions
func build(path string, w io.Writer, vars Vars) error {
ext := filepath.Ext(path)
if ext == ".md" || ext == ".mkd" || ext == ".markdown" {
@@ -367,14 +367,14 @@ func servePubDir() {
log.Printf("Serving %v at port 8000, see http://localhost:8000", rootdir)
log.Fatal(http.ListenAndServe(":8000", nil))
}
// Initialize the environment
func init() {
// prepend .aya to $PATH, so plugins will be found before OS commands
p := os.Getenv("PATH")
p = os.Getenv("PWD") + "/" + AYADIR + ":" + p
os.Setenv("PATH", p)
}
// Print usage notes
func printUsage() {
fmt.Printf("%v <command> [args]\n", os.Args[0])
fmt.Printf("\n")