Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.
/ mmm Public archive

mmm is not the www, because it runs on MoonScript.

Notifications You must be signed in to change notification settings

s-ol/mmm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

notice this project has moved to a new home: git.s-ol.nu/mmm. This github archive will not be kept up-to-date.

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 to root.
  • sql:[path]: load a SQLite3 database. + path is the path to the sqlite database file. If omitted, defaults to db.sqlite3.
  • sql:MEMORY: create an emptry in-memory SQLite3 database.

Dependencies

Required dependencies:

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

About

mmm is not the www, because it runs on MoonScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published