c_simple_http/Changelog.md

80 lines
2.1 KiB
Markdown
Raw Normal View History

2024-11-07 04:34:06 +00:00
# Changelog
2024-11-08 05:37:54 +00:00
## Upcoming Changes
2024-11-21 05:14:09 +00:00
## Version 1.4
2024-11-18 08:10:41 +00:00
Implemented "IF", "ELSEIF", "ELSE", "ENDIF", and "INDEX" for templates.
2024-11-21 05:06:09 +00:00
IF is used like: `{{{!IF Variable==SomeString}}}`.
ELSEIF is used like: `{{{!ELSEIF Variable==AnotherString}}}`.
ELSE is used like: `{{{!ELSE}}}`.
ENDIF is used like: `{{{!ENDIF}}}`.
2024-11-18 08:10:41 +00:00
INDEX is used like: `{{{!INDEX ArrayVar[2]}}}`.
2024-11-20 07:16:25 +00:00
Implemented "FOREACH" and "ENDFOREACH" for templates.
FOREACH is used like:
2024-11-21 05:06:09 +00:00
PATH=/
2024-11-20 07:16:25 +00:00
HTML='''
{{{!FOREACH ArrayVar}}}
{{{ArrayVar}}}
{{{!ENDFOREACH}}}'''
ArrayVar=FirstValue
ArrayVar=SecondValue
ArrayVar=ThirdValue
For multiple variables to expand in FOREACH:
2024-11-21 05:06:09 +00:00
PATH=/
HTML='''
{{{!FOREACH ArrayVar!ArrayVarSecond!ArrayVarThird}}}
{{{ArrayVar}}}
{{{ArrayVarSecond}}}
{{{ArrayVarThird}}}
{{{!ENDFOREACH}}}'''
ArrayVar=FirstVarOnce
ArrayVar=FirstVarTwice
ArrayVarSecond=SecondVarOnce
ArrayVarSecond=SecondVarTwice
ArrayVarThird=ThirdVarOnce
ArrayVarThird=ThirdVarTwice
2024-11-20 07:16:25 +00:00
Implemented nestable "IF" and "FOREACH" expressions in templates. In other
words, there can be `{{{!IF}}}` inside other IF/FOREACH blocks, and vice versa.
2024-11-14 01:41:43 +00:00
## Version 1.3
2024-11-12 08:18:21 +00:00
Fix internal erronous buffer declaration.
2024-11-12 08:26:33 +00:00
Fix internal missing NULL check.
2024-11-12 03:04:30 +00:00
## Version 1.2
Add the `--generate-dir=<DIR>` option, which will generate all html into the
given directory. This requires `--config=<CONFIG_FILE>`.
`--generate-enable-overwrite` is required to overwrite existing files when using
`--generate-dir=<DIR>`.
If `--enable-static-dir=<DIR>` is also specified with generate, then the files
in the given directory will be copied into the directory specified with
`--generate-dir=<DIR>`.
2024-11-08 06:20:08 +00:00
## Version 1.1
2024-11-08 05:37:54 +00:00
Some refactoring of code handling parsing the config file.
Remove buffer-size-limit on config file entries.
2024-11-07 04:34:06 +00:00
## Version 1.0
First release.
Features:
- Serve templated html files via a config.
- Reload configuration on SIGUSR1 or by listening (enabled by cmd parameter).
- Cache served html (enabled by cmd parameter).
- Serve static files from "static-dir" (enabled by cmd parameter).