Fix code blocks in spartan wiki page

This commit is contained in:
hedy 2022-03-29 13:04:50 +08:00
parent c8bd06589e
commit cb3ea33d9e
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
1 changed files with 6 additions and 11 deletions

View File

@ -67,27 +67,22 @@ preventing someone else from overwriting your files, with their scripts!
you can also check for the user's input. for example, you your `index.gmi` you
can have a input prompt:
```gmi
=: echo.sh send some input
```
=: echo.sh send some input
then in `echo.sh`:
```sh
#!/usr/bin/env sh
#!/usr/bin/env sh
printf "2 application/octet-stream\r\n"
cat /dev/stdin
```
printf "2 application/octet-stream\r\n"
cat /dev/stdin
try visiting your spartan page, enter some input on that link line and see the
result!
alternatively you could send input directly in gelim:
```sh
gelim spartan://username.tilde.cafe/echo.sh -Ii 'hello!'
```
gelim spartan://username.tilde.cafe/echo.sh -Ii 'hello!'
(note: `-I` is so gelim quits immediately after displaying output, `-i` is for
sending the input)