diff --git a/Makefile b/Makefile index 3769455..7bfb628 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,18 @@ -PREFIX=/usr/local -INSTALLDIR=$(DESTDIR)$(PREFIX) +build: format gmi.min.css gmi-web.1 gmi.css.5 + +gmi-web.1: gmi-web.1.scd + scdoc < $< > $@ + +gmi.min.css: gmi.css + cat $< | ./node_modules/minify/bin/minify.js --css > $@ + +gmi.css.5: gmi.css.5.scd + scdoc < $< > $@ format: ./node_modules/prettier/bin-prettier.js --write gmi.css ./node_modules/prettier/bin-prettier.js --write *.js !*.min.js -gmi.min.css: gmi.css - cat $< | ./node_modules/minify/bin/minify.js --css > $@ - -gmi-web.1: gmi-web.1.scd - scdoc < $< > $@ - -build: format gmi.min.css gmi-web.1 clean: rm -rf gmi.min.* gmi-web.1 diff --git a/README.md b/README.md index 09bf146..d811c6e 100644 --- a/README.md +++ b/README.md @@ -4,55 +4,63 @@ # HTML spec -Due to the ambiguity of HTML several translations from Gemini exist in the wild. I propose the following standard: - -``` -
↔ > -↔ ``` - ↔ => -↔ #[##] - -``` - -The `` for a link should be presented without any parent elements. Many implementations use `
` to enforce "block" styling as opposed to the default "inline" which renders the link next to the previous block instead of below it. But the nested markup adds an unnecessary layer of indirection in semantics and when parsing. `` has the same effect (gmi.css uses this). - -Empty lines should simply be represented as `` this sets up `contenteditable=true` to add content to the line compared to just `
`. - -Much like the lines of a ``, the lines of `list items ` need to be wrapped in ``. - -### head +## `` The generated HTML document must have a `` tag with _at minimum_ the following: -``` +```html + + + ``` -It is recommended to also include a `
` tag and `` tags for _language_, the _canonical_ gemini url and _description_. +You might want to also include these (or whatever else): + +```html + ` + +The converted Gemini document should be placed inside the ``. Due to the ambiguity of HTML several translations from Gemini exist in the wild. I propose the following standard: + +``` ++ + +``` + +## ` + ↔ => +
↔ ``` +↔ #[##] + - ↔ * +
↔ > +``` + +The `` for a link should be presented un-wrapped without any parent elements. Many implementations use `` or `` to enforce "block" styling as opposed to the default "inline" which renders the link next to the previous block instead of below it. But the nested markup adds an unnecessary layer of indirection in semantics. The best way to handle this is to include `` in the `
`. + +Empty lines should simply be represented as `` this sets up `contenteditable=true` to add content to the line compared to just `
`. + +Take care to render `` blocks with their original formatting, DO NOT indent the generated +HTML for these tags. + +Much like the lines of a ``, the lines of `- list items
` need to be wrapped in ``, indention here is not significant. Sometimes a list item is empty: `
- `. ### Optional: inline media -If a link is consumable by ``, `