Compare commits

..

48 Commits

Author SHA1 Message Date
sammyette 105b4dd3ce
website: remove "why hilbish" heading 2022-12-13 14:15:26 -04:00
sammyette c1d4f20b9f
website: add icons for list items, remove underline from links 2022-12-13 14:14:34 -04:00
sammyette 7b694f2919
website: remove bullet for doc navigation, make main pages bold 2022-12-13 14:02:44 -04:00
TorchedSammy 05570ec29a
website: add subpages to doc navigation and description 2022-12-12 20:50:56 -04:00
TorchedSammy dff65d6d03
website: add places to get hilbish at the try it today header 2022-12-10 17:18:24 -04:00
TorchedSammy dc4343c562
website: set (or change) max width of content to 80em specifically 2022-12-10 14:54:23 -04:00
TorchedSammy 8975ee8d2c
website(footer): reduce space in text 2022-12-10 14:53:15 -04:00
TorchedSammy 1097986fbb
website(footer): add correct links to footer 2022-12-10 14:52:46 -04:00
TorchedSammy 39a40fb08e
docs(website): add boostrap svg icons 2022-07-09 13:10:03 -04:00
TorchedSammy e1289c1da6
docs(website): use multiline string for shortcode 2022-07-09 13:05:53 -04:00
TorchedSammy 4ebf5a757c
docs(website): fix warning shortcode syntax 2022-07-09 12:57:55 -04:00
TorchedSammy 9757b1d16e
docs(website/getting-started): fix warning shortcode 2022-07-09 12:50:10 -04:00
TorchedSammy 7e85ee1ac3
docs(website): add warning shortcode and basic 404 page 2022-07-09 12:40:29 -04:00
TorchedSammy d5d8c05230
docs(website): add more content for website docs 2022-07-09 12:39:38 -04:00
TorchedSammy c293d442a9
ci: don't build website on prs 2022-06-26 19:08:18 -04:00
TorchedSammy 29d876e38e
chore: revert golua upgrade 2022-06-22 22:27:59 -04:00
TorchedSammy 94423173f3
docs(website): add content to front page 2022-06-22 22:05:10 -04:00
TorchedSammy a773c974f9
fix(website): make footer stay at bottom properly 2022-06-22 22:04:43 -04:00
TorchedSammy 9fefd7b53c
fix(website): fix footer to bottom of page 2022-06-22 17:06:44 -04:00
TorchedSammy 9a88b0c1ec
docs(website): add faq page 2022-06-22 17:04:26 -04:00
TorchedSammy 0138a30151
fix(website): use permalink for docs page instead of url 2022-06-22 16:08:37 -04:00
TorchedSammy 5a2fd055d1
fix(website): only hide x overflow 2022-06-22 15:56:55 -04:00
TorchedSammy ce13e50579
feat(website): improve doc side of website 2022-06-22 15:50:40 -04:00
TorchedSammy 2032795815
fix(website): don't center text content for main pages 2022-06-22 15:49:30 -04:00
TorchedSammy 09f5a3102e
fix(website): dont remove url on active page in navbar 2022-06-22 15:34:22 -04:00
TorchedSammy 50fbe72aa2
fix(website): page refs on navbar 2022-06-22 15:33:38 -04:00
TorchedSammy a6aa58f8fb
fix(website): block out link and highlight current page in nav bar 2022-06-22 15:18:57 -04:00
TorchedSammy 2e0eabbac7
fix(website): hide overflow 2022-06-22 13:24:41 -04:00
TorchedSammy 00c8cab8bb
fix(website): add doc layout for doc pages 2022-06-22 13:22:36 -04:00
TorchedSammy 1d7a34e0c5
fix(website): use dash to separate title and site title instead of vertical bar 2022-06-22 12:21:53 -04:00
TorchedSammy 54fc4f72ae
fix(website): clean up footer/header and make footer bg color match header 2022-06-22 11:57:32 -04:00
TorchedSammy c886a585e7
docs(website): fix typo in install steps and add docs landing 2022-06-22 10:55:08 -04:00
TorchedSammy 00d7942e1c
docs(website): fix description for home page 2022-06-21 23:31:21 -04:00
TorchedSammy 025a5b0925
docs(website): use either description or summary for embed 2022-06-21 23:27:32 -04:00
TorchedSammy a80487e287
docs: flip order of page title 2022-06-21 23:10:37 -04:00
TorchedSammy 2cb48afe44
docs(website): add title to install page 2022-06-21 23:10:21 -04:00
TorchedSammy b8ad86d341
docs(website): fix references to logo on website 2022-06-21 23:07:50 -04:00
TorchedSammy 1fb855286b
docs(website): fix headers in home page properly 2022-06-21 23:03:03 -04:00
TorchedSammy c80bede1d3
docs(website): fix base url casing 2022-06-21 22:51:08 -04:00
TorchedSammy 350162d084
docs(website): only make header light if it is on home 2022-06-21 22:50:52 -04:00
TorchedSammy 5b8820beab
docs(website): include more embed info 2022-06-21 22:50:24 -04:00
TorchedSammy 1c2e0fbe72
ci(website): combine cd and hugo in 1 run cmd 2022-06-21 22:36:51 -04:00
TorchedSammy b89b49e3de
ci: fix website build 2022-06-21 22:32:46 -04:00
TorchedSammy 635f89aa3a
docs(website): add install steps 2022-06-21 22:28:39 -04:00
TorchedSammy 3ef564a26d
ci: allow builds on website branch 2022-06-21 22:09:01 -04:00
TorchedSammy 6e2e85a830
docs: add website 2022-06-21 22:05:46 -04:00
TorchedSammy 7af90eb1f1
chore: fix go sum 2022-06-20 20:37:54 -04:00
TorchedSammy a6b52047f2
chore: update golua to popen branch 2022-06-20 20:33:09 -04:00
5 changed files with 68 additions and 42 deletions

