Neopolitan - Preformatted And HTML Content Type
Preformatted content can be used for ` pre [TODO: Code shorthand span ] sections. Content rendering engines can then output the text without any processing, modificaiton, or escaping.
In addition to ` code [TODO: Code shorthand span ] blocks I use the preformatted content type for ` css [TODO: Code shorthand span ] sections that lets me pass styles and javascript directly to the engine which adds them to the head of the document. With that I can add arbitrary CSS or JS to any page from the content itself.
For example, here's the code I've added to the page to make the sample header purple with green text
-- css
.codeSection .sectionTitle {
background-color: purple;
color: green;
}
The preformatted content type can also be used to HTML directly since the renderer can output it without modification.
Previous
: