{"id":68,"date":"2023-06-21T19:13:08","date_gmt":"2023-06-21T19:13:08","guid":{"rendered":"https:\/\/armados.sites.sch.gr\/?p=68"},"modified":"2023-06-21T19:13:08","modified_gmt":"2023-06-21T19:13:08","slug":"add-syntax-highlighting-in-wordpress-using-highlight-js","status":"publish","type":"post","link":"https:\/\/armados.sites.sch.gr\/?p=68","title":{"rendered":"Add Syntax Highlighting in WordPress using Highlight.js"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WordPress powers a lot of sites that provide excellent coding tutorials. If you own a similar website and would like to add syntax highlighting to your code blocks, you can use HighlightJS for the same.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">What is Highlight.js?<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Highlight.js is a simple Javascript library that allows you to highlight the syntax of your code blocks effortlessly. It auto-detects the most popular programming languages and has zero dependencies on any other external libraries.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"640\" src=\"https:\/\/armados.sites.sch.gr\/wp-content\/uploads\/2023\/06\/image.jpeg\" alt=\"\" class=\"wp-image-69\" srcset=\"https:\/\/armados.sites.sch.gr\/wp-content\/uploads\/2023\/06\/image.jpeg 960w, https:\/\/armados.sites.sch.gr\/wp-content\/uploads\/2023\/06\/image-300x200.jpeg 300w, https:\/\/armados.sites.sch.gr\/wp-content\/uploads\/2023\/06\/image-768x512.jpeg 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><figcaption class=\"wp-element-caption\">&#8220;<a href=\"https:\/\/stocksnap.io\/photo\/stars-galaxy-IJ5DPL13HR\" target=\"_blank\" rel=\"noreferrer noopener\">Stars Galaxy<\/a>&#8221; \u03b1\u03c0\u03cc <a href=\"https:\/\/stocksnap.io\/author\/622\" target=\"_blank\" rel=\"noreferrer noopener\">Rodion Kutsaev<\/a>\/ <a href=\"https:\/\/creativecommons.org\/publicdomain\/zero\/1.0\/?ref=openverse\" target=\"_blank\" rel=\"noreferrer noopener\">CC0 1.0<\/a><\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>WordPress powers a lot of sites that provide excellent coding tutorials. If you own a similar website and would like to add syntax highlighting to your code blocks, you can use HighlightJS for the same. What is Highlight.js? Highlight.js is a simple Javascript library that allows you to highlight the syntax of your code blocks [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":1,"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/armados.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}