Index: trunk/Makefile
===================================================================
--- trunk/Makefile	(revision 79)
+++ trunk/Makefile	(revision 80)
@@ -1,5 +1,7 @@
 DESTDIR ?= 
-GOFLAGS ?= -v -buildvcs=false -mod=vendor -buildmode=exe
+GOFLAGS ?= -v -buildvcs=false -mod=vendor -buildmode=exe -ldflags "-w -X `go list`.Date=${DATE} -X `go list`.Vendor=${GOOS} -X `go list`.Version=${VERSION}"
 PREFIX ?= /usr/local
+DATE ?= `date -u +%F`
+GOOS ?= `go env GOOS`
 VERSION ?= `git describe --tags`
 
Index: trunk/README.md
===================================================================
--- trunk/README.md	(revision 79)
+++ trunk/README.md	(revision 80)
@@ -18,5 +18,5 @@
 Build it manually assuming you have Go (>=1.17) installed:
 
-	$ go install marisa.chaotic.ninja/aya/cmd/aya@latest
+	$ go install marisa.chaotic.ninja/aya/cmd/aya@latest (1)
 	--- or ---
 	$ git clone https://git.chaotic.ninja/yakumo.izuru/aya
@@ -24,8 +24,11 @@
 	$ make
 	# make install
-	
+
+(1) If you use this method, the `aya version` subcommand may print the wrong string,
+but it should not be a problem unless you use it on a page.
+
 ## Ideology
 
