comparison README.md @ 79:7b122b71fcfa draft

A good time to finally release a stable version Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>
author yakumo.izuru
date Tue, 12 Dec 2023 14:09:17 +0000
parents d8727551f403
children ab4829ba7a8a
comparison
equal deleted inserted replaced
78:5583ff07e384 79:7b122b71fcfa
15 15
16 ## Installation 16 ## Installation
17 17
18 Build it manually assuming you have Go (>=1.17) installed: 18 Build it manually assuming you have Go (>=1.17) installed:
19 19
20 $ go install marisa.chaotic.ninja/aya/cmd/aya@latest 20 $ go install marisa.chaotic.ninja/aya/cmd/aya@latest (1)
21 --- or --- 21 --- or ---
22 $ git clone https://git.chaotic.ninja/yakumo.izuru/aya 22 $ git clone https://git.chaotic.ninja/yakumo.izuru/aya
23 $ cd aya 23 $ cd aya
24 $ make 24 $ make
25 # make install 25 # make install
26 26
27 (1) If you use this method, the `aya version` subcommand may print the wrong string,
28 but it should not be a problem unless you use it on a page.
29
27 ## Ideology 30 ## Ideology
28 31
29 Keep your texts in markdown, or HTML format right in the main directory 32 Keep your texts in markdown, [amber](https://github.com/eknkc/amber), or html format right in the main directory
30 of your blog/site. 33 of your blog/site.
31 34
32 Keep all service files (extensions, layout pages, deployment scripts etc) 35 Keep all service files (extensions, layout pages, deployment scripts etc)
33 in the `.aya` subdirectory. 36 in the `.aya` subdirectory.
34 37
35 Define variables in the header of the content files using [YAML]: 38 Define variables in the header of the content files using [YAML](https://www.yaml.io) :
36 39
37 title: My web site 40 ```markdown
38 keywords: best website, hello, world 41 title: My web site
39 --- 42 keywords: best website, hello, world
43 ---
40 44
41 Markdown text goes after a header *separator* 45 Markdown text goes after a header *separator*
46 ```
42 47
43 Use placeholders for variables and plugins in your markdown or html 48 Use placeholders for variables and plugins in your markdown or html
44 files, e.g. `{{ title }}` or `{{ command arg1 arg2 }}. 49 files, e.g. `{{ title }}` or `{{ command arg1 arg2 }}.
45 50
46 Write extensions in any language you like and put them into the `.aya` 51 Write extensions in any language you like and put them into the `.aya`
47 subdiretory. 52 subdiretory.
48 53
49 Everything the extensions prints to stdout becomes the value of the 54 Everything the extensions prints to [stdout](https://man.freebsd.org/cgi/man.cgi?fd) becomes the value of the
50 placeholder. 55 placeholder.
51 56
52 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: 57 Every variable from the content header will be passed via environment variables like `title` becomes `$AYA\_TITLE` and so on.
58 There are some special variables:
53 59
54 * `$AYA` - a path to the `aya` executable 60 * `$AYA` - a path to the `aya` executable
55 * `$AYA\_OUTDIR` - a path to the directory with generated files 61 * `$AYA\_OUTDIR` - a path to the directory with generated files
56 * `$AYA\_FILE` - a path to the currently processed markdown file 62 * `$AYA\_FILE` - a path to the currently processed markdown file
57 * `$AYA\_URL` - a URL for the currently generated page 63 * `$AYA\_URL` - a URL for the currently generated page
91 97
92 #!/bin/sh 98 #!/bin/sh
93 lessc < $AYA_OUTDIR/styles.less > $AYA_OUTDIR/styles.css 99 lessc < $AYA_OUTDIR/styles.less > $AYA_OUTDIR/styles.css
94 rm -f $AYA_OUTDIR/styles.css 100 rm -f $AYA_OUTDIR/styles.css
95 101
96 ## Extras 102 Note, you can also place `.gcss` files for [gcss](https://github.com/yosssi/gcss) to process instead
97
98 `aya` also supports generating `.html` and `.css` by means of using `.amber`
99 and `.gcss` files. See more at [eknkc/amber](https://github.com/eknkc/amber) [yosssi/gcss](https://github.com/yosssi/gcss)
100 103
101 ## Command line usage 104 ## Command line usage
102 105
103 `aya build` re-builds your site. 106 `aya build` re-builds your site.
104 107