Changeset 65 in code for trunk/README.md
- Timestamp:
- May 7, 2023, 1:59:02 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.md
r61 r65 3 3 aya is an extremely minimal static site generator written in Go. 4 4 5 This crow tengu stands for 'the fastest one in Gensokyo' and yes this is also a Touhou Project reference. 5 Named after [Aya Shameimaru](https://en.touhouwiki.net/wiki/Aya_Shameimaru) from [Touhou 9.5: Shoot the Bullet](https://en.touhouwiki.net/wiki/Shoot_the_Bullet) 6 6 7 7 ## Features … … 12 12 * Works well for blogs and generic static websites (landing pages etc) 13 13 * Easy to learn 14 * Fast 14 * Fast (duh!) 15 15 16 16 ## Installation … … 19 19 20 20 $ go install marisa.chaotic.ninja/aya/cmd/aya@latest 21 21 --- or --- 22 $ git clone https://git.chaotic.ninja/yakumo.izuru/aya 23 $ cd aya 24 $ make 25 # make install 26 22 27 ## Ideology 23 28 … … 57 62 58 63 ``` bash 59 for f in ./blog/*.md ; do 60 d=$($AYA var $f date) 61 if [ ! -z $d ] ; then 62 timestamp=`date --date "$d" +%s` 63 url=`$AYA var $f url` 64 title=`$AYA var $f title | tr A-Z a-z` 65 descr=`$AYA var $f description` 66 echo $timestamp \ 67 "<item>" \ 68 "<title>$title</title>" \ 69 "<link>http://zserge.com/$url</link>" \ 70 "<description>$descr</description>" \ 71 "<pubDate>$(date --date @$timestamp -R)</pubDate>" \ 72 "<guid>http://zserge.com/$url</guid>" \ 73 "</item>" 74 fi 75 done | sort -r -n | cut -d' ' -f2- 64 #!/bin/sh 65 echo "Generating RSS feed" 66 67 echo '<?xml version="1.0" encoding="utf-8"?>' > $AYA_OUTDIR/blog/rss.xml 68 echo '<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">' >> $AYA_OUTDIR/blog/rss.xml 69 echo '<channel>' >> $AYA_OUTDIR/blog/rss.xml 70 for f in ./blog/*/*.md ; do 71 d=$($AYA var $f date) 72 if [ ! -z $d ] ; then 73 timestamp=`gdate --date "$d" +%s` 74 url=`$AYA var $f url` 75 title=`$AYA var $f title | tr A-Z a-z` 76 descr=`$AYA var $f description` 77 echo $timestamp "<item><title>$title</title><link>https://technicalmarisa.chaotic.ninja/blog/$url</link><description>$descr</description><pubDate>$(gdate --date @$timestamp -R)</pubDate><guid>http://technicalmarisa.chaotic.ninja/blog/$url</guid></item>" 78 fi 79 done | sort -r -n | cut -d' ' -f2- >> $AYA_OUTDIR/blog/rss.xml 80 echo '</channel>' >> $AYA_OUTDIR/blog/rss.xml 81 echo '</rss>' >> $AYA_OUTDIR/blog/rss.xml 76 82 ``` 77 83 … … 87 93 lessc < $AYA_OUTDIR/styles.less > $AYA_OUTDIR/styles.css 88 94 rm -f $AYA_OUTDIR/styles.css 95 96 ## Extras 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) 89 100 90 101 ## Command line usage
Note:
See TracChangeset
for help on using the changeset viewer.