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
- mmmfs.util: fix relative paths ending with a ".." segment s-ol 29 days ago
- fix logging, 404 handling s-ol 10 months ago
- add dynfn type for non-cacheable evaluation s-ol 10 months ago
- support "download" and "facet" options for mmm-link s-ol 1 year, 29 days ago
- handle interactive html in layout s-ol 1 year, 30 days ago
- fix duplicate plugin loading s-ol 1 year, 1 month ago
- static/style: serve fonts locally s-ol 1 year, 4 months ago
- link to the correct facet if specified in mmm-embed s-ol 1 year, 4 months ago
- de-personalize default layout s-ol 1 year, 6 months ago
- remove Editor remnants, fix inspector s-ol 1 year, 6 months ago
- remove pdf accidentally left behind s-ol 1 year, 6 months ago
- fix plugins in example root s-ol 1 year, 6 months ago
- move layout into user content s-ol 1 year, 6 months ago
- support facet attribute in <mmm-link> s-ol 1 year, 6 months ago
- update shell.nix s-ol 1 year, 6 months ago
- add _facet support to mmm.dom s-ol 1 year, 6 months ago
- look for plugins in own dir s-ol 1 year, 11 months ago
- Split root out of mmm repo s-ol 1 year, 11 months ago
- add mmmfs pdf s-ol 2 years ago
- remove Tup from documentation and nix s-ol 2 years ago
- drop Tup dependency s-ol 2 years ago
- basic caching for fileder tree and conversion results s-ol 2 years ago
- add luaposix dependency s-ol 2 years ago
- portfolio: remove matrix mixer s-ol 2 years ago
- remove styles from tup s-ol 2 years ago
- portfolio: add 0xC.pad s-ol 2 years ago
- move style into root s-ol 2 years ago
- turn static plugin into builtin again s-ol 2 years ago
- remove codemirror stuff s-ol 2 years ago
- add SASS plugin s-ol 2 years ago