Changes between Version 1 and Version 2 of WikiStart


Ignore:
Timestamp:
Sep 21, 2024, 8:03:54 PM (4 months ago)
Author:
Izuru Yakumo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v1 v2  
    1 = Welcome to Trac
    21
    3 Trac is a '''minimalistic''' approach to '''web-based''' management of
    4 '''software projects'''. Its goal is to simplify effective tracking and
    5 handling of software issues, enhancements and overall progress.
     2== Aya
     3An extremely ''fucking fast'' and (not quite) minimal static site generator written in [https://go.dev Go].
    64
    7 All aspects of Trac have been designed with the single goal to
    8 '''help developers write great software''' while '''staying out of the way'''
    9 and imposing as little as possible on a team's established process and
    10 culture.
    11 
    12 As all Wiki pages, this page is editable, this means that you can
    13 modify the contents of this page simply by using your
    14 web-browser. Simply click on the "Edit this page" link at the bottom
    15 of the page. WikiFormatting will give you a detailed description of
    16 available Wiki formatting commands.
    17 
    18 "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created
    19 a new Trac environment, containing a default set of wiki pages and some sample
    20 data. This newly created environment also contains
    21 [wiki:TracGuide documentation] to help you get started with your project.
    22 
    23 You can use [wiki:TracAdmin trac-admin] to configure
    24 [http://trac.edgewall.org/ Trac] to better fit your project, especially in
    25 regard to ''components'', ''versions'' and ''milestones''.
     5It's named after [https://en.touhouwiki.net/wiki/Aya_Shameimaru Aya Shameimaru] from [https://en.touhouwiki.net/wiki/Phantasmagoria_of_Flower_View Phantasmagoria of Flower View].
    266
    277
    28 TracGuide is a good place to start.
     8=== Features
     9* Zero configuration
     10* Cross-platform
     11* Highly extensible
     12* Works well for blogs, documentation pages, and generic static websites
     13* Easy to learn (make layout, write pages, {{{ aya build }}}, and done!)
    2914
    30 Enjoy! [[BR]]
    31 ''The Trac Team''
     15=== Installation
     16Requires [https://go.dev Go] 1.17 or higher.
    3217
    33 == Starting Points
     18{{{
     19$ git clone https://git.chaotic.ninja/yakumo.izuru/aya
     20$ cd aya
     21$ make
     22$ ./aya-OS-ARCH
     23% ...alternatively can be installed wherever you want
     24$ make PREFIX=$HOME/.local install
     25% ...or globally
     26# make install
     27$ aya
     28}}}
    3429
    35  * TracGuide --  Built-in Documentation
    36  * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project
    37  * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions
    38  * TracSupport --  Trac Support
     30=== Ideology
     31Keep your texts in [https://en.wikipedia.org/wiki/Markdown Markdown], [https://github.com/eknkc/amber Amber], or [https://en.wikipedia.org/wiki/HTML HTML] right in the main directory of your blog or site.\\
     32Keep all service files (extensions, layout pages, deployment scripts, etc) in the {{{ .aya }}} subdirectory.\\
     33Define variables in the header of the content files using [https://yaml.org YAML]\\
    3934
    40 For a complete list of local wiki pages, see TitleIndex.
     35{{{
     36---
     37title: Aya
     38description: The fastest static site generator
     39keywords: ayayaya
     40---
     41
     42Markdown text goes after a header *separator*
     43}}}
     44
     45Use placeholders for variables and plugins in your Markdown or HTML files, e.g. {{{ {{ title }} }}} or {{{ {{ command arg1 arg2 }} }}}.\\
     46Write extensions in any language you like and put them into the {{{ .aya }}} subdirectory.
     47
     48Everything the extensions print to standard output becomes the value of the placeholder.
     49
     50Every variable from the content header will be passed via environment variables like `title` becomes {{{ $AYA_TITLE }}} and so on.\\
     51There are some special variables:
     52
     53* {{{ $AYA }}} -- path to the `aya` executable
     54* {{{ $AYA_OUTDIR }}} -- a path to the directory with generated files
     55* {{{ $AYA_FILE }}} -- a path to the currently processed markdown file
     56* {{{ $AYA_URL }}} -- a URL for the currently generated page
     57
     58=== Example of RSS/Atom feed generation
     59Extensions can be written in any language you know (Bash, Python, Lua, JavaScript, Go, even Assembler).
     60Here's an example of how to scan all markdown blog posts and create RSS items:
     61
     62{{{
     63echo "Generating RSS feed"
     64
     65echo '<?xml version="1.0" encoding="utf-8"?>' > $AYA_OUTDIR/blog/rss.xml
     66echo '<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">' >> $AYA_OUTDIR/blog/rss.xml
     67echo '<channel>' >> $AYA_OUTDIR/blog/rss.xml
     68for f in ./blog/*/*.md ; do
     69    d=$($AYA var $f date)
     70    if [ ! -z $d ] ; then
     71        timestamp=`gdate --date "$d" +%s`
     72        url=`$AYA var $f url`
     73        title=`$AYA var $f title | tr A-Z a-z`
     74        descr=`$AYA var $f description`
     75        echo $timestamp "<item><title>$title</title><link>https://technicalmarisa.chaotic.ninja/blog/$url</link>
     76                <description>$descr</description><pubDate>$(gdate --date @$timestamp -R)</pubDate>
     77                <guid>https://technicalmarisa.chaotic.ninja/blog/$url</guid></item>"
     78    fi
     79done | sort -r -n | cut -d' ' -f2- >> $AYA_OUTDIR/blog/rss.xml
     80echo '</channel>' >> $AYA_OUTDIR/blog/rss.xml
     81echo '</rss>' >> $AYA_OUTDIR/blog/rss.xml
     82}}}
     83
     84=== Hooks
     85There are two special plugin names that are executed every time the build happens - {{{ prehook }}} and {{{ posthook }}}.\\
     86You can define some global actions here like content generation, or additional commands, like LESS to CSS conversion:
     87
     88{{{
     89#!/bin/sh
     90lessc < $AYA_OUTDIR/styles.less > $AYA_OUTDIR/styles.css
     91rm -f $AYA_OUTDIR/styles.css
     92}}}
     93
     94An alternative method of generating CSS is placing {{{ .gcss }}} files for [https://github.com/yosssi/gcss gcss] to process.
     95
     96=== Command line usage
     97See {{{ aya(1) }}}
     98
     99=== License
     100This software is distributed under the [https://git.chaotic.ninja/yakumo.izuru/aya/src/branch/master/LICENSE MIT/X11] license.