.h
| let link = to_link("#" + to_text(self), to_text(self), "")
| let level = .h.depth
| if (not(is_none(level))): to_md_list(link, to_number(level))
select(not(.code))
.code("js")
.[1][]
.[1]
select(is_mdx())
.code.lang
.link.url
def snake_to_camel(x):
let words = split(x, "_")
| foreach (word, words):
let first_char = upcase(first(word))
| let rest_str = downcase(slice(word, 1, len(word)))
| s"${first_char}${rest_str}";
| join("");
| snake_to_camel()
def sitemap(item, base_url):
let path = replace(to_text(item), ".md", ".html")
| let loc = add(base_url, path)
| s"<url>
<loc>${loc}</loc>
<priority>1.0</priority>
</url>";
$ mq 'nodes | csv2table()' example.csv
$ mq -S 's"\n${__FILE__}\n"' 'identity()' docs/books/**/**.md