initial
This commit is contained in:
commit
319b1a8293
6
.gitattributes
vendored
Normal file
6
.gitattributes
vendored
Normal file
@ -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
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.direnv
|
||||
/result
|
5
content/index.md
Normal file
5
content/index.md
Normal file
@ -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/
|
70
content/index.yaml
Normal file
70
content/index.yaml
Normal file
@ -0,0 +1,70 @@
|
||||
# For documentation and available settings, see
|
||||
# https://github.com/srid/emanote/blob/master/default/index.yaml
|
||||
|
||||
page:
|
||||
siteTitle: Home
|
||||
headHtml: |
|
||||
<snippet var="js.mathjax" />
|
||||
<snippet var="js.mermaid" />
|
||||
<snippet var="js.highlightjs" />
|
||||
|
||||
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: |
|
||||
<!-- Prism.js (doesn't work great in live server) -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/themes/prism-tomorrow.min.css" rel="stylesheet" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/prism.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
||||
# Syntax highlighting using highlight.js
|
||||
highlightjs: |
|
||||
<!-- highlight.js -->
|
||||
<with var="js">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/${value:highlightjs-ver}/styles/hybrid.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/${value:highlightjs-ver}/highlight.min.js"></script>
|
||||
<!-- Include languages that Emanote itself uses -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/${value:highlightjs-ver}/languages/haskell.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/${value:highlightjs-ver}/languages/nix.min.js"></script>
|
||||
<script>hljs.highlightAll();</script>
|
||||
</with>
|
||||
highlightjs-ver: 11.6.0 # Ref: https://cdnjs.com/libraries/highlight.js
|
||||
# Diagrams using mermaid.js
|
||||
mermaid: |
|
||||
<!-- mermaid.js -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({startOnLoad:false});
|
||||
mermaid.init(undefined,document.querySelectorAll(".mermaid"));
|
||||
</script>
|
||||
mathjax: |
|
||||
<script>
|
||||
window.MathJax = {
|
||||
startup: {
|
||||
ready: () => {
|
||||
MathJax.startup.defaultReady();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script async="" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
13
content/templates/hooks/after-note.tpl
Normal file
13
content/templates/hooks/after-note.tpl
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- div class="flex items-center justify-center mt-2">
|
||||
<ema:metadata>
|
||||
<with var="template">
|
||||
<a class="text-gray-300 hover:text-${theme}-600 text-sm" title="Edit this page on GitHub"
|
||||
href="${value:editBaseUrl}/${ema:note:source-path}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
|
||||
</svg>
|
||||
</a>
|
||||
</with>
|
||||
</ema:metadata>
|
||||
</div -->
|
163
flake.lock
generated
Normal file
163
flake.lock
generated
Normal file
@ -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
|
||||
}
|
38
flake.nix
Normal file
38
flake.nix
Normal file
@ -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
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user