Syntax highlight in ./layouts/index.html #1037
Replies: 2 comments
-
Actually, I think I do not need syntax highlight for ./layouts/index.html. But I am still interested if it is possible. I had already some trouble to get Monokai syntax highlight for Nim language working in markdown files at all, but now I finally got it. I hope I can remember tomorrow how I finally did it, then I will write some notes for it. It is really not that easy. It was also not easy to create a new menu, maybe called Books, as a replacement for Docs. One has to know, that we have to do "cp -r layouts/docs/ layouts/books/ to get it working. |
Beta Was this translation helpful? Give feedback.
-
Yes, that's correct. You could add ```bash
npm create hyas@latest
``` |
Beta Was this translation helpful? Give feedback.
-
In https://getdoks.org/docs/tutorial/add-pages/
we have
Customize the homepage
Open ./layouts/index.html in your code editor
I wonder if I can present some syntax highlighted source code on this page? Maybe replace
with a small source code snipped shown with syntax highlight for a programming language like golang. I know that Hugo supports syntax highlight, but I got it not to work. Maybe it works only for separate markdown files?
References: https://gohugo.io/content-management/syntax-highlighting/
Beta Was this translation helpful? Give feedback.
All reactions