Externalize Hugo Code Examples #37
Labels
💡 enhancement
A new feature or enhancement request
🔨 Asciidoctor
Tool: Asciidoctor
⭐ assets
Topic: Hugo Book assets
⚠️ useful
Priority: Low
Milestone
The upcoming Asciidoctor v2.0.11 release will introduce a new feature allowing to
include::
external files in encodings other than UTF-8 (see asciidoctor/asciidoctor#3248 and mojavelinux/asciidoctor@4c008b00).When this release is out, we could externalize some code examples to actual Hugo source files — especially the exercises in the various What Should I Be Able to Do Now? sections, as well as Hugo Library snippets and long examples. Of course, that is if these code blocks don't contain extra AsciiDoc elements (footnotes, call-outs, etc.).
This could also allow the project to actually test the source files against Hugo compiler, and even automatically produce their output transcripts (i.e. via a CLI Hugo terp that can accept solution files and generate transcript logs).
These changes would also simplify future maintenance of the book, especially so if the Hugo Library is further developed, for by including its snippets directly from the library source would grant that the Hugo Book always mirrors the latest version of the Hugo Lib.
For more info see:
The text was updated successfully, but these errors were encountered: