From Markdown to HTML
As far as I know, it's not possible to structure markdown content into semantic sections like you can with regular HTML
. When you input:
# First
This is the first paragraph of the first section.
This is the second paragraph of the first section.
# Second
This is the first paragraph of the second section.
You'll just get a series of tags generated without any meaningful hierarchy.
This setup might make writing and parsing content easier, but it does pose challenges when it comes to applying custom styles selectively.
Hugo's Approach to Markdown
Hugo version 0.60+ now utilizes goldmark for handling Markdown
, as detailed in the Markup Configuration docs.
Interestingly, goldmark supports custom attributes, albeit limited to headings at this point.
## heading {#id .className attrName=attrValue class="class1 class2"}
For now, you can assign a specific class like .has-mla-ref
to a heading and then style its adjacent sibling accordingly.
For Example
.has-mla-ref + p {
padding-left: 36px;
text-indent: -36px;
}
### Reference {.has-mla-ref}
Best, David, and Sharon Marcus. “Surface Reading: An Introduction.” Representations, vol. 108, no. 1, Fall 2009, pp. 1-21. JSTOR, doi:10.1525/rep.2009.108.1.1
Moving on from references to regular content here.
Whether mere indentation suffices for MLA compliance or if more formatting is required beyond a single paragraph remains unclear. Nevertheless, this should provide some direction on how to proceed.