Syntax Highlighting

Hyvor Blogs has a powerful syntax highlighter with the following features:

Most importantly, syntax highlighting is done at the time of rendering posts in our back-end. Therefore, it does not require any additional Javascript or CSS.

Languages

Our syntax highlighter supports 141 programming languages:

Supported Languages
abapactionscript-3adaapacheapexaplapplescriptasmastroawkballerinabat, batchberry, bebibtexbicepbladeccadence, cdcclarityclojure, cljcmakecobolcodeql, qlcoffeecppcrystalcsharp, c#csscueddartdiffdockerdream-makerelixirelmerberlangfishfsharp, f#gherkingit-commitgit-rebaseglslgnuplotgographqlgroovyhackhamlhandlebars, hbshaskellhclhlslhtmlinijavajavascript, jsjinja-htmljsonjsoncjsonnetjssm, fsljsxjuliakotlinlatexlessliquidlisplogoluamake, makefilemarkdown, mdmarkomatlabmdxmermaidnginxnimnixobjective-c, objcobjective-cppocamlpascalperlphpplsqlpostcsspowershell, ps, ps1prismaprologpug, jadepuppetpurescriptpython, pyrraku, perl6razorrelriscvrstruby, rbrust, rssassassscalaschemescssshaderlab, shadershellscript, shell, bash, sh, zshsmalltalksoliditysparqlsqlssh-configstatastylus, stylsvelteswiftsystem-verilogtasltcltextomltsxturtletwigtypescript, tsvb, cmdverilogvhdlviml, vim, vimscriptvue-htmlvuewasmwenyan, 文言xmlxslyamlzenscript

Themes

Hyvor Blogs supports 28 VS Code themes.

Supported Themes
dark-plusdracula-softdraculagithub-dark-dimmedgithub-darkgithub-lighthc_lightlight-plusmaterial-darkermaterial-defaultmaterial-lightermaterial-oceanmaterial-palenightmin-darkmin-lightmonokainordone-dark-propoimandresrose-pine-dawnrose-pine-moonrose-pineslack-darkslack-ochinsolarized-darksolarized-lightvitesse-darkvitesse-light

Adding Code Blocks to Your Post

See Code Block in Writing.

Annotations

Annotations are used for highlighting, focusing, and numbering lines. You can add annotations to the code block in the Editor. Let's see some examples.

Annotation Description
h=1 Highlights the first line
h=1-5 Highlights line 1 to 5
h=1,5,6 Highlights line 1, 5, and 6
h=1-4,7 Highlights 1 to 4, and then 7
f=1 Focuses number 1 (Works exactly as highlight)
+=12 Highlights the 12th line in green (for Diff add)
-=20 Highlights the 20th line in red (for Diff remove)
renumber=4:21 Number of the 4th line will be changed to 21. The next line will have 22.
renumber=6:null Number of the 6th line will be hidden
h=1 +=12 You can have multiple space separated annotations
numbers=true Enable line numbers (to override global settings)
numbers=false Disable line numbers (to override global settings)

Tips