groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (off topic?) Docbook? Re: manlint?


From: Marc Chantreux
Subject: Re: (off topic?) Docbook? Re: manlint?
Date: Wed, 16 Sep 2020 07:55:23 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

> example, YAML has 6 fucking ways <https://stackoverflow.com/a/21699210>

actually 9 (see the comments) :) and i actually like it because i can
easily choose one of this way to serialize another content in a yaml.

i also love yaml because:

* it feels natural to read and edit to me
* it has references, datatypes, overwritting features

so whenever i have to edit datastructures that are not easy to serialize
with simple formats, yaml is my prefered format.

> Pug/Jade is a templating engine for HTML documents. It doesn't generate
> XML—the example you gave produces
> 
> <doc><title>My stupid document</title><enabled/></doc>

of course it does

    doc
        title My strupid document
        enabled/

    doc
        title My strupid document
        enabled/

> … which is neither valid HTML nor XML. It *would* be valid XML if it
> included the mandatory <?xml …?> directive;

so you can add it

    doctype xml
    doc
        title My strupid document
        enabled/

you can also add any arbitrary string anywere in the source

    |<?xml version="1.0" encoding="utf-8"?>
    doc
        title My strupid document
        enabled/

> In any case, Pug is simply one of *many* tools that provide syntactic sugar
> for HTML.

not that many achieved to let me:
* do whatever i need/want
* feel happy about editing the content

the only sad thing to me is that they added templating which makes
things harder to port and is not related to the initial goal which
is "a decent syntax for xml/html".

to me pug is a tool to *generate* templates so you can write

    < my-stupid-page.pug| my-template-engine-of-choice > index.html

in the mkfile of my site, i have

    template.%: %.pug
        $PUG < $prereq > $target
    pub/atom.xml: template.atom news.yaml
      pandoc -f markdown --template ./template.atom news.yaml > $target
    pub/%.html: %.md template.html
      pandoc --template ./template.html -o $target $prereq(1)

regards
marc







reply via email to

[Prev in Thread] Current Thread [Next in Thread]