git.s-ol.nu mmm / goodbye
add goodbye message git-goodbye 3 months ago
1 changed file(s) with 79 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 | notice | this project has moved to a new home: [`git.s-ol.nu/mmm`](//git.s-ol.nu/mmm). This github archive will however be kept up-to-date: If you want to browse it here, switch on over to the [`master`](//github.com/s-ol/mmm/tree/master/) branch. |
1 | ------ | --- |
2
3 ---
4
5 mmm
6 ===
7 mmm is not the www, because it runs on [MoonScript][moonscript].
8
9 live version at [mmm.s-ol.nu][mmm].
10
11 What?
12 -----
13 This repo is roughly split into three parts:
14
15 - `mmm.dom`, `mmm.component`: polymorphic Lua/Moonscript modules for web development.
16 \[[code: `mmm`](mmm) - [docs](https://mmm.s-ol.nu/meta)\]
17 - `mmmfs`: the CMS/FS powering [mmm.s-ol.nu](https://mmm.s-ol.nu).
18 \[[code: `mmm/mmmfs`](mmm/mmmfs) - [article](https://mmm.s-ol.nu/articles/mmmfs)\]
19 - the page contents: includes my portfolio, blog, experiments...
20 authored using a mix of Moonscript, Markdown and HTML, thanks to the power of `mmmfs`.
21 \[[data: `root`](root), but you might want to read a bit about mmmfs before you jump in.]
22
23 Running or Building
24 -------------------
25 You can run the interactive server (`build/server.moon`):
26
27 $ moon build/server.moon fs
28
29 You can then view the website in your browser.
30 It should be availabe at `http://localhost:8000`.
31
32 Alternatively, `build/render_all.moon` can be used to generate a static HTML version of a tree:
33
34 $ moon build/render_all.moon fs output-dir /root/path
35
36 The `/root/path/` argument is optional and needs to be set if the generated HTML will not be
37 served from the root `/` of a server (which is assumed per default).
38
39 ### Storage
40 The `fs` argument in the commands above specifies where and how the content is to be found.
41 The argument consists first of the type of storage,
42 and then optionally extra arguments separated by a colon (`:`).
43 The following types are available:
44
45 - `fs:[path]`: load a directory from the filesystem. +
46 `path` is the path of the root directory, relative to the current directory.
47 If omitted, defaults to `root`.
48 - `sql:[path]`: load a SQLite3 database. +
49 `path` is the path to the sqlite database file.
50 If omitted, defaults to `db.sqlite3`.
51 - `sql:MEMORY`: create an emptry in-memory SQLite3 database.
52
53 ### Dependencies
54
55 Required dependencies:
56
57 - [MoonScript][moonscript]: `luarocks install moonscript`
58 - [lua-http](https://github.com/daurnimator/lua-http): `luarocks install http`
59
60 For unit tests:
61
62 - [busted](https://olivinelabs.com/busted/): `luarocks install busted`
63
64 Not required but recommended:
65
66 - [lua-sqlite3](https://luarocks.org/modules/moteus/sqlite3): `luarocks install sqlite3` (for SQLite3 backend)
67 - [lua-cjson](https://www.kyne.com.au/~mark/software/lua-cjson.php): `luarocks install lua-cjson 2.1.0-1` (for server-side JSON support)
68 - [discount](https://luarocks.org/modules/craigb/discount): `luarocks install discount` (requires libmarkdown2, for Markdown support)
69 - [luaposix](https://luarocks.org/modules/gvvaughan/luaposix): `luarocks install luaposix` (for SASS support)
70
71 ### Live Reloading (during development)
72 [entr][entr] is useful for reloading the realtime server when code outside the `root` changes:
73
74 $ ls {build,mmm}/**.moon | entr -r moon build/server.moon fs
75
76 [moonscript]: https://moonscript.org/
77 [mmm]: https://mmm.s-ol.nu/
78 [entr]: http://eradman.com/entrproject/