Hugo theme for source code viewer, using highlight.js and highlightjs-line-numbers for syntax highlighting.
Hugo has its own Highlight feature enabled by default.
It conflicts with highlight.js. You can disable hugo's highlight with config.toml
site settings.
You can also customize highlight.js look and feel in Params
section.
[markup.highlight]
codeFences = false # disable Hugo highlighting with Chroma
[Params]
color_scheme = "light" # dark(default) | light
highlight_theme = "atom-one-dark" # highlightjs theme name
Available highlight_theme
is listed on highlight.js site.
This theme includes code2md bash script.
It converts a git repository into hugo contents.
# Example Command. Current git repository is target by default.
$ ./bin/code2md /path/to/hugo_site/content/
code2md
reads source codes under specified directory, and simply puts markdown with code fences.
With generated markdown, you can run hugo
as usual.