Changeset 84 in code


Ignore:
Timestamp:
Mar 26, 2024, 2:18:06 AM (15 months ago)
Author:
Izuru Yakumo
Message:

何をしていたか忘れてしまった

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

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/README.md

    r81 r84  
    2020        $ go install marisa.chaotic.ninja/aya/cmd/aya@latest (1)
    2121        --- or ---
    22         $ git clone https://git.chaotic.ninja/yakumo.izuru/aya
     22        $ git clone https://git.chaotic.ninja/yakumo_izuru/aya
    2323        $ cd aya
    2424        $ make
     
    8989
    9090## Hooks
    91 
    9291There are two special plugin names that are executed every time the build
    9392happens - `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
     93content generation, or additional commands, like LESS to CSS conversion
    10194
    10295Note, you can also place `.gcss` files for [gcss](https://github.com/yosssi/gcss) to process instead
    10396
    10497## 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.
     98Read `aya(1)`
    11799
    118100## License
     101The software is distributed under the [MIT/X11](LICENSE) license.
    119102
    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          |
    121120
    122121---
  • trunk/aya.1

    r70 r84  
    44.Sh NAME
    55.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
    714.Sh DESCRIPTION
    815Does it need one?
     
    1522.It Easy to learn
    1623.It Fast (of course)
     24.It Only 4 external dependencies!
    1725.El
    1826.Sh USAGE
     
    4048.Sh HISTORY
    4149.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.
     50was forked from
     51.Lk https://git.mills.io/prologic/zs
     52due to disgust with how the project
     53turned out to be.
     54Later on, features from the original
     55program were reimplemented and
     56it took a different path from both.
     57.Sh ENVIRONMENT
     58.Bl -tag -width 11n
     59.It Ev AYADIR
     60Directory where
     61extensions, layouts and
     62hooks placed in to be used
     63by the program
     64.It Ev PUBDIR
     65Directory where generated files are
     66located
     67.It Ev AYA_*
     68Internal variables regarding a
     69Markdown document in question,
     70see
     71.Dq aya var <file>
     72.El
     73.Sh EXIT STATUS
     74.Ex -std
    4875.Sh AUTHORS
    4976.Nm
    5077is maintained by
    5178.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
     82was made by
     83.An Serge Zaitsev
     84.Aq Mt hello@zserge.com
    5385.Sh BUGS
    54 Report them to this mailing list
    55 .Mt devel@chaotic.ninja
     86If you find any, please report them to
     87.Aq Mt aya-dev@chaotic.ninja
  • trunk/cmd/aya/buildall.go

    r80 r84  
    3939                                        modified = true
    4040                                }
    41                                 fmt.Println("build:", path)
     41                                fmt.Println("GEN", path)
    4242                                return build(path, nil, vars)
    4343                        }
  • trunk/cmd/aya/main.go

    r82 r84  
    44import (
    55        "fmt"
     6        "log"
    67        "os"
    78        "strings"
     
    4041                } else if len(args) == 1 {
    4142                        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())
    4444                        }
    4545                } else {
    46                         fmt.Println("ERROR: too many arguments")
    47                         os.Exit(1)
     46                        log.Fatal("[build] Too many arguments")
    4847                }
    4948        case "clean":
    50                 fmt.Println("Removing generated site directory")
     49                fmt.Println("[clean] Removing generated site directory")
    5150                os.RemoveAll(PUBDIR)
    5251        case "help":
     
    5655        case "var":
    5756                if len(args) == 0 {
    58                         fmt.Println("var: filename expected")
    59                         os.Exit(1)
     57                        log.Fatal("[var] Filename expected")
    6058                } else {
    6159                        s := ""
    6260                        if vars, _, err := getVars(args[0], Vars{}); err != nil {
    63                                 fmt.Println("var: " + err.Error())
     61                                log.Fatal("[var]" + err.Error())
    6462                        } else {
    6563                                if len(args) > 1 {
     
    7674                }
    7775        case "version":
    78                 fmt.Printf("%v\n", aya.PrintVersion())
     76                aya.PrintVersion()
    7977                os.Exit(0)
    8078        case "watch":
     
    8280        default:
    8381                if s, err := run(globals(), cmd, args...); err != nil {
    84                         fmt.Println(err)
     82                        log.Fatal(err)
    8583                } else {
    8684                        fmt.Println(s)
  • trunk/cmd/aya/raw.go

    r79 r84  
    11// Copy files as-is from source to destination
     2// If there are heavy files, the generation process can slow down
    23package main
    34
  • trunk/doc.go

    r77 r84  
    44// Requires zero configuration to get started
    55// Named after Aya Shameimaru from Touhou Project
    6 
    7 // Current subcommands available:
    8 // build -- Generate the site, result can be found at .pub
    9 // build [file] -- Only generate the argument passed to standard output
    10 // serve -- Spawn an HTTP server in localhost port 8000, serving the .pub directory
    11 // var [file] -- Query variables from a markdown file
    12 // version -- Print version and exit
    13 // watch -- (Re)generate site while looking for changes
    146
    157// Aya is licensed under the MIT license
  • trunk/serve.go

    r78 r84  
    3434        handler := &Handler{http.FileServer(http.Dir(Dir))}
    3535        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)
    3838        log.Fatal(http.ListenAndServe(addr, nil))
    3939}
  • trunk/usage.go

    r80 r84  
    99        fmt.Printf("aya/%v\n", PrintFullVersion())
    1010        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")
    1212        fmt.Println("==")
    1313        fmt.Println("build [file] · (Re)build a site or a file in particular")
Note: See TracChangeset for help on using the changeset viewer.