{"id":310,"date":"2023-08-01T11:00:00","date_gmt":"2023-08-01T10:00:00","guid":{"rendered":"https:\/\/www.enbecom.net\/blog\/?p=310"},"modified":"2023-06-05T14:41:48","modified_gmt":"2023-06-05T13:41:48","slug":"enabling-dark-and-light-mode-in-javascript-a-guide","status":"publish","type":"post","link":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/","title":{"rendered":"Enabling Dark and Light mode in JavaScript \u2013 a guide"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p>\n    With the growing popularity of dark mode in modern web interfaces, it&#8217;s become increasingly important for developers to implement this feature. Whether you&#8217;re a seasoned professional or just starting with web development, this guide will walk you through the process of creating a toggle switch for dark and light themes in JavaScript.\n<\/p>\n\n<h2>Step 1: Detecting the User&#8217;s Preference<\/h2>\n\n<p>\n    Before we start writing our JavaScript code, we need to check the user&#8217;s preferred colour scheme. We can do this using the <code>window.matchMedia()<\/code> method.\n<\/p>\n\n<pre><code>\nconst prefersDarkScheme = window.matchMedia(\"(prefers-colour-scheme: dark)\").matches;\n\nif (prefersDarkScheme) {\n  document.body.classList.add(\"dark-theme\");\n} else {\n  document.body.classList.add(\"light-theme\");\n}\n<\/code><\/pre>\n\n<p>\n    This code checks the user&#8217;s operating system colour scheme preference and adds a class (<code>dark-theme<\/code> or <code>light-theme<\/code>) to the body of your document accordingly.\n<\/p>\n\n<h2>Step 2: Loading the Appropriate Styles<\/h2>\n\n<p>\n    Next, we&#8217;ll need to define our colour schemes in CSS. We&#8217;ll create two classes: one for our light theme and another for our dark theme. \n<\/p>\n\n<pre><code>\n\/* Default to light theme *\/\nbody {\n  background-colour: white;\n  colour: black;\n}\n\n\/* Dark theme *\/\nbody.dark-theme {\n  background-colour: black;\n  colour: white;\n}\n\n\/* Light theme *\/\nbody.light-theme {\n  background-colour: white;\n  colour: black;\n}\n<\/code><\/pre>\n\n<p>\n    You&#8217;ll likely have more style changes, but this example serves to illustrate the idea. Make sure to import your CSS file into your HTML document.\n<\/p>\n\n<h2>Step 3: Adding a Toggle Switch<\/h2>\n\n<p>\n    Finally, we&#8217;ll add a button to our HTML that allows users to switch between our dark and light themes. \n<\/p>\n\n<pre><code>\n&lt;button id=\"theme-toggle\"&gt;Toggle theme&lt;\/button&gt;\n<\/code><\/pre>\n\n<p>\n    We can then add an event listener to this button in JavaScript, which will switch the theme whenever it&#8217;s clicked.\n<\/p>\n\n<pre><code>\nconst themeToggle = document.getElementById(\"theme-toggle\");\n\nthemeToggle.addEventListener(\"click\", function() {\n  const currentTheme = document.body.classList.contains(\"dark-theme\") ? \"dark\" : \"light\";\n  \n  \/\/ Switch from light to dark or from dark to light\n  if (currentTheme === \"dark\") {\n    document.body.classList.replace(\"dark-theme\", \"light-theme\");\n  } else {\n    document.body.classList.replace(\"light-theme\", \"dark-theme\");\n  }\n});\n<\/code><\/pre>\n\n<h2>Remembering the User&#8217;s Choice<\/h2>\n\n<p>\n    The above code doesn&#8217;t remember the user&#8217;s choice, so each time the user revisits your website, the colour scheme will reset to the operating system&#8217;s preference. If you want to store the user&#8217;s choice, you can use the <code>localStorage<\/code> object:\n<\/p>\n\n<pre><code>\n\/\/ Check local storage then system preference for theme\nlet currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : (window.matchMedia(\"(prefers-colour-scheme: dark)\").matches ? \"dark\" : \"light\");\n\n\/\/ Set the body class based on the current theme\ndocument.body.classList.add(currentTheme + \"-theme\");\n\n\/\/ Click event handler\nthemeToggle.addEventListener(\"click\", function() {\n  currentTheme = document.body.classList.contains(\"dark-theme\") ? \"dark\" : \"light\";\n  \n  \/\/ Switch from light to dark or from dark to light\n  if (currentTheme === \"dark\") {\n    document.body.classList.replace(\"dark-theme\", \"light-theme\");\n    currentTheme = \"light\";\n  } else {\n    document.body.classList.replace(\"light-theme\", \"dark-theme\");\n    currentTheme = \"dark\";\n  }\n\n  \/\/ Save the current theme in local storage\n  localStorage.setItem('theme', currentTheme);\n});\n<\/code><\/pre>\n\n<p>\n    In this enhanced version, the user&#8217;s theme choice is stored in local storage and checked on page load. If there&#8217;s no saved choice, the code defaults to the operating system&#8217;s preference. Then, each time the user changes the theme, their choice is saved to local storage.\n<\/p>\n<p>\n    That&#8217;s all there is to it! With a bit of JavaScript and CSS, you can provide a more comfortable and personalised user experience on your website. Whether your users prefer dark or light mode, they&#8217;ll appreciate the option to choose.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the growing popularity of dark mode in modern web interfaces, it&#8217;s become increasingly important for developers to implement this feature. Whether you&#8217;re a seasoned professional or just starting with web development, this guide will walk you through the process of creating a toggle switch for dark and light themes in JavaScript. Step 1: Detecting&hellip; <a class=\"more-link\" href=\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\">Continue reading <span class=\"screen-reader-text\">Enabling Dark and Light mode in JavaScript \u2013 a guide<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":315,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-310","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enbecom-blog","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Enabling Dark and Light mode in JavaScript \u2013 a guide - Enbecom Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enabling Dark and Light mode in JavaScript \u2013 a guide - Enbecom Blog\" \/>\n<meta property=\"og:description\" content=\"With the growing popularity of dark mode in modern web interfaces, it&#8217;s become increasingly important for developers to implement this feature. Whether you&#8217;re a seasoned professional or just starting with web development, this guide will walk you through the process of creating a toggle switch for dark and light themes in JavaScript. Step 1: Detecting&hellip; Continue reading Enabling Dark and Light mode in JavaScript \u2013 a guide\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Enbecom Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/enbecom\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-01T10:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Blog Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@enbecom\" \/>\n<meta name=\"twitter:site\" content=\"@enbecom\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Blog Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\"},\"author\":{\"name\":\"Blog Admin\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/#\/schema\/person\/d415fd1eb526d766ec09aa565380ec63\"},\"headline\":\"Enabling Dark and Light mode in JavaScript \u2013 a guide\",\"datePublished\":\"2023-08-01T10:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\"},\"wordCount\":359,\"publisher\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png\",\"articleSection\":[\"Enbecom Blog\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\",\"url\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\",\"name\":\"Enabling Dark and Light mode in JavaScript \u2013 a guide - Enbecom Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png\",\"datePublished\":\"2023-08-01T10:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage\",\"url\":\"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png\",\"contentUrl\":\"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png\",\"width\":1600,\"height\":900},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.enbecom.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enabling Dark and Light mode in JavaScript \u2013 a guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/#website\",\"url\":\"https:\/\/www.enbecom.net\/blog\/\",\"name\":\"Enbecom Blog\",\"description\":\"All the latest from Enbecom\",\"publisher\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.enbecom.net\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/#organization\",\"name\":\"Enbecom\",\"url\":\"https:\/\/www.enbecom.net\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/01\/ENBECOM-LOGO-150.jpg\",\"contentUrl\":\"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/01\/ENBECOM-LOGO-150.jpg\",\"width\":440,\"height\":130,\"caption\":\"Enbecom\"},\"image\":{\"@id\":\"https:\/\/www.enbecom.net\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/enbecom\",\"https:\/\/x.com\/enbecom\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/#\/schema\/person\/d415fd1eb526d766ec09aa565380ec63\",\"name\":\"Blog Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.enbecom.net\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/58b4ebe67dbe60f4a38badaddd6c802be45bdda4f8023142936151ed12228862?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/58b4ebe67dbe60f4a38badaddd6c802be45bdda4f8023142936151ed12228862?s=96&d=mm&r=g\",\"caption\":\"Blog Admin\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enabling Dark and Light mode in JavaScript \u2013 a guide - Enbecom Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/","og_locale":"en_GB","og_type":"article","og_title":"Enabling Dark and Light mode in JavaScript \u2013 a guide - Enbecom Blog","og_description":"With the growing popularity of dark mode in modern web interfaces, it&#8217;s become increasingly important for developers to implement this feature. Whether you&#8217;re a seasoned professional or just starting with web development, this guide will walk you through the process of creating a toggle switch for dark and light themes in JavaScript. Step 1: Detecting&hellip; Continue reading Enabling Dark and Light mode in JavaScript \u2013 a guide","og_url":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/","og_site_name":"Enbecom Blog","article_publisher":"https:\/\/www.facebook.com\/enbecom","article_published_time":"2023-08-01T10:00:00+00:00","og_image":[{"width":1600,"height":900,"url":"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png","type":"image\/png"}],"author":"Blog Admin","twitter_card":"summary_large_image","twitter_creator":"@enbecom","twitter_site":"@enbecom","twitter_misc":{"Written by":"Blog Admin","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#article","isPartOf":{"@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/"},"author":{"name":"Blog Admin","@id":"https:\/\/www.enbecom.net\/blog\/#\/schema\/person\/d415fd1eb526d766ec09aa565380ec63"},"headline":"Enabling Dark and Light mode in JavaScript \u2013 a guide","datePublished":"2023-08-01T10:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/"},"wordCount":359,"publisher":{"@id":"https:\/\/www.enbecom.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png","articleSection":["Enbecom Blog"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/","url":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/","name":"Enabling Dark and Light mode in JavaScript \u2013 a guide - Enbecom Blog","isPartOf":{"@id":"https:\/\/www.enbecom.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png","datePublished":"2023-08-01T10:00:00+00:00","breadcrumb":{"@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#primaryimage","url":"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png","contentUrl":"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/08\/Blog-Header.png","width":1600,"height":900},{"@type":"BreadcrumbList","@id":"https:\/\/www.enbecom.net\/blog\/2023\/08\/01\/enabling-dark-and-light-mode-in-javascript-a-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.enbecom.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Enabling Dark and Light mode in JavaScript \u2013 a guide"}]},{"@type":"WebSite","@id":"https:\/\/www.enbecom.net\/blog\/#website","url":"https:\/\/www.enbecom.net\/blog\/","name":"Enbecom Blog","description":"All the latest from Enbecom","publisher":{"@id":"https:\/\/www.enbecom.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.enbecom.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.enbecom.net\/blog\/#organization","name":"Enbecom","url":"https:\/\/www.enbecom.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.enbecom.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/01\/ENBECOM-LOGO-150.jpg","contentUrl":"https:\/\/www.enbecom.net\/blog\/wp-content\/uploads\/2023\/01\/ENBECOM-LOGO-150.jpg","width":440,"height":130,"caption":"Enbecom"},"image":{"@id":"https:\/\/www.enbecom.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/enbecom","https:\/\/x.com\/enbecom"]},{"@type":"Person","@id":"https:\/\/www.enbecom.net\/blog\/#\/schema\/person\/d415fd1eb526d766ec09aa565380ec63","name":"Blog Admin","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.enbecom.net\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/58b4ebe67dbe60f4a38badaddd6c802be45bdda4f8023142936151ed12228862?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/58b4ebe67dbe60f4a38badaddd6c802be45bdda4f8023142936151ed12228862?s=96&d=mm&r=g","caption":"Blog Admin"}}]}},"_links":{"self":[{"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/posts\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":2,"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/posts\/310\/revisions\/312"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/media\/315"}],"wp:attachment":[{"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.enbecom.net\/blog\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}