2021-04-30 21:01:08 +00:00
|
|
|
# notes2web
|
|
|
|
|
|
|
|
View your notes as a static html site.
|
|
|
|
|
2021-05-01 11:04:45 +00:00
|
|
|
![](./screenshot.png)
|
|
|
|
|
2021-04-30 21:01:08 +00:00
|
|
|
## Install
|
|
|
|
|
2021-05-01 11:04:45 +00:00
|
|
|
0. Install [Pandoc](https://pandoc.org/index.html) and [yq](https://github.com/mikefarah/yq)
|
|
|
|
|
|
|
|
On arch:
|
|
|
|
```
|
|
|
|
# pacman -S pandoc yq
|
|
|
|
```
|
|
|
|
|
2021-04-30 21:08:24 +00:00
|
|
|
1. Run `make install` as root
|
2021-04-30 21:01:08 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
2021-05-01 11:04:45 +00:00
|
|
|
$ notes2web NOTES_DIRECTORY_1 [NOTES_DIRECTORY_2 [...]]
|
2021-04-30 21:01:08 +00:00
|
|
|
```
|
|
|
|
|
2021-05-01 12:39:34 +00:00
|
|
|
The command will generate a website in the `$output` directory (`./web` by default).
|
|
|
|
It will then generate a list of all note files and put it in `index.html`.
|
2021-04-30 21:08:24 +00:00
|
|
|
|
2021-05-01 12:39:34 +00:00
|
|
|
Then you just have to point a webserver at `$output`.
|
2021-04-30 21:08:24 +00:00
|
|
|
|
2021-05-01 10:48:04 +00:00
|
|
|
## Config
|
|
|
|
|
|
|
|
`notes2web` looks for a config file called `.notes2web.conf` in your current directory and your home
|
|
|
|
directory.
|
2021-05-01 11:21:59 +00:00
|
|
|
Default config values:
|
2021-05-01 10:48:04 +00:00
|
|
|
|
|
|
|
```bash
|
2021-05-01 12:37:23 +00:00
|
|
|
name="" # your name
|
|
|
|
output="web" # the folder where the website will be generated in
|
2021-05-01 11:21:59 +00:00
|
|
|
article_template="/opt/notes2web/templates/article.html"
|
2021-05-01 12:02:35 +00:00
|
|
|
textarticlehead_template="/opt/notes2web/templates/textarticlehead.html"
|
|
|
|
textarticlefoot_template="/opt/notes2web/templates/textarticlefoot.html"
|
2021-05-01 11:21:59 +00:00
|
|
|
listitem_template="/opt/notes2web/templates/listitem.html"
|
|
|
|
index_template="/opt/notes2web/templates/index.html"
|
|
|
|
stylesheet="/opt/notes2web/styles.css"
|
2021-05-01 10:48:04 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
If the name is not set, the title is set to 'notes'.
|
|
|
|
|
2021-04-30 21:01:08 +00:00
|
|
|
## Uninstall
|
|
|
|
|
|
|
|
```
|
|
|
|
# make uninstall
|
|
|
|
```
|