-Keep your texts in markdown, or HTML format right in the main directory
+Keep your texts in markdown, [amber](https://github.com/eknkc/amber), or html format right in the main directory
 of your blog/site.
 
@@ -33,11 +36,13 @@
 in the `.aya` subdirectory.
 
-Define variables in the header of the content files using [YAML]:
+Define variables in the header of the content files using [YAML](https://www.yaml.io) :
 
-	title: My web site
-	keywords: best website, hello, world
-	---
+```markdown
+title: My web site
+keywords: best website, hello, world
+---
 
-	Markdown text goes after a header *separator*
+Markdown text goes after a header *separator*
+```
 
 Use placeholders for variables and plugins in your markdown or html
@@ -47,8 +52,9 @@
 subdiretory.
 
-Everything the extensions prints to stdout becomes the value of the
+Everything the extensions prints to [stdout](https://man.freebsd.org/cgi/man.cgi?fd) becomes the value of the
 placeholder.
 
-Every variable from the content header will be passed via environment variables like `title` becomes `$AYA_TITLE` and so on. There are some special variables:
+Every variable from the content header will be passed via environment variables like `title` becomes `$AYA\_TITLE` and so on. 
+There are some special variables:
 
 * `$AYA` - a path to the `aya` executable
@@ -94,8 +100,5 @@
 	rm -f $AYA_OUTDIR/styles.css
 
-## Extras
-
-`aya` also supports generating `.html` and `.css` by means of using `.amber`
-and `.gcss` files. See more at [eknkc/amber](https://github.com/eknkc/amber) [yosssi/gcss](https://github.com/yosssi/gcss)
+Note, you can also place `.gcss` files for [gcss](https://github.com/yosssi/gcss) to process instead
 
 ## Command line usage
Index: trunk/cmd/aya/build.go
===================================================================
--- trunk/cmd/aya/build.go	(revision 80)
+++ trunk/cmd/aya/build.go	(revision 80)
@@ -0,0 +1,23 @@
+// This function passes the files to build to their corresponding functions
+// As far as I'm aware, Markdown has three possible filename extensions,
+// but .md is the most common one known.
+package main
+
+import (
+	"io"
+	"path/filepath"
+)
+func build(path string, w io.Writer, vars Vars) error {
+        ext := filepath.Ext(path)
+        if ext == ".md" || ext == ".mkd" || ext == ".markdown" {
+                return buildMarkdown(path, w, vars)
+        } else if ext == ".htm" || ext == ".html" || ext == ".xht" || ext == ".xhtml" {
+                return buildHTML(path, w, vars)
+        } else if ext == ".amber" {
+                return buildAmber(path, w, vars)
+        } else if ext == ".gcss" {
+                return buildGCSS(path, w)
+        } else {
+                return buildRaw(path, w)
+        }
+}
Index: trunk/cmd/aya/buildall.go
===================================================================
--- trunk/cmd/aya/buildall.go	(revision 80)
+++ trunk/cmd/aya/buildall.go	(revision 80)
@@ -0,0 +1,57 @@
+// Build everything and store it on PUBDIR
+// If boolean watch is true, it keeps on going
+// every time you modify something.
+package main
+
+import (
+	"fmt"
+	"os"
+	"path/filepath"
+	"strings"
+	"time"
+)
+
+func buildAll(watch bool) {
+        lastModified := time.Unix(0, 0)
+        modified := false
+
+        vars := globals()
+        for {
+                os.Mkdir(PUBDIR, 0755)
+                filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
+                        // ignore hidden files and directories
+                        if filepath.Base(path)[0] == '.' || strings.HasPrefix(path, ".") {
+                                return nil
+                        }
+                        // inform user about fs walk errors, but continue iteration
+                        if err != nil {
+                                fmt.Println("error:", err)
+                                return nil
+                        }
+
+                        if info.IsDir() {
+ os.Mkdir(filepath.Join(PUBDIR, path), 0755)
+                                return nil
+                        } else if info.ModTime().After(lastModified) {
+                                if !modified {
+                                        // First file in this build cycle is about to be modified
+                                        run(vars, "prehook")
+                                        modified = true
+                                }
+                                fmt.Println("build:", path)
+                                return build(path, nil, vars)
+                        }
+                        return nil
+                })
+                if modified {
+                        // At least one file in this build cycle has been modified
+                        run(vars, "posthook")
+                        modified = false
+                }
+                if !watch {
+                        break
+                }
+                lastModified = time.Now()
+                time.Sleep(1 * time.Second)
+        }
+}
Index: trunk/cmd/aya/getvars.go
===================================================================
--- trunk/cmd/aya/getvars.go	(revision 80)
+++ trunk/cmd/aya/getvars.go	(revision 80)
@@ -0,0 +1,64 @@
+// getVars returns list of variables defined in a text file and actual file
+// content following the variables declaration. Header is separated from
+// content by an empty line. Header is in YAML
+// If no empty newline is found - file is treated as content-only.
+package main
+
+import (
+	"fmt"
+	"os"
+	"path/filepath"
+	"strings"
+	"gopkg.in/yaml.v3"
+)
+
+func getVars(path string, globals Vars) (Vars, string, error) {
+	b, err := os.ReadFile(path)
+	if err != nil {
+		return nil, "", err
+	}
+	s := string(b)
+
+	// Pick some default values for content-dependent variables
+	v := Vars{}
+	title := strings.Replace(strings.Replace(path, "_", " ", -1), "-", " ", -1)
+	v["title"] = strings.ToTitle(title)
+	v["description"] = ""
+	v["file"] = path
+	v["url"] = path[:len(path)-len(filepath.Ext(path))] + ".html"
+	v["output"] = filepath.Join(PUBDIR, v["url"])
+
+	// Override default values with globals
+	for name, value := range globals {
+		v[name] = value
+	}
+	// Add a layout if none is specified
+	// For this to work, the layout must be available
+	// in AYADIR
+	if _, ok := v["layout"]; !ok {
+		v["layout"] = "layout.html"
+	}
+	
+	delim := "\n---\n"
+	if sep := strings.Index(s, delim); sep == -1 {
+		return v, s, nil
+	} else {
+		header := s[:sep]
+		body := s[sep+len(delim):1]
+
+		vars := Vars{}
+		if err := yaml.Unmarshal([]byte(header), &vars); err != nil {
+			fmt.Println("ERROR: Failed to parse header", err)
+			return nil, "", err
+		} else {
+			// Override default values and globals with the ones defined in the file
+			for key, value := range vars {
+				v[key] = value
+			}
+		}
+		if strings.HasPrefix(v["url"], "./") {
+			v["url"] = v["url"][2:]
+		}
+		return v, body, nil
+	}
+}
Index: trunk/cmd/aya/globals.go
===================================================================
--- trunk/cmd/aya/globals.go	(revision 80)
+++ trunk/cmd/aya/globals.go	(revision 80)
@@ -0,0 +1,19 @@
+// globals returns list of global OS environment variables that start
+// with AYA_ prefix as Vars, so the values can be used inside templates
+package main
+
+import (
+	"os"
+	"strings"
+)
+
+func globals() Vars {
+        vars := Vars{}
+        for _, e := range os.Environ() {
+                pair := strings.Split(e, "=")
+                if strings.HasPrefix(pair[0], "AYA_") {
+                        vars[strings.ToLower(pair[0][3:])] = pair[1]
+                }
+        }
+        return vars
+}
Index: trunk/cmd/aya/main.go
===================================================================
--- trunk/cmd/aya/main.go	(revision 79)
+++ trunk/cmd/aya/main.go	(revision 80)
@@ -1,16 +1,10 @@
-// $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.7.0 2023-12-11 17:22:51+0000, yakumo_izuru Exp $
+// $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v1.0.0 2023-12-12 13:44:23+0000, yakumo_izuru Exp $
 package main
 
 import (
-	"bytes"
 	"fmt"
-	"io"
 	"os"
-	"os/exec"
-	"path/filepath"
 	"strings"
-	"time"
 
-	"gopkg.in/yaml.v3"
 	"marisa.chaotic.ninja/aya"
 )
@@ -23,217 +17,4 @@
 
 type Vars map[string]string
-
-// renameExt renames extension (if any) from oldext to newext
-// If oldext is an empty string - extension is extracted automatically.
-// If path has no extension - new extension is appended
-func renameExt(path, oldext, newext string) string {
-	if oldext == "" {
-		oldext = filepath.Ext(path)
-	}
-	if oldext == "" || strings.HasSuffix(path, oldext) {
-		return strings.TrimSuffix(path, oldext) + newext
-	}
-	return path
-}
-
-// globals returns list of global OS environment variables that start
-// with AYA_ prefix as Vars, so the values can be used inside templates
-func globals() Vars {
-	vars := Vars{}
-	for _, e := range os.Environ() {
-		pair := strings.Split(e, "=")
-		if strings.HasPrefix(pair[0], "AYA_") {
-			vars[strings.ToLower(pair[0][3:])] = pair[1]
-		}
-	}
-	return vars
-}
-
-// run executes a command or a script. Vars define the command environment,
-// each aya var is converted into OS environemnt variable with AYA_ prefix
-// prepended.  Additional variable $AYA contains path to the aya binary. Command
-// stderr is printed to aya stderr, command output is returned as a string.
-func run(vars Vars, cmd string, args ...string) (string, error) {
-	// First check if partial exists (.html)
-	if b, err := os.ReadFile(filepath.Join(AYADIR, cmd+".html")); err == nil {
-		return string(b), nil
-	}
-
-	var errbuf, outbuf bytes.Buffer
-	c := exec.Command(cmd, args...)
-	env := []string{"AYA=" + os.Args[0], "AYA_OUTDIR=" + PUBDIR}
-	env = append(env, os.Environ()...)
-	for k, v := range vars {
-		env = append(env, "AYA_"+strings.ToUpper(k)+"="+v)
-	}
-	c.Env = env
-	c.Stdout = &outbuf
-	c.Stderr = &errbuf
-
-	err := c.Run()
-
-	if errbuf.Len() > 0 {
-		fmt.Println("ERROR:", errbuf.String())
-	}
-	if err != nil {
-		return "", err
-	}
-	return string(outbuf.Bytes()), nil
-}
-
-// getVars returns list of variables defined in a text file and actual file
-// content following the variables declaration. Header is separated from
-// content by an empty line. Header can be either YAML or JSON.
-// If no empty newline is found - file is treated as content-only.
-func getVars(path string, globals Vars) (Vars, string, error) {
-	b, err := os.ReadFile(path)
-	if err != nil {
-		return nil, "", err
-	}
-	s := string(b)
-
-	// Pick some default values for content-dependent variables
-	v := Vars{}
-	title := strings.Replace(strings.Replace(path, "_", " ", -1), "-", " ", -1)
-	v["title"] = strings.ToTitle(title)
-	v["description"] = ""
-	v["file"] = path
-	v["url"] = path[:len(path)-len(filepath.Ext(path))] + ".html"
-	v["output"] = filepath.Join(PUBDIR, v["url"])
-
-	// Override default values with globals
-	for name, value := range globals {
-		v[name] = value
-	}
-
-	// Add layout if none is specified
-	if _, ok := v["layout"]; !ok {
-		v["layout"] = "layout.html"
-	}
-
-	delim := "\n---\n"
-	if sep := strings.Index(s, delim); sep == -1 {
-		return v, s, nil
-	} else {
-		header := s[:sep]
-		body := s[sep+len(delim):]
-
-		vars := Vars{}
-		if err := yaml.Unmarshal([]byte(header), &vars); err != nil {
-			fmt.Println("ERROR: failed to parse header", err)
-			return nil, "", err
-		} else {
-			// Override default values + globals with the ones defines in the file
-			for key, value := range vars {
-				v[key] = value
-			}
-		}
-		if strings.HasPrefix(v["url"], "./") {
-			v["url"] = v["url"][2:]
-		}
-		return v, body, nil
-	}
-}
-
-// Render expanding aya plugins and variables
-func render(s string, vars Vars) (string, error) {
-	delimOpen := "{{"
-	delimClose := "}}"
-
-	out := &bytes.Buffer{}
-	for {
-		if from := strings.Index(s, delimOpen); from == -1 {
-			out.WriteString(s)
-			return out.String(), nil
-		} else {
-			if to := strings.Index(s, delimClose); to == -1 {
-				return "", fmt.Errorf("Closing delimiter not found")
-			} else {
-				out.WriteString(s[:from])
-				cmd := s[from+len(delimOpen) : to]
-				s = s[to+len(delimClose):]
-				m := strings.Fields(cmd)
-				if len(m) == 1 {
-					if v, ok := vars[m[0]]; ok {
-						out.WriteString(v)
-						continue
-					}
-				}
-				if res, err := run(vars, m[0], m[1:]...); err == nil {
-					out.WriteString(res)
-				} else {
-					fmt.Println(err)
-				}
-			}
-		}
-	}
-
-}
-
-// This function passes the files to build to their corresponding functions
-// As far as I'm aware, Markdown has three possible filename extensions,
-// but .md is the most common one known.
-func build(path string, w io.Writer, vars Vars) error {
-	ext := filepath.Ext(path)
-	if ext == ".md" || ext == ".mkd" || ext == ".markdown" {
-		return buildMarkdown(path, w, vars)
-	} else if ext == ".htm" || ext == ".html" || ext == ".xht" || ext == ".xhtml" {
-		return buildHTML(path, w, vars)
-	} else if ext == ".amber" {
-		return buildAmber(path, w, vars)
-	} else if ext == ".gcss" {
-		return buildGCSS(path, w)
-	} else {
-		return buildRaw(path, w)
-	}
-}
-
-// Build everything and store it on PUBDIR
-// If boolean watch is true, it keeps on going
-// every time you modify something.
-func buildAll(watch bool) {
-	lastModified := time.Unix(0, 0)
-	modified := false
-
-	vars := globals()
-	for {
-		os.Mkdir(PUBDIR, 0755)
-		filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
-			// ignore hidden files and directories
-			if filepath.Base(path)[0] == '.' || strings.HasPrefix(path, ".") {
-				return nil
-			}
-			// inform user about fs walk errors, but continue iteration
-			if err != nil {
-				fmt.Println("error:", err)
-				return nil
-			}
-
-			if info.IsDir() {
-				os.Mkdir(filepath.Join(PUBDIR, path), 0755)
-				return nil
-			} else if info.ModTime().After(lastModified) {
-				if !modified {
-					// First file in this build cycle is about to be modified
-					run(vars, "prehook")
-					modified = true
-				}
-				fmt.Println("build:", path)
-				return build(path, nil, vars)
-			}
-			return nil
-		})
-		if modified {
-			// At least one file in this build cycle has been modified
-			run(vars, "posthook")
-			modified = false
-		}
-		if !watch {
-			break
-		}
-		lastModified = time.Now()
-		time.Sleep(1 * time.Second)
-	}
-}
 
 // Initialize the environment
@@ -295,5 +76,5 @@
 		}
 	case "version":
