mirror of
https://github.com/alvierahman90/gronk.git
synced 2024-11-21 23:09:52 +00:00
add config option to set name
This commit is contained in:
parent
b2c94f1e88
commit
731f71610d
11
notes2web
11
notes2web
@ -2,6 +2,11 @@
|
||||
|
||||
[[ "$1" == "--help" ]] && echo "USAGE: $0 [NOTES_DIRECTORY_1 [NOTES_DIRECTORY_2 [...]]]" && exit 0
|
||||
|
||||
for configpath in "$HOME/.notes2web.conf" "$HOME/.config/notes2web/config" ".notes2web.conf"
|
||||
do
|
||||
[[ -f "$configpath" ]] && source "$configpath"
|
||||
done
|
||||
|
||||
function _renderarticle {
|
||||
echo "rendering $1"
|
||||
pandoc\
|
||||
@ -41,9 +46,9 @@ do
|
||||
done
|
||||
|
||||
# create an intermediate markdown file of links to each article
|
||||
echo "---
|
||||
title: alv's notes
|
||||
---" > index.md
|
||||
echo "---" > index.md
|
||||
[[ -z "$name" ]] && echo "title: notes" >> index.md || echo "title: ${name}'s notes" >> index.md
|
||||
echo "---" >> index.md
|
||||
|
||||
for file in "$@"
|
||||
do
|
||||
|
12
readme.md
12
readme.md
@ -19,6 +19,18 @@ root directory.
|
||||
|
||||
Then you just have to point a webserver at your notes directory.
|
||||
|
||||
## Config
|
||||
|
||||
`notes2web` looks for a config file called `.notes2web.conf` in your current directory and your home
|
||||
directory.
|
||||
Right now the only config available is `name`:
|
||||
|
||||
```bash
|
||||
name="alv"
|
||||
```
|
||||
|
||||
If the name is not set, the title is set to 'notes'.
|
||||
|
||||
## Uninstall
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user