38 lines
1.6 KiB
Markdown
38 lines
1.6 KiB
Markdown
# KarlOS Landing Page
|
|
|
|
This is the source code for the public [KarlOS](https://karlsruhe-os.de) landing page.
|
|
It is a static HTML website.
|
|
To reduce duplication, the source code is preprocessed by a set of POSIX shell + awk scripts
|
|
which allow you to set and insert variables, and to execute arbitrary shell commands (spicy!).
|
|
To build the website, simply run `build.sh`.
|
|
If you have SSH access to the server machine, you can run `deploy-to-server.sh`
|
|
to push your local state to the production web page.
|
|
|
|
## The Preprocessor Syntax
|
|
|
|
Lines starting with two percent signs are considered comments and ignored:
|
|
```html
|
|
%% This line won't show up in the resulting HTML
|
|
```
|
|
|
|
Lines starting with a percent sign and a tilde can execute shell commands:
|
|
```html
|
|
%~ date # Inserts the current date at the time the build script is run
|
|
```
|
|
In addition to regular shell commands, the following additional commands are also provided:
|
|
- `include <filename>`: Inserts the contents of the given file, recursively preprocessing it too.
|
|
- `include_raw <filename>`: Inserts the contents of the given file without any processing.
|
|
- `include_md <filename>`: Treats the given file as a markdown file, converting it to HTML and inserting it.
|
|
- `die <reason>`: Throw an error and stop building the website.
|
|
All commands are executed in the root directory of this repository.
|
|
|
|
Lines of the form `%VARIABLE:VALUE` can be used to store a string in a variable:
|
|
```html
|
|
%PAGE_TITLE:Hello, World!
|
|
```
|
|
|
|
Within any line that isn't one of the above directives, patterns of the form `%[VARIABLE]` are replaced by the string that is stored in the variable:
|
|
```
|
|
<title>%[PAGE_TITLE]</title>
|
|
```
|
|
|