.TH pidgin 7 .SH NAME pidgin \- Pidgin Markup For Writing, or How Much Can HTML Sustain? .SH AUTHOR Artyom Bologov .SH SYNOPSIS HTML is flexible and was shaped by generations of web practitioners. It has enough tricks up its sleeve to actually be nice to author. Here are some. .SH TEXT .P \fBhypertext (7)\fP I am an HTML extremist. There’s this argument I often hear: “But HTML is cumbersome to write!” \fBfalsehoods-html (7)\fP Wrong, as many other myths about HTML. In this post, I’m detailing how I write my dialect of HTML and why it’s easy. .P This Pidgin HTML dialect is intimately tied to my website setup: \fBthis-post-is-ed (7)\fP I’m using ed(1) as my Static Site Generator. Which means the setup is: .P * I write my Pidgin HTML in \fB.htm\fP files. It’s a standard HTML extension, but it’s useful to differentiate from the resulting \fB.html\fP for build purposes. .P * I preprocess SSI-like comments and include files. .P * I convert overly smart and (slightly) weird tags into valid HTML. .P * And then I send the result to \fBcodeberg-pages (7)\fP Another Person’s Computer™ for you to see on aartaka.me. .P This setup is no rocket science, doing sloppy tags, regex substitutions, and shell scripts. And yet it results in a dialect of HTML that’s easy/er to write. And almost standard/conventional. Here’s a set of engines I’m testing my markup with: .P * .UR https://dillo.org Dillo .UE .P * .UR https://w3m.sourceforge.net w3m .UE .P * Firefox/LibreWolf .P * (Ungoogled) Chromium .P * WebKitGTK browser engine .P * .UR https://github.com/Shinmera/plump Plump .UE , an HTML parser for Lisp. .P So yeah, it does work everywhere, even as the raw source form. .P You can see the initial Pidgin HTML for this post rendered at .UR pidgin.htm pidgin.htm .UE , and .UR pidgin.htm download download it to preview the text behind it .UE . .UR https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Quirks_mode_and_standards_mode On to the quirks then .UE ! .SH Smart tags .P .UR https://merveilles.town/@aartaka/115669971371343412 HTML links are slightly painful to type out .UE . So I made my own syntax, knowing that my build regex will expand it for me: .P .in +4n .EX local link to other post .UR https://url.spec.whatwg.org/#scheme-relative-special-url-string Scheme-relative link .UE Arbitrary link without https:// formalities .EE .in .P — Simplified links .P There’s a bunch of other tags, like \fBword\fP for simpler \fBcode\fP tags. And shorter \fB\fP. Not much, but more than enough for comfortable writing. Now to the more grand things. .SH Implied End Tags .P I think this is the heritage of sloppy HTML 1/2/3 programming. You know, with shortcuts following authors’ practice. The primordial chaos reigning in the early Internet. .P Long story short, you don’t have to close \fB

\fP. Its end tag is implied and closed whenever e.g. the next opening \fB

\fParagraph tag is encountered. .UR https://html.spec.whatwg.org/#closing-elements-that-have-implied-end-tags Spec: li, dt, dd, td, and some others also work this way .UE . This is valid processable HTML: .P .in +4n .EX

hello

another hello

.EE .in .P — Implied end tags in action .B this ul... .EX .P You may’ve noticed the \fB