Let there be light
This commit is contained in:
commit
6b8a916cd5
6 changed files with 68 additions and 0 deletions
6
.envrc
Normal file
6
.envrc
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
use flake
|
||||
|
||||
export JANET_PATH="${PWD}/janet_modules"
|
||||
mkdir -p $JANET_PATH
|
||||
|
||||
PATH_add "${JANET_PATH}/bin"
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
janet_modules/
|
||||
site/
|
||||
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1625191069,
|
||||
"narHash": "sha256-M8/UH9pMgQEtuzY9bFwklYw8hx0pOKtUTyQC8E2UTHY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d8079260a3028ae3221d7a5467443ee3a9edd2b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
13
flake.nix
Normal file
13
flake.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
description = "A flake describing the build and dev environment for arnes.space";
|
||||
inputs.nixpkgs.url = github:NixOS/nixpkgs;
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
platform = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${platform};
|
||||
in {
|
||||
devShell.${platform} = pkgs.mkShell {
|
||||
buildInputs = [ pkgs.janet ];
|
||||
};
|
||||
};
|
||||
}
|
||||
14
index.janet
Normal file
14
index.janet
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(import janet-html :as html)
|
||||
|
||||
(defn as-html [h]
|
||||
(html/encode (html/doctype :html5) h))
|
||||
|
||||
(bagatto/set-output-dir! "site")
|
||||
|
||||
(def img-path-copier (bagatto/path-copier "static"))
|
||||
|
||||
(def data {:dogs {:src (bagatto/* "images/*")
|
||||
:attrs bagatto/parse-base}})
|
||||
|
||||
(def site {:index {:dest "index.html"
|
||||
:out (fn [_] (as-html [:h1 "Hello World!"]))}})
|
||||
7
project.janet
Normal file
7
project.janet
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(declare-project
|
||||
:name "arnes.space"
|
||||
:description "a library that does things" # some example metadata.
|
||||
|
||||
# Optional urls to git repositories that contain required artifacts.
|
||||
:dependencies ["https://git.sr.ht/~subsetpark/bagatto"
|
||||
"https://github.com/swlkr/janet-html"])
|
||||
Loading…
Add table
Add a link
Reference in a new issue