Skip to content

Commit 9a6f9cf

Browse files
committed
Finish up docs
1 parent 792962c commit 9a6f9cf

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

docs/guide/html-template.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# HTML Templates
22

3-
The HTML used by Emanote is under the full control of the user by way of the [[layer]].
3+
Unlike [[neuron|Neuron]], Emanote's generated HTML can be **completely** customized. Emanote uses the Heist HTML template system that supports non-trivial constructs like recursion; see [here](http://snapframework.com/docs/tutorials/heist) for a tutorial on its syntax.
44

5-
[ ] Write this.
5+
The default HTML templates are stored in the [[layer|default layer]], which can you override either totally or in subset.
6+
7+
## Layouts
8+
9+
Emanote includes two builtin layouts, called `book` (the default) and [[neuron-layout|`note`]], but you can also write your own HTML layout from scratch, as long as you specify that template in [[yaml-config]] for the notes in question. For eg., [`templates/home.tpl`](https://github.com/srid/srid/blob/master/content/templates/home.tpl) is how https://srid.ca homepage is generated, because its [`index.md`](https://raw.githubusercontent.com/srid/srid/master/content/index.md) specifies this template as `template.name` in its YAML frontmatter (which could also be `index.yaml`).
10+
11+
## Features
612

713
```query
814
path:./*

docs/guide/html-template/sidebar.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ In [[html-template|the `book` template]], the sidebar is rendered on the left si
66
- The ordering of children in the tree is determined in the following order (this is also the order in which [[query]] results are rendered by default):
77
1. If the `order` [[yaml-config|frontmatter]] metadata exists, use that as the primary sort key.
88
2. If the note has a H1 title, use that as the secondary sort key; otherwise, use the note filename as the secondary sort key.
9-
10-
- [ ] The same layout is used in the note index page. Create index/{note,tag,task} doc tree.

docs/guide/layer.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Layer system
22

3-
[ ] Write this
4-
- Default layer (provides [[html-template]], fonts, logo, [[markdown|index.md]], etc.)
5-
- How users can override the files in the default layer
3+
Emanote's layer system allows you to "merge" multiple notebooks and treat them as if they were a single notebook. The `-L` option in the command line accepts layers, and you can specify multiple of them with the right most taking the most precedence.
4+
5+
## "Default" layer
6+
7+
Emanote *implicitly* includes what is known as the "default" layer. Its contents can be seen [here](https://github.com/EmaApps/emanote/tree/master/default). This layer contains [[html-template]], [[yaml-config|index.yaml]] and other default assets, like the logo, favicon and fonts. When you run `emanote -L /your/notebook run`, your notebook is overlaid *on top of* this default layer. What this means, in effect, is that you override **just about any file** in the default layer, such the HTML content of [[html-template]], in your own notebook directory. As an example, see [`template/hooks`](https://github.com/EmaApps/emanote/tree/master/docs/templates/hooks) of this documentation notbook.
8+
9+
## Merge semantics
10+
11+
The default merge semantic is to replace with the file on the right layer. For some file types, special merge semantic applies. For example, [[yaml-config|YAML files]] are merged by deep merge, not file-level replacement. This is what allows you to create `index.yaml` that overrides only a subset of the default configuration.

docs/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ page:
1111
:::
1212

1313
:::{.text-gray-600}
14-
[Emanote][gh] is currently in **beta** phase. Feel free to try it out and give feedback, to ensure that the upcoming 1.0 release is solid. See [[examples|websites using Emanote]].
15-
16-
Begin from [[start]], and then read through [[guide]].
14+
Begin from [[start]], and then read through [[guide]]. See [[examples|websites using Emanote]].
1715

1816
Emanote is written in [Haskell](https://srid.ca/haskell). If you are interested in contributing, see [[architecture]].
1917
:::

docs/templates/hooks/before-note.tpl

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)