View File

@ -2,7 +2,6 @@ baseURL = 'https://rosettea.github.io/Hilbish/'
languageCode = 'en-us'
title = 'Hilbish'
theme = 'hsh'
enableGitInfo = true
[menu]
[[menu.nav]]

View File

@ -5,7 +5,4 @@ weight: -40
menu: docs
---
Hilbish has a wide range of features to enhance the user's experience and
is always adding new ones. If there is something missing here or something
you would like to see, please [start a discussion](https://github.com/Rosettea/Hilbish/discussions)
or comment on any existing ones which match your request.

View File

@ -7,11 +7,61 @@ menu:
parent: "Features"
---
Hilbish allows you to change how interactive text can be interpreted.
This is mainly due to the fact that the default method Hilbish uses
is that it runs Lua first and then falls back to shell script.
Hilbish is *unique,* when interactive it first attempts to run input as
Lua and then tries shell script. But if you're normal, you wouldn't
really be using Hilbish anyway but you'd also not want this
(or maybe want Lua only in some cases.)
The "runner mode" of Hilbish is customizable via `hilbish.runnerMode`,
which determines how Hilbish will run user input. By default, this is
set to `hybrid` which is the previously mentioned behaviour of running Lua
first then going to shell script. If you want the reverse order, you can
set it to `hybridRev` and for isolated modes there is `sh` and `lua`
respectively.
You can also set it to a function, which will be called everytime Hilbish
needs to run interactive input. For example, you can set this to a simple
function to compile and evaluate Fennel, and now you can run Fennel.
You can even mix it with sh to make a hybrid mode with Lua replaced by
Fennel.
An example:
```lua
hilbish.runnerMode(function(input)
local ok = pcall(fennel.eval, input)
if ok then
return input, 0, nil
end
return hilbish.runner.sh(input)
end)
```
The `hilbish.runner` interface is an alternative to using `hilbish.runnerMode`
and also provides the sh and Lua runner functions that Hilbish itself uses.
A runner function is expected to return 3 values: the input, exit code, and an error.
The input return is there incase you need to prompt for more input.
If you don't, just return the input passed to the runner function.
The exit code has to be a number, it will be 0 otherwise and the error can be
`nil` to indicate no error.
## Functions
These are the "low level" functions for the `hilbish.runner` interface.
+ setMode(mode) > The same as `hilbish.runnerMode`
+ sh(input) -> input, code, err > Runs `input` in Hilbish's sh interpreter
+ lua(input) -> input, code, err > Evals `input` as Lua code
The others here are defined in Lua and have EmmyLua documentation.
These functions should be preferred over the previous ones.
+ setCurrent(mode) > The same as `setMode`, but works with runners managed
via the functions below.
+ add(name, runner) > Adds a runner to a table of available runners. The `runner`
argument is either a function or a table with a run callback.
+ set(name, runner) > The same as `add` but requires passing a table and
overwrites if the `name`d runner already exists.
+ get(name) > runner > Gets a runner by name. It is a table with at least a
run function, to run input.
+ exec(cmd, runnerName) > Runs `cmd` with a runner. If `runnerName` isn't passed,
the current runner mode is used.
In some cases, someone might want to switch to just shell script to avoid
it while interactive but still have a Lua config, or go full Lua to use
Hilbish as a REPL. This also allows users to add alternative languages,
instead of either like Fennel.

View File

@ -3,20 +3,14 @@ title: Install
description: Steps on how to install Hilbish on all the OSes and distros supported.
layout: page
---
# Github Prebuilt Binaries
The easiest and best way to get Hilbish is directly from Github.
For official stable releases, check out the latest [Github release.](https://github.com/Rosettea/Hilbish/releases/latest)
## Official Binaries
The best way to get Hilbish is to get a build directly from GitHub.
At any time, there are 2 versions of Hilbish recommended for download:
the latest stable release, and development builds from the master branch.
# Linux Repositories
Hilbish is packaged in a *few* repositories for some distros.
You can download both at any time, but note that the development builds may
have breaking changes.
For the latest **stable release**, check here: https://github.com/Rosettea/Hilbish/releases/latest
For a **development build**: https://nightly.link/Rosettea/Hilbish/workflows/build/master
## Package Repositories
### Arch Linux (AUR)
## Arch Linux (AUR)
Hilbish is on the AUR. Setup an AUR helper, and install.
Example with yay:
@ -29,10 +23,10 @@ Or, from master branch:
yay -S hilbish-git
```
### Alpine Linux
## Alpine Linux
Hilbish is currentlty in the testing/edge repository for Alpine.
Follow the steps [here](https://wiki.alpinelinux.org/wiki/Enable_Community_Repository)
(Using testing repositories) and install:
```
apk add hilbish
apk install hilbish
```

View File

@ -25,28 +25,14 @@
</ul>
</div>
</div>
<div class="p-3 col">
<div class="col" style="max-width: 80em; margin: auto;">
<div>
<h1>{{ .Title }}</h1>
<p><em>
{{ $date := .Date.UTC.Format "Jan 2, 2006" }}
{{ $lastmod := .Lastmod.UTC.Format "Jan 2, 2006" }}
{{ if and (ne $lastmod $date) (gt .Lastmod .Date) }}
Last updated {{ $lastmod }}<br>
{{ end }}
{{ if .Description }}
{{ .Description }}<br>
<p><i>{{ .Description }}</i></p>
{{ end}}
</em></p>
{{.Content}}
</div>
<div class="footer mt-auto">
<p class="card-small text-muted">
Want to help improve this page? <a href="https://github.com/Rosettea/Hilbish/issues/new/choose">Create an issue.</a>
</p>
</div>
</div>
</div>
{{ end }}