From 319b1a82930569ca96fa3a287c7a90fb9e8cd4f8 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Tue, 23 Aug 2022 16:58:33 +0200 Subject: [PATCH] initial --- .envrc | 1 + .gitattributes | 6 + .gitignore | 2 + content/index.md | 5 + content/index.yaml | 70 +++++++++++ content/templates/hooks/after-note.tpl | 13 ++ flake.lock | 163 +++++++++++++++++++++++++ flake.nix | 38 ++++++ 8 files changed, 298 insertions(+) create mode 100644 .envrc create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 content/index.md create mode 100644 content/index.yaml create mode 100644 content/templates/hooks/after-note.tpl create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..5a9bbf0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +*.md linguist-detectable +*.md linguist-language=Markdown +*.md linguist-documentation=false +*.md text +flake.lock linguist-generated=true +*.tpl linguist-language=HTML diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a899cc --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.direnv +/result diff --git a/content/index.md b/content/index.md new file mode 100644 index 0000000..9fad608 --- /dev/null +++ b/content/index.md @@ -0,0 +1,5 @@ +# Emanote Template + +A template for your next [Emanote] website for hosting in [[GitHub Pages]], editing in [Visual Studio Code](https://emanote.srid.ca/resources/vscode), etc.. For details, see https://github.com/srid/emanote-template. + +[Emanote]: https://emanote.srid.ca/ \ No newline at end of file diff --git a/content/index.yaml b/content/index.yaml new file mode 100644 index 0000000..bd6026a --- /dev/null +++ b/content/index.yaml @@ -0,0 +1,70 @@ +# For documentation and available settings, see +# https://github.com/srid/emanote/blob/master/default/index.yaml + +page: + siteTitle: Home + headHtml: | + + + + +template: + theme: red + + # You can add your own variables here, like editBaseUrl. + # See after-note.tpl to see where editBaseUrl gets used. + # editBaseUrl: https://github.com/srid/emanote-template/edit/master/content + + # Uncomment this to get neuron-style pages + name: /templates/layouts/note + layout: + note: + containerClass: container mx-auto max-w-screen-lg + + sidebar: + collapsed: false + + # If you are hosting on GitLab Pages, you may want to remove this. + urlStrategy: pretty + +# Builtin JS behaviour library. Use them in `page.headHtml` of your .yaml or .md +# frontmatter. +js: + # Syntax highlighting using prism.js + prism: | + + + + + # Syntax highlighting using highlight.js + highlightjs: | + + + + + + + + + + highlightjs-ver: 11.6.0 # Ref: https://cdnjs.com/libraries/highlight.js + # Diagrams using mermaid.js + mermaid: | + + + + mathjax: | + + diff --git a/content/templates/hooks/after-note.tpl b/content/templates/hooks/after-note.tpl new file mode 100644 index 0000000..2d03dbe --- /dev/null +++ b/content/templates/hooks/after-note.tpl @@ -0,0 +1,13 @@ + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f4e31d0 --- /dev/null +++ b/flake.lock @@ -0,0 +1,163 @@ +{ + "nodes": { + "ema": { + "flake": false, + "locked": { + "lastModified": 1660941244, + "narHash": "sha256-gGhvmSjjr07u8uWaBIv6F5WE+VCGngSVXN9mhb4BmQo=", + "owner": "srid", + "repo": "ema", + "rev": "d74daa4d0d1f7a14cebd415787166fe7909fc33b", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "master", + "repo": "ema", + "type": "github" + } + }, + "emanote": { + "inputs": { + "ema": "ema", + "flake-parts": "flake-parts", + "haskell-flake": "haskell-flake", + "nixpkgs": "nixpkgs", + "tailwind-haskell": "tailwind-haskell" + }, + "locked": { + "lastModified": 1661096607, + "narHash": "sha256-DtSvkXRTsILCcWGcmP50fLupGroAP7EJVk3da+5yLvU=", + "owner": "EmaApps", + "repo": "emanote", + "rev": "aad6e789829ce35b042ea6fcc728ae0b76086dd8", + "type": "github" + }, + "original": { + "owner": "EmaApps", + "repo": "emanote", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs": [ + "emanote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1657102481, + "narHash": "sha256-62Fuw8JgPub38OdgNefkIKOodM9nC3M0AG6lS+7smf4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "608ed3502263d6f4f886d75c48fc2b444a4ab8d8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1661009076, + "narHash": "sha256-phAE40gctVygRq3G3B6LhvD7u2qdQT21xsz8DdRDYFo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "850d8a76026127ef02f040fb0dcfdb8b749dd9d9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "v1.0.0", + "repo": "flake-utils", + "type": "github" + } + }, + "haskell-flake": { + "locked": { + "lastModified": 1660319056, + "narHash": "sha256-MX6PLEtXVyXXUEk3t1e0c20XRL4m4u9TFET2X0TpTdE=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "1ca2be3c354ef2a3296cac7e54ae21e1d6ead6d7", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "haskell-flake", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1659077768, + "narHash": "sha256-P0XIHBVty6WIuIrk2DZNvLcYev9956y1prT4zL212H8=", + "path": "/nix/store/1ha33ma070pyxw5kkcx61qi7ypzzxzah-source", + "rev": "2a93ea177c3d7700b934bf95adfe00c435f696b8", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "emanote": "emanote", + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "emanote", + "nixpkgs" + ] + } + }, + "tailwind-haskell": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "emanote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1658431129, + "narHash": "sha256-AtTxP0AMXdeU0ZTJP5R1lCtx5az3ejrmGP1klEdu1qU=", + "owner": "srid", + "repo": "tailwind-haskell", + "rev": "09a102164b1a4559892277ff38efdc9b949c5433", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "master", + "repo": "tailwind-haskell", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..07a4a12 --- /dev/null +++ b/flake.nix @@ -0,0 +1,38 @@ +{ + nixConfig.extra-substituters = "https://cache.garnix.io"; + nixConfig.extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="; + + inputs = { + emanote.url = "github:EmaApps/emanote"; + nixpkgs.follows = "emanote/nixpkgs"; + flake-parts.url = "github:hercules-ci/flake-parts"; + flake-parts.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = inputs@{ self, flake-parts, nixpkgs, ... }: + flake-parts.lib.mkFlake { inherit self; } { + systems = nixpkgs.lib.systems.flakeExposed; + imports = [ + inputs.emanote.flakeModule + ]; + perSystem = { self', pkgs, system, ... }: { + emanote = { + # By default, the 'emanote' flake input is used. + # package = inputs.emanote.packages.${system}.default; + sites."default" = { + path = ./content; + pathString = "./content"; + # port = 8080; + # baseUrl = "/mynotes"; + # prettyUrls = true; + }; + }; + devShells.default = pkgs.mkShell { + buildInputs = [ + pkgs.nixpkgs-fmt + pkgs.zk + ]; + }; + }; + }; +}