All Projects → theiceshelf → Firn

theiceshelf / Firn

Licence: epl-1.0
Org Mode Static Site Generator

Programming Languages

rust
11053 projects
clojure
4091 projects

Projects that are alternatives of or similar to Firn

Hugo theme pickles
Modern, Simple and beautiful Hugo theme
Stars: ✭ 168 (-15.15%)
Mutual labels:  static-site-generator
Notablog
Generate a minimalistic blog from a Notion table. [WIP]
Stars: ✭ 177 (-10.61%)
Mutual labels:  static-site-generator
Gatsby Docker
Develop & Build GatsbyJS static sites within Docker.
Stars: ✭ 184 (-7.07%)
Mutual labels:  static-site-generator
Baumeister
👷 The aim of this project is to help you to build your things. From Bootstrap themes over static websites to single page applications.
Stars: ✭ 171 (-13.64%)
Mutual labels:  static-site-generator
Lego
A fast static site generator that generates optimised, performant websites.
Stars: ✭ 176 (-11.11%)
Mutual labels:  static-site-generator
Monobase
React static site generator
Stars: ✭ 180 (-9.09%)
Mutual labels:  static-site-generator
Staticman
💪 User-generated content for Git-powered websites
Stars: ✭ 2,098 (+959.6%)
Mutual labels:  static-site-generator
Staticsitegenerators List
A comprehensive, partially automatically generated comparison of static site generators
Stars: ✭ 190 (-4.04%)
Mutual labels:  static-site-generator
Saber
()==[:::::::::::::> Build static sites in Vue.js, without the hassle
Stars: ✭ 2,133 (+977.27%)
Mutual labels:  static-site-generator
Gulp Site Generator
A static site generator using Gulp
Stars: ✭ 183 (-7.58%)
Mutual labels:  static-site-generator
Pygreen
A micro web framework/static web site generator.
Stars: ✭ 171 (-13.64%)
Mutual labels:  static-site-generator
Bedrock
Bedrock is a static site generator to create large-scale HTML prototypes and document design systems
Stars: ✭ 175 (-11.62%)
Mutual labels:  static-site-generator
Nanogen
Minimalist static site generator in Node.js
Stars: ✭ 180 (-9.09%)
Mutual labels:  static-site-generator
Elmstatic
Elm-to-HTML static site generator
Stars: ✭ 170 (-14.14%)
Mutual labels:  static-site-generator
Post Scheduler
Schedule posts & content updates for static websites (Jekyll, Hugo, Gatsby, Phenomic etc)
Stars: ✭ 184 (-7.07%)
Mutual labels:  static-site-generator
Gopablo
🐺 Static site generator.
Stars: ✭ 166 (-16.16%)
Mutual labels:  static-site-generator
Vanilla Back To Top
Simple and smooth Back To Top button
Stars: ✭ 179 (-9.6%)
Mutual labels:  static-site-generator
Quokka
LOOKING FOR NEW MAINTAINER - Quokka is a Content Management System - `docker run --rm -it -p 5000:5000 quokka/quokka`
Stars: ✭ 2,198 (+1010.1%)
Mutual labels:  static-site-generator
Bael Template
Brutalist Blog theme for Netlify CMS
Stars: ✭ 187 (-5.56%)
Mutual labels:  static-site-generator
Nikola
A static website and blog generator
Stars: ✭ 2,221 (+1021.72%)
Mutual labels:  static-site-generator

#+html:

Firn

#+html:

A Static Site Generator for Org Mode

#+html:

GitHub release (latest by date including pre-releases)  Discord 

  • Overview

Firn generates a static site from org-mode files. It is a bit different from other static site generators, in that it intends to be a drop in solution for creating sites from already existing folders of org-files. Further, because org-mode has great capacity for collecting and displaying different kinds of data (links, logbooks, drawers, task keywords, tags) we can make this data available when org-content is parsed into a data structure.

Currently, running the =firn= binary on a directory of org files performs the following:

  • Reads all .org files in the directory recursively.
  • Parses org-files into data structures with [[https://github.com/PoiScript/orgize][Orgize.]]
  • Collects all file links and logbooks across all files.
  • Passes files through a template system with Hiccup, and renders to HTML.
  • Quickstart
  1. Download the [[https://github.com/theiceshelf/firn/releases][latest release]] (only Mac and Linux currently supported), or use the below code snippet to install: #+BEGIN_SRC sh curl -s https://raw.githubusercontent.com/theiceshelf/firn/master/install -o install-firn chmod +x install-firn && ./install-firn

    you may need to run the install script with sudo and/or run it with the absolute PWD path:

    sudo ~//install-firn

    #+END_SRC
  2. Navigate to your directory of org files
  3. Run =firn new=
  4. Run =firn serve=
  5. Run =firn build= when ready to put your site online!
  • Usage

The Firn documentation is available [[https://firn.theiceshelf.com/][here]] and is mirrored and built from the [[file:docs/index.org][docs/]] folder in this repo.

#+BEGIN_SRC sh Firn - A static-site generator for org-mode.

Usage: firn [options] action

Options: -p, --port PORT 4000 Port number -h, --help -v, --version -r, --repl -d, --dir PATH /Users/tees/Projects/firn/firn Absolute path of directory to build/serve

Actions: build Build a static site in a directory with org files. new Scaffold files and folders needed to start a new site. serve Runs a development server for processed org files. #+END_SRC

** Docker

Firn can also be used in Docker.

#+begin_src docker run
-it
--rm
-p 4000:4000
-v "$PWD":"$PWD"
--workdir "$PWD"
theiceshelf/firn
--help #+end_src

  • Development ** Prerequisites:
  • Download [[https://www.graalvm.org/downloads/][GraalVM]] and set =GRAALVM_HOME=.
  • Use =gu= to install the =native-image= executable.
  • Install [[https://github.com/technomancy/leiningen][lein]]
  • Install [[https://doc.rust-lang.org/cargo/getting-started/installation.html][cargo]] (we use 1.41.1)

** Building

This creates a single binary called =firn=.

#+BEGIN_SRC sh git clone [email protected]:theiceshelf/firn.git && cd firn

compile Rust, Clojure and the GraalVM Native Image.

bin/compile #+END_SRC

*** Container image

Firn can be built as a container image, using #+begin_src sh docker build -t theiceshelf/firn . #+end_src

** Developing

Firn is a Clojure code base that reaches out to a library compiled with Rust. You won't necessarily need to compile any rust code as the rust artifacts have been vendored into the clojure/resources folders.

*** Clojure setup / Emacs use.

This is my personal workflow for developing, it may or may not be useful.

  • I open core.clj and boot up a Cider REPL in Emacs.
  • I eval the CLI functions (new, serve, build) in core.clj under the (comment ..) block at the end of the file.
  • When building a feature, I write the code, evaluate it, and then eval the CLI commands again in core.clj. I use cider-eval-region to both stop mount (if the server is running) and to re-run the CLI command.
  • I usually run the tests on the docs folder that is bundled in the repo:
    • (mount/stop) (-main "serve" "-d" "<path_to_repo>/firn/docs")
  • In emacs, I use m-x setenv and at the prompt enter DEV > TRUE
    • this prevents CLI exit codes from ending the REPL process.
  • Note: some of the functions from the =me.raynes.fs= namespace have been duplicated in the util.clj namespace; largely, the functions that have issues with reflection.

*** Rust Parser

  • In development, we have a binary version of the Rust parser functionality that the Clojure code shells out to.
  • To package up a new version of the rust binary for development (a binary we can shell out to) run the script =bin/build-dev-parser=.
  • Thank-you's
  • Thank you to [[https://github.com/borkdude][@borkdude]] for building some awesome libraries ([[https://github.com/borkdude/sci][sci]] is used in firn to evaluate layouts) and for answering questions about compiling with GraalVM /and/ for figuring out how to compile [[https://github.com/borkdude/clojure-rust-graalvm][rust and clojure together]].
  • PoiScript's org-mode [[https://github.com/PoiScript/orgize][parser]].
  • [[https://andybrewer.github.io/mvp/][mvp.css]] for base layer styles.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].