~strahinja/strahinja.srht.site

124f03092be3dfc32c2529d8821a447d54fe2753 — Страхиња Радић 15 days ago 8022c3a
slweb: Updated to match slweb repo

Signed-off-by: Страхиња Радић <contact@strahinja.org>
3 files changed, 72 insertions(+), 15 deletions(-)

M blog/index.gmi
M slweb/index.gmi
M slweb/index.slw
M blog/index.gmi => blog/index.gmi +0 -2
@@ 1,6 1,5 @@
# Блог Страхиње Радића


=> gemini://gemini.strahinja.org/blog/2021-08/20210812.gmi	2021-08-12 Кодни стандард
=> gemini://gemini.strahinja.org/blog/2021-08/20210809.gmi	2021-08-09 Освежавање GPG кључева
=> gemini://gemini.strahinja.org/blog/2021-07/20210721.gmi	2021-07-21 Локализација snownews-а


@@ 27,4 26,3 @@





M slweb/index.gmi => slweb/index.gmi +35 -3
@@ 13,13 13,46 @@ d( )8o  o8. .  88o"88,o"  88' .   o8. ,8"

slweb is a static website generator which aims at being simplistic. It transforms custom Markdown-like syntax into HTML.


## Q&A

```
Q: Is this suckless?
A: No. SGML, and by extension, HTML, isn't suckless.

Q: Why do you call it "simple" then?
A: Because one is not the synonym for the other.

Q: Why not make a website generator as a shell script?
A: slweb was a shell script in its conception (check its history of commits in
   git). However, I wanted to implement Markdown links with link ids
   [like][this]. This requires multiple passes by the parser and is better
   implemented as a full-blown program in C anyway. The other reason was that
   sed and awk have limits, which some of my pages hit.

   [this]: https://some.site

Q: My static website generator is "truly simple", this is not simple!
A: Good for you. By the way, that is a statement and not a question.
```


## Prerequisites

Aside from the obvious (a C compiler, by default GNU C), slweb requires groff(1) and gzip(1) to create and compress documentation.  git(1) is, aside from cloning the repository, required to use the directive {git-log}. KaTeX is optionally used for math mode. ImageMagick's program identify(1) is optionally used to determine image sizes and output them as attributes to the <img> tag.
* C compiler (GCC-compatible) - ${SLWEB_CC:-gcc -g}
* gzip


## Optional dependencies

* KaTeX for math mode
* git (for {git-log})
* identify from ImageMagick (for <img width="" height="">)

=> https://katex.org		KaTeX
=> https://imagemagick.org	ImageMagick


## Install

```


@@ 44,8 77,7 @@ if you don't:
# ./do install
```

You can specify any compiler which uses -Wall, -c, -g and -o like GNU C, most notably tcc(1), by setting the SLWEB_CC environment variable. For example:

You can specify any compiler which uses (or tolerates) -Wall, -std=c99, -c, -g and -o like GNU C, most notably tcc(1), by setting the SLWEB_CC environment variable. For example:

```
$ SLWEB_CC=tcc redo -j10

M slweb/index.slw => slweb/index.slw +37 -10
@@ 13,15 13,41 @@ meta: index-meta.csv
**slweb** is a static website generator which aims at being simplistic. It
transforms custom Markdown-like syntax into HTML.


## Q&A

```
Q: Is this suckless?
A: No. SGML, and by extension, HTML, isn't suckless.

Q: Why do you call it "simple" then?
A: Because one is not the synonym for the other.

Q: Why not make a website generator as a shell script?
A: slweb was a shell script in its conception (check its history of commits in
   git). However, I wanted to implement Markdown links with link ids
   [like][this]. This requires multiple passes by the parser and is better
   implemented as a full-blown program in C anyway. The other reason was that
   sed and awk have limits, which some of my pages hit.

   [this]: https://some.site

Q: My static website generator is "truly simple", this is not simple!
A: Good for you. By the way, that is a statement and not a question.
```


## Prerequisites

Aside from the obvious (a C compiler, by default **GNU C**), slweb requires
**groff**(1) and **gzip**(1) to create and compress documentation.  **git**(1)
is, aside from cloning the repository, required to use the directive
`{git-log}`. K{sup}A{/sup}T{sub}E{/sub}X ([https://katex.org][katex]) is
optionally used for math mode. [ImageMagick's][imgmg] program **identify**(1) is
optionally used to determine image sizes and output them as attributes to the
`<img>` tag.
* C compiler (**GCC**-compatible) - `${SLWEB_CC:-gcc -g}`
* **gzip**


## Optional dependencies

* [KaTeX][katex] for math mode
* **git** (for `{git-log}`)
* **identify** from [ImageMagick][imgmg] (for `<img width="" height="">`)


## Install


@@ 44,9 70,9 @@ if you don't:
# ./do install
```

You can specify any compiler which uses `-Wall`, `-c`, `-g` and `-o` like GNU C,
most notably **tcc**(1), by setting the `SLWEB_CC` environment variable. For
example:
You can specify any compiler which uses (or tolerates) `-Wall`, `-std=c99`,
`-c`, `-g` and `-o` like GNU C, most notably **tcc**(1), by setting the
`SLWEB_CC` environment variable. For example:

```
$ SLWEB_CC=tcc redo -j10


@@ 55,6 81,7 @@ $ SLWEB_CC=tcc redo -j10
In the case of **tcc**, the tradeoff is that the debug information is limited
compared to **gcc**, but the compilation time is significantly shorter.


## Examples

See the [`examples/`][examp] directory in this repository.