Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ccba8fd4e | |||
| 95679abd85 | |||
| 8b1e793510 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,4 @@
|
|||||||
out/
|
out/
|
||||||
kewt
|
kewt
|
||||||
|
site.conf
|
||||||
|
template.html
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -16,6 +16,8 @@ It's meant to be a static site generator, like _[kew](https://github.com/uint23/
|
|||||||
- Inline html support
|
- Inline html support
|
||||||
- MFM `$font` and `\<plain>` tags
|
- MFM `$font` and `\<plain>` tags
|
||||||
- Admonition support (that's what the blocks like the warning block below are called)
|
- Admonition support (that's what the blocks like the warning block below are called)
|
||||||
|
- RSS/Feed generation and Sitemap support
|
||||||
|
- Post creation via `--post`
|
||||||
|
|
||||||
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
||||||
|
|
||||||
@@ -24,7 +26,7 @@ If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
|||||||
You can clone the repository to use `kewt.sh` directly, or you can download the standalone executable, which bundles all dependencies into a single file:
|
You can clone the repository to use `kewt.sh` directly, or you can download the standalone executable, which bundles all dependencies into a single file:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -L -o kewt https://git.krzak.org/N0VA/kewt/releases/latest/download/kewt
|
curl -L -o kewt https://git.krzak.org/N0VA/kewt/releases/download/latest/kewt
|
||||||
chmod +x kewt
|
chmod +x kewt
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -38,12 +40,15 @@ On Arch Linux, _kewt_ is available on the AUR:
|
|||||||
```sh
|
```sh
|
||||||
./kewt.sh --help
|
./kewt.sh --help
|
||||||
./kewt.sh --new [title]
|
./kewt.sh --new [title]
|
||||||
|
./kewt.sh --post
|
||||||
./kewt.sh --from <src> --to <out>
|
./kewt.sh --from <src> --to <out>
|
||||||
./kewt.sh [src] [out]
|
./kewt.sh [src] [out]
|
||||||
```
|
```
|
||||||
|
|
||||||
`--new [title]` creates a new site directory with a copied `site.conf` and a default `index.md`.
|
`--new [title]` creates a new site directory with a copied `site.conf` and a default `index.md`.
|
||||||
|
|
||||||
|
`--post` creates a new empty markdown file in the configured `posts_dir` with the current date and time as the name.
|
||||||
|
|
||||||
## site.conf
|
## site.conf
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
@@ -57,7 +62,7 @@ home_name = "Home"
|
|||||||
show_home_in_nav = true
|
show_home_in_nav = true
|
||||||
nav_links = ""
|
nav_links = ""
|
||||||
nav_extra = ""
|
nav_extra = ""
|
||||||
footer = "made with <a href="https://kewt.krzak.org">kewt</a>"
|
footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
|
||||||
logo = ""
|
logo = ""
|
||||||
display_logo = false
|
display_logo = false
|
||||||
display_title = true
|
display_title = true
|
||||||
@@ -66,6 +71,10 @@ favicon = ""
|
|||||||
generate_page_title = true
|
generate_page_title = true
|
||||||
error_page = "not_found.html"
|
error_page = "not_found.html"
|
||||||
versioning = false
|
versioning = false
|
||||||
|
base_url = ""
|
||||||
|
generate_feed = false
|
||||||
|
feed_file = "rss.xml"
|
||||||
|
posts_dir = ""
|
||||||
```
|
```
|
||||||
|
|
||||||
- `title` site title
|
- `title` site title
|
||||||
@@ -87,6 +96,10 @@ versioning = false
|
|||||||
- `generate_page_title` automatically generate title text from the first markdown heading or filename (default: true)
|
- `generate_page_title` automatically generate title text from the first markdown heading or filename (default: true)
|
||||||
- `error_page` filename for the generated 404 error page (default: "not_found.html", empty to disable)
|
- `error_page` filename for the generated 404 error page (default: "not_found.html", empty to disable)
|
||||||
- `versioning` append a version query parameter (`?v=timestamp`) to css asset urls to bypass cache (default: false)
|
- `versioning` append a version query parameter (`?v=timestamp`) to css asset urls to bypass cache (default: false)
|
||||||
|
- `base_url` absolute URL of the site, used for sitemap and RSS feed generation
|
||||||
|
- `generate_feed` enable RSS feed generation (requires `base_url`)
|
||||||
|
- `feed_file` filename for the generated RSS feed (default: "rss.xml")
|
||||||
|
- `posts_dir` directory name containing posts (e.g., "posts"). Enables reverse-chronological sorting, title headings in indexes, and automatic backlinks.
|
||||||
|
|
||||||
## Ignores
|
## Ignores
|
||||||
|
|
||||||
|
|||||||
14
kewt.sh
14
kewt.sh
@@ -44,7 +44,7 @@ home_name = "Home"
|
|||||||
show_home_in_nav = true
|
show_home_in_nav = true
|
||||||
nav_links = ""
|
nav_links = ""
|
||||||
nav_extra = ""
|
nav_extra = ""
|
||||||
footer = "made with <a href="https://kewt.krzak.org">kewt</a>"
|
footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
|
||||||
logo = ""
|
logo = ""
|
||||||
display_logo = false
|
display_logo = false
|
||||||
display_title = true
|
display_title = true
|
||||||
@@ -156,7 +156,7 @@ home_name = "Home"
|
|||||||
show_home_in_nav = true
|
show_home_in_nav = true
|
||||||
nav_links = ""
|
nav_links = ""
|
||||||
nav_extra = ""
|
nav_extra = ""
|
||||||
footer = "made with <a href="https://kewt.krzak.org">kewt</a>"
|
footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
|
||||||
logo = ""
|
logo = ""
|
||||||
display_logo = false
|
display_logo = false
|
||||||
display_title = true
|
display_title = true
|
||||||
@@ -456,8 +456,14 @@ load_config() {
|
|||||||
key=$(printf '%s' "$key" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
|
key=$(printf '%s' "$key" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
|
||||||
val=$(printf '%s' "$val" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
|
val=$(printf '%s' "$val" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
|
||||||
case "$val" in
|
case "$val" in
|
||||||
\"*\") val=${val#\"}; val=${val%\"} ;;
|
\"*\")
|
||||||
\'*\') val=${val#\'}; val=${val%\'} ;;
|
val=${val#\"}; val=${val%\"}
|
||||||
|
val=$(printf '%s' "$val" | sed 's/\\"/\"/g; s/\\\\/\\/g')
|
||||||
|
;;
|
||||||
|
\'*\')
|
||||||
|
val=${val#\'}; val=${val%\'}
|
||||||
|
val=$(printf '%s' "$val" | sed "s/\\\\'/'/g; s/\\\\/\\/g")
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$key" in
|
case "$key" in
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ It's meant to be a static site generator, like _[kew](https://github.com/uint23/
|
|||||||
- Inline html support
|
- Inline html support
|
||||||
- MFM `$font` and `\<plain>` tags
|
- MFM `$font` and `\<plain>` tags
|
||||||
- Admonition support (that's what the blocks like the warning block below are called)
|
- Admonition support (that's what the blocks like the warning block below are called)
|
||||||
|
- RSS/Feed generation and Sitemap support
|
||||||
|
- Post creation via `--post`
|
||||||
|
|
||||||
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
||||||
|
|
||||||
@@ -24,7 +26,7 @@ If you want to **force** a file to be inlined, use `\!![]` instead of `\![]`
|
|||||||
You can clone the repository to use `kewt.sh` directly, or you can download the standalone executable, which bundles all dependencies into a single file:
|
You can clone the repository to use `kewt.sh` directly, or you can download the standalone executable, which bundles all dependencies into a single file:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -L -o kewt https://git.krzak.org/N0VA/kewt/releases/latest/download/kewt
|
curl -L -o kewt https://git.krzak.org/N0VA/kewt/releases/download/latest/kewt
|
||||||
chmod +x kewt
|
chmod +x kewt
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -38,12 +40,15 @@ On Arch Linux, _kewt_ is available on the AUR:
|
|||||||
```sh
|
```sh
|
||||||
./kewt.sh --help
|
./kewt.sh --help
|
||||||
./kewt.sh --new [title]
|
./kewt.sh --new [title]
|
||||||
|
./kewt.sh --post
|
||||||
./kewt.sh --from <src> --to <out>
|
./kewt.sh --from <src> --to <out>
|
||||||
./kewt.sh [src] [out]
|
./kewt.sh [src] [out]
|
||||||
```
|
```
|
||||||
|
|
||||||
`--new [title]` creates a new site directory with a copied `site.conf` and a default `index.md`.
|
`--new [title]` creates a new site directory with a copied `site.conf` and a default `index.md`.
|
||||||
|
|
||||||
|
`--post` creates a new empty markdown file in the configured `posts_dir` with the current date and time as the name.
|
||||||
|
|
||||||
## site.conf
|
## site.conf
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
@@ -57,7 +62,7 @@ home_name = "Home"
|
|||||||
show_home_in_nav = true
|
show_home_in_nav = true
|
||||||
nav_links = ""
|
nav_links = ""
|
||||||
nav_extra = ""
|
nav_extra = ""
|
||||||
footer = "made with <a href="https://kewt.krzak.org">kewt</a>"
|
footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
|
||||||
logo = ""
|
logo = ""
|
||||||
display_logo = false
|
display_logo = false
|
||||||
display_title = true
|
display_title = true
|
||||||
@@ -66,6 +71,10 @@ favicon = ""
|
|||||||
generate_page_title = true
|
generate_page_title = true
|
||||||
error_page = "not_found.html"
|
error_page = "not_found.html"
|
||||||
versioning = false
|
versioning = false
|
||||||
|
base_url = ""
|
||||||
|
generate_feed = false
|
||||||
|
feed_file = "rss.xml"
|
||||||
|
posts_dir = ""
|
||||||
```
|
```
|
||||||
|
|
||||||
- `title` site title
|
- `title` site title
|
||||||
@@ -87,6 +96,10 @@ versioning = false
|
|||||||
- `generate_page_title` automatically generate title text from the first markdown heading or filename (default: true)
|
- `generate_page_title` automatically generate title text from the first markdown heading or filename (default: true)
|
||||||
- `error_page` filename for the generated 404 error page (default: "not_found.html", empty to disable)
|
- `error_page` filename for the generated 404 error page (default: "not_found.html", empty to disable)
|
||||||
- `versioning` append a version query parameter (`?v=timestamp`) to css asset urls to bypass cache (default: false)
|
- `versioning` append a version query parameter (`?v=timestamp`) to css asset urls to bypass cache (default: false)
|
||||||
|
- `base_url` absolute URL of the site, used for sitemap and RSS feed generation
|
||||||
|
- `generate_feed` enable RSS feed generation (requires `base_url`)
|
||||||
|
- `feed_file` filename for the generated RSS feed (default: "rss.xml")
|
||||||
|
- `posts_dir` directory name containing posts (e.g., "posts"). Enables reverse-chronological sorting, title headings in indexes, and automatic backlinks.
|
||||||
|
|
||||||
## Ignores
|
## Ignores
|
||||||
|
|
||||||
@@ -108,5 +121,5 @@ versioning = false
|
|||||||
|
|
||||||
- Default css style and html template based on _[kew](https://github.com/uint23/kew)_ by [uint23](https://github.com/uint23)
|
- Default css style and html template based on _[kew](https://github.com/uint23/kew)_ by [uint23](https://github.com/uint23)
|
||||||
|
|
||||||
>![WARNING]
|
>[!WARNING]
|
||||||
>Most of this was coded at night, while sleepy and a bit sick, and after walking for about 4 hours around a forest, so...
|
>Most of this was coded at night, while sleepy and a bit sick, and after walking for about 4 hours around a forest, so...
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ style = "kewt"
|
|||||||
dir_indexes = true
|
dir_indexes = true
|
||||||
single_file_index = true
|
single_file_index = true
|
||||||
flatten = false
|
flatten = false
|
||||||
footer = "<a href="https://kewt.krzak.org"><img src="/button.gif" /></a>"
|
footer = "<a href=\"https://kewt.krzak.org\"><img src=\"/button.gif\" /></a>"
|
||||||
logo = ""
|
logo = ""
|
||||||
display_logo = false
|
display_logo = false
|
||||||
display_title = true
|
display_title = true
|
||||||
|
|||||||
Reference in New Issue
Block a user