Tree @main (Download .tar.gz)
mmm
mmm is not the www, because it runs on MoonScript.
live version at mmm.s-ol.nu.
What?
This repo is roughly split into three parts:
mmm.dom
,mmm.component
: polymorphic Lua/Moonscript modules for web development. [code:mmm
- docs]mmmfs
: the CMS/FS powering mmm.s-ol.nu. [code:mmm/mmmfs
- article]- the page contents: includes my portfolio, blog, experiments...
authored using a mix of Moonscript, Markdown and HTML, thanks to the power of
mmmfs
. [data:root
, but you might want to read a bit about mmmfs before you jump in.]
Running or Building
You can run the interactive server (build/server.moon
):
$ moon build/server.moon fs
You can then view the website in your browser.
It should be availabe at http://localhost:8000
.
Alternatively, build/render_all.moon
can be used to generate a static HTML version of a tree:
$ moon build/render_all.moon fs output-dir /root/path
The /root/path/
argument is optional and needs to be set if the generated HTML will not be
served from the root /
of a server (which is assumed per default).
Storage
The fs
argument in the commands above specifies where and how the content is to be found.
The argument consists first of the type of storage,
and then optionally extra arguments separated by a colon (:
).
The following types are available:
fs:[path]
: load a directory from the filesystem. +path
is the path of the root directory, relative to the current directory. If omitted, defaults toroot
.sql:[path]
: load a SQLite3 database. +path
is the path to the sqlite database file. If omitted, defaults todb.sqlite3
.sql:MEMORY
: create an emptry in-memory SQLite3 database.
Dependencies
Required dependencies:
- MoonScript:
luarocks install moonscript
- lua-http:
luarocks install http
For unit tests:
- busted:
luarocks install busted
Not required but recommended:
- lua-sqlite3:
luarocks install sqlite3
(for SQLite3 backend) - lua-cjson:
luarocks install lua-cjson 2.1.0-1
(for server-side JSON support) - discount:
luarocks install discount
(requires libmarkdown2, for Markdown support) - luaposix:
luarocks install luaposix
(for SASS support)
Live Reloading (during development)
entr is useful for reloading the realtime server when code outside the root
changes:
$ ls {build,mmm}/**.moon | entr -r moon build/server.moon fs
Commit History
@main
git clone https://git.s-ol.nu/mmm.git
- Dockerfile: fix FROM s-ol 2 months ago
- remove cache-control header s-ol 8 months ago
- add http-cache option s-ol 1 year, 4 days ago
- sort children using _sort facet s-ol 1 year, 8 days ago
- server: fix flush errors when request was aborted s-ol 1 year, 8 days ago
- mmmfs.util: fix relative paths ending with a ".." segment s-ol 1 year, 2 months ago
- fix logging, 404 handling s-ol 1 year, 11 months ago
- add dynfn type for non-cacheable evaluation s-ol 1 year, 11 months ago
- support "download" and "facet" options for mmm-link s-ol 2 years ago
- handle interactive html in layout s-ol 2 years ago