|
| 1 | +# Running |
| 2 | + |
| 3 | +The `quiki` executable can be used for several different functions. |
| 4 | + |
| 5 | +Please note: it is intended to be run as a non-super user. |
| 6 | + |
| 7 | +# Wizard |
| 8 | + |
| 9 | +To set up quiki webserver for the first time, run the setup wizard with |
| 10 | +``` |
| 11 | +quiki -w |
| 12 | +``` |
| 13 | + |
| 14 | +### Alternate host or port |
| 15 | +The server by default binds to all available hosts on port 8080. If you need to do |
| 16 | +something different, you can specify them to the wizard like: |
| 17 | +``` |
| 18 | +quiki -w -bind=1.2.3.4 -port=9091 |
| 19 | +``` |
| 20 | + |
| 21 | +### Alternate config location |
| 22 | +By default, the wizard creates a directory at `~/quiki` to store your quiki |
| 23 | +configuration and sites. It will write the configuration file to `~/quiki/quiki.conf`. |
| 24 | +If you want to store the config elsewhere, you can specify like so: |
| 25 | +``` |
| 26 | +quki -w -config=/path/to/quiki.conf |
| 27 | +``` |
| 28 | + |
| 29 | +### Admin account setup |
| 30 | +When running with `-w`, after the configuration file is written, the server |
| 31 | +begins listening. You should navigate your browser to the adminifier setup page, |
| 32 | +e.g. `http://localhost:8080/admin/create-user`. Here, complete the form to set |
| 33 | +up your first admin user. |
| 34 | + |
| 35 | +The form requests an authentication token, which is printed to stdout to copy |
| 36 | +and paste. You can also find it designated as `@adminifier.token` in the webserver |
| 37 | +config, usually at `~/quiki/quiki.conf`. |
| 38 | + |
| 39 | +It also allows you to specify a location to store your wiki sites. This will be |
| 40 | +prepopulated with the recommended location which is the `wikis` dir relative |
| 41 | +to the config location, typically `~/quiki/wikis`. |
| 42 | + |
| 43 | +Upon successful completion of this form, you are logged in and ready to create |
| 44 | +your first wiki! |
| 45 | + |
| 46 | +# Webserver |
| 47 | + |
| 48 | +To run the quiki webserver if you've already set it up, simply run |
| 49 | +``` |
| 50 | +quiki |
| 51 | +``` |
| 52 | +This will assume the webserver config path of `~/quiki/quiki.conf`. |
| 53 | + |
| 54 | +### Alternate config location |
| 55 | +To run with a different config, use |
| 56 | +``` |
| 57 | +quiki -config=/path/to/quiki.conf |
| 58 | +``` |
| 59 | + |
| 60 | +### Override host or port |
| 61 | +The host and port typically are specified in the webserver config file. |
| 62 | +If desired, you can explicitly override them via the command line args: |
| 63 | +``` |
| 64 | +quiki -bind=1.2.3.4 -port=9091 |
| 65 | +``` |
| 66 | + |
| 67 | +# Standalone page |
| 68 | + |
| 69 | +Standalone page mode allows you to render a single quiki page file with |
| 70 | +no wiki context. |
| 71 | + |
| 72 | +``` |
| 73 | +quiki path/to/my.page |
| 74 | +``` |
| 75 | + |
| 76 | +### Standalone wiki |
| 77 | + |
| 78 | +Standalone wiki mode allows you to perform wiki operations without |
| 79 | +running the webserver. |
| 80 | + |
| 81 | +### Render page within a wiki |
| 82 | + |
| 83 | +To render a page within a wiki, use |
| 84 | +``` |
| 85 | +quiki -wiki=/path/to/wiki some_page_name |
| 86 | +``` |
| 87 | +This will, for example, render the page at |
| 88 | +`/path/to/wiki/pages/some_page_name.page` in the context of the specified |
| 89 | +wiki. The HTML is written to STDOUT, and then the program exits. |
| 90 | + |
| 91 | +### Pregeneration |
| 92 | + |
| 93 | +To pregenerate all the pages in a wiki, run without a page argument: |
| 94 | +``` |
| 95 | +quiki -wiki=/path/to/wiki |
| 96 | +``` |
| 97 | + |
| 98 | +# Interactive Mode |
| 99 | + |
| 100 | +Interactive mode reads quiki source from STDIN until reaching EOF (i.e. Ctrl-D). |
| 101 | +Then, it prints the HTML output to STDOUT and exits. |
| 102 | + |
| 103 | +To run quiki in interactive mode, use |
| 104 | +``` |
| 105 | +quiki -i |
| 106 | +``` |
0 commit comments