Closed ghost closed 5 years ago
There is no syntax highlighting. This is WAI
Looks like Hugo can do this without MMark. First download this:
https://github.com/gohugoio/hugo/blob/master/docs/layouts/shortcodes/readfile.html
and put it as:
layouts/shortcodes/readfile.html
might need to create shortcodes
folder. Then add this to your markup:
{{< readfile highlight="php" file="content/posts/app.php" >}}
if you did these steps in reverse, might need to resave the markup for it to load the change.
https://mmark.miek.nl/post/syntax#including-files
This is not what I am getting. Using this markup:
Give me
but no highlighting. Further:
is not what I am getting either. If I use this:
again I just get a block without highlighting. Now if I follow this:
https://gohugo.io/content-management/syntax-highlighting
it works as expected:
but this syntax doesnt seem to work with including a file.