-		fmt.Printf("%v\n", aya.FullVersion())
+		fmt.Printf("%v\n", aya.PrintVersion())
 		os.Exit(0)
 	case "watch":
Index: trunk/cmd/aya/renameext.go
===================================================================
--- trunk/cmd/aya/renameext.go	(revision 80)
+++ trunk/cmd/aya/renameext.go	(revision 80)
@@ -0,0 +1,19 @@
+// renameExt renames extension (if any) from oldext to newext
+// If oldext is an empty string - extension is extracted automatically.
+// If path has no extension - new extension is appended
+package main
+
+import (
+	"path/filepath"
+	"strings"
+)
+
+func renameExt(path, oldext, newext string) string {
+        if oldext == "" {
+                oldext = filepath.Ext(path)
+        }
+        if oldext == "" || strings.HasSuffix(path, oldext) {
+                return strings.TrimSuffix(path, oldext) + newext
+        }
+        return path
+}
Index: trunk/cmd/aya/render.go
===================================================================
--- trunk/cmd/aya/render.go	(revision 80)
+++ trunk/cmd/aya/render.go	(revision 80)
@@ -0,0 +1,42 @@
+// Render expanding aya plugins and variables
+package main
+
+import (
+	"bytes"
+	"fmt"
+	"strings"
+)
+
+func render(s string, vars Vars) (string, error) {
+        delimOpen := "{{"
+        delimClose := "}}"
+
+        out := &bytes.Buffer{}
+        for {
+                if from := strings.Index(s, delimOpen); from == -1 {
+                        out.WriteString(s)
+                        return out.String(), nil
+                } else {
+                        if to := strings.Index(s, delimClose); to == -1 {
+                                return "", fmt.Errorf("Closing delimiter not found")
+                        } else {
+                                out.WriteString(s[:from])
+                                cmd := s[from+len(delimOpen) : to]
+                                s = s[to+len(delimClose):]
+                                m := strings.Fields(cmd)
+                                if len(m) == 1 {
+                                        if v, ok := vars[m[0]]; ok {
+                                                out.WriteString(v)
+                                                continue
+                                        }
+                                }
+                                if res, err := run(vars, m[0], m[1:]...); err == nil {
+                                        out.WriteString(res)
+                                } else {
+                                        fmt.Println(err)
+                                }
+                        }
+                }
+        }
+
+}
Index: trunk/cmd/aya/run.go
===================================================================
--- trunk/cmd/aya/run.go	(revision 80)
+++ trunk/cmd/aya/run.go	(revision 80)
@@ -0,0 +1,42 @@
+// run() executes a command or a script. 
+// Vars define the command environment, each aya var is converted into OS environment variable with AYA_ prefix prepended.
+// Additional variable $AYA contains path to the aya binary.
+// Command stderr(4) is printed to aya stderr(4), command stdout(4) is returned as a string
+package main
+
+import (
+	"bytes"
+	"fmt"
+	"os"
+	"os/exec"
+	"path/filepath"
+	"strings"
+)
+
+func run(vars Vars, cmd string, args ...string) (string, error) {
+        // First check if partial exists (.html)
+        if b, err := os.ReadFile(filepath.Join(AYADIR, cmd+".html")); err == nil {
+                return string(b), nil
+        }
+
+        var errbuf, outbuf bytes.Buffer
+        c := exec.Command(cmd, args...)
+        env := []string{"AYA=" + os.Args[0], "AYA_OUTDIR=" + PUBDIR}
+        env = append(env, os.Environ()...)
+        for k, v := range vars {
+                env = append(env, "AYA_"+strings.ToUpper(k)+"="+v)
+        }
+        c.Env = env
+        c.Stdout = &outbuf
+        c.Stderr = &errbuf
+
+        err := c.Run()
+
+        if errbuf.Len() > 0 {
+                fmt.Println("ERROR:", errbuf.String())
+        }
+        if err != nil {
+                return "", err
+        }
+        return string(outbuf.Bytes()), nil
+}
Index: trunk/usage.go
===================================================================
--- trunk/usage.go	(revision 79)
+++ trunk/usage.go	(revision 80)
@@ -7,5 +7,5 @@
 // This function is called by the `aya help` subcommand
 func PrintUsage() {
-	fmt.Printf("aya/%v\n", FullVersion())
+	fmt.Printf("aya/%v\n", PrintFullVersion())
 	fmt.Println("Homepage: https://aya.chaotic.ninja")
 	fmt.Println("Repository: https://git.chaotic.ninja/yakumo.izuru/aya")
Index: trunk/version.go
===================================================================
--- trunk/version.go	(revision 79)
+++ trunk/version.go	(revision 80)
@@ -4,18 +4,20 @@
 import (
 	"fmt"
-	"time"
 )
 
 var (
-	// Set to current tag
-	Version = "v0.7.0"
-	Time = time.Now()
+	// Variables set at build-time
+	Date string
+	Vendor string
+	Version string
 )
 
-// FullVersion display the full version and build
-func FullVersion() string {
-	d := Time.Day()
-	m := Time.Month()
-	y := Time.Year()
-	return fmt.Sprintf("%v || %d.%d.%d", Version, y, m, d)
+// PrintVersion only displays the obvious
+func PrintVersion() string {
+	return fmt.Sprintf("%s", Version)
 }
+
+// PrintFullVersion display the full version and build
+func PrintFullVersion() string {
+	return fmt.Sprintf("%s, built at %s, on %s", Version, Date, Vendor)
+}
