docs
This commit is contained in:
parent
88f1bb3c8b
commit
888be61458
|
@ -1,10 +1,10 @@
|
||||||
There are currently three core components to gmi-web.
|
There are currently three core components to gmi-web.
|
||||||
|
|
||||||
- `html.js` gmi-to-html implementation
|
- `html.js` gmi-to-html implementation
|
||||||
- `gmi.css` and `gmi-web.css` stylesheets
|
- `gmi.css` and `gmi-web.css` stylesheets consumed by `css.js`
|
||||||
- gmi-web(1) as defined by `cli.js`
|
- gmi-web(1) as defined by `cli.js`
|
||||||
|
|
||||||
The stylesheets are simple enough to modify. The latter two may compel you to clone this repo and make changes you'd like to test locally. You will need [node(1)](https://nodejs.org/en/) and [scdoc(1)](https://git.sr.ht/~sircmpwn/scdoc) to run `cli.js` and build the `gmi-web.1.scd` man page. `npm link` will install gmi-web(1) from the source allowing you to make modifications locally and test them immediately.
|
You will need [node(1)](https://nodejs.org/en/) and [scdoc(1)](https://git.sr.ht/~sircmpwn/scdoc) to run `cli.js` and build the `gmi-web.1.scd` man page. `npm link` will install gmi-web(1) from the source allowing you to make modifications locally and test them immediately.
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://codeberg.org/talon/gmi-web.git
|
git clone https://codeberg.org/talon/gmi-web.git
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,5 +1,3 @@
|
||||||
This project is home to a [gmi-to-html reference](#gmi-to-html), a [gmi.css](#gmi-css) stylesheet and the [gmi-web(1) ](#gmi-web-1) command-line tool.
|
|
||||||
|
|
||||||
# gmi-to-html
|
# gmi-to-html
|
||||||
|
|
||||||
The converted Gemini document should exist inside the `<body>`. Consider if sharing the page with other HTML to put the core document inside `<main>`. [Each Gemini line-type](https://gemini.circumlunar.space/docs/specification.html#5-3-line-orientation) may be translated using the following guide:
|
The converted Gemini document should exist inside the `<body>`. Consider if sharing the page with other HTML to put the core document inside `<main>`. [Each Gemini line-type](https://gemini.circumlunar.space/docs/specification.html#5-3-line-orientation) may be translated using the following guide:
|
||||||
|
@ -46,7 +44,7 @@ These may also be nice to have:
|
||||||
|
|
||||||
# gmi.css
|
# gmi.css
|
||||||
|
|
||||||
[gmi.css](./gmi.css) is a maximally miniminal stylesheet that overrides the default CSS [Normal Flow](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Normal_Flow) to render content horizontally in a Gemini way. [gmi-web.css](./gmi-web.css) extends upon that slightly with font and color options. The default values are optimized for readability and mobile-friendliness and may be customized by adding a style property to `<html>`.
|
`gmi.css` is a maximally miniminal stylesheet that overrides the default CSS [Normal Flow](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Normal_Flow) to render content horizontally in a Gemini way. `gmi-web.css` extends upon that slightly with font and color options. The default values are optimized for readability and mobile-friendliness and may be customized by adding a style property to `<html>`.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<head>
|
<head>
|
||||||
|
@ -90,15 +88,15 @@ A JSON file can be passed to `--config` for conveniently applying any option wit
|
||||||
gmi-web --config web.json $(find ~/gmi/dst -name '*.gmi')
|
gmi-web --config web.json $(find ~/gmi/dst -name '*.gmi')
|
||||||
```
|
```
|
||||||
|
|
||||||
## custom css
|
## css
|
||||||
|
|
||||||
It is possible to use your own set of completely custom CSS rules _and_ variables by pointing to a file containing them.
|
gmi-web ships with `gmi.css` and `gmi-web.css` but it is possible to use your own set of completely custom CSS rules _and_ variables by pointing to a file containing them!
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gmi-web --body --css custom.css < doc.gmi
|
gmi-web --body --css custom.css < doc.gmi
|
||||||
```
|
```
|
||||||
|
|
||||||
gmi-web auto-detects the need for the `<meta>` color-schemes and allows for using `--inline` to insert the declarations as `style` properties on their respective blocks. Variables defined in `:root` will be picked up and made available for configuration just like gmi-web.css.
|
gmi-web auto-detects the need for the `<meta>` color-schemes and allows for using `--inline` to insert the declarations as `style` properties on their respective blocks. Variables defined in `:root` will be picked up and made available for configuration just like `gmi-web.css`.
|
||||||
|
|
||||||
```
|
```
|
||||||
gmi-web [files..]
|
gmi-web [files..]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
gmi-web(1)
|
gmi-web(1) 1.0.0
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue