{"componentChunkName":"component---src-gatsby-theme-try-ghost-templates-post-js","path":"/quran-in-new-tab-chrome-extension/","result":{"data":{"customPost":{"id":"Ghost__Post__6127ba1b3ed159214d382e6f","title":"Quran In New Tab - Chrome Extension","slug":"quran-in-new-tab-chrome-extension","featured":false,"feature_image":"https://res-5.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/quran.jpg","excerpt":"Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly.","custom_excerpt":"Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly.","visibility":"public","created_at_pretty":"26 Oct 2020","published_at_pretty":"6 Nov 2019","updated_at_pretty":"26 Aug 2021","created_at":"2020-10-26T21:42:23.000+00:00","published_at":"2019-11-06T18:23:00.000+00:00","updated_at":"2021-08-26T17:54:06.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG_0591.jpg","publicURL":"/static/ceb49c3c631485453e71e00d7f84b069/IMG_0591.jpg","imageMeta":{"width":1182,"height":1179},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMEAQL/xAAWAQEBAQAAAAAAAAAAAAAAAAADBAL/2gAMAwEAAhADEAAAAdXiFM6i0CohUWXoKn//xAAcEAACAgIDAAAAAAAAAAAAAAACAwESBBEhM0H/2gAIAQEAAQUCWySE3WEr7SzbXjAj4iKty+sOQ//EABYRAQEBAAAAAAAAAAAAAAAAAAERIP/aAAgBAwEBPwEhj//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAIBBAMBAAAAAAAAAAAAAAABIRESMUECECJx/9oACAEBAAY/ApVGWvOjzgtUwLlTZA0sdL4f/8QAHBAAAwACAwEAAAAAAAAAAAAAAAERITFBkbHB/9oACAEBAAE/IahkCy+N2GwZpjQiJHJCspUFY0QrSi+HqiW2rgf/2gAMAwEAAgADAAAAEPw3/wD/xAAYEQEBAAMAAAAAAAAAAAAAAAAAARExQf/aAAgBAwEBPxCtjDqP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQAxEf/aAAgBAgEBPxBFus6Tt//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcYGR0f/aAAgBAQABPxAuaBPPzkO1wyX7F4wkwXanfZrFQgeqE9JgS14vVOvrERIJomVBKwt2jebAeP0yVa8h1n//2Q==","aspectRatio":1,"src":"/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg","srcSet":"/static/ceb49c3c631485453e71e00d7f84b069/f340b/IMG_0591.jpg 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/22d64/IMG_0591.jpg 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/aa249/IMG_0591.jpg 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/0dc33/IMG_0591.jpg 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/d8257/IMG_0591.jpg 1182w","srcWebp":"/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp","srcSetWebp":"/static/ceb49c3c631485453e71e00d7f84b069/59cda/IMG_0591.webp 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/7da75/IMG_0591.webp 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/f282e/IMG_0591.webp 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/a7b21/IMG_0591.webp 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/63099/IMG_0591.webp 1182w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":" * Download Now\n   [https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en]\n\nReplace the new tab page with Quran verses and beautiful nature pictures. The\nverses and pictures are randomly generated hourly. You can choose to show or\nhide your top sites.\n\nNEW I am working on adding more languages to this extension, and I need help\nwith many of them. If you think you can help in translating it, please go here\n[https://crowdin.com/project/quran-in-new-tab-extension] to start helping!\n\n\n--------------------------------------------------------------------------------\n\nRecitations\nYou can play an audio of the recitation of the verse shown. You can choose from\nthe following reciters:\n\n * Mashary Rashid Alafasy\n * Abdallah Basfar\n * Abdurrahmaan As-Sudais\n * Abdul Samad\n\nand many more.\n\n\n--------------------------------------------------------------------------------\n\nTranslations\nYou can turn on the translation for the verses. Some of the languages available\nfor translations are:\n\n * English\n * German\n * Spanish\n * Indonesian\n * Italian\n\nand many more.\n\n\n--------------------------------------------------------------------------------\n\nAthkar\nStarting from version 1.0, you can show randomly generated Athkar on your new\ntab as well.\n\n\n--------------------------------------------------------------------------------\n\nCredits\nAll Quran verses, audios and translations use the API of Al Quran Cloud\nIcons from Feather\nLogo from https://www.freeiconspng.com/img/8824\n\n\n\n--------------------------------------------------------------------------------\n\nIssues\nIf you find any issues or bugs, please create an issue on the Github Repo\n[https://github.com/shahednasser/quran-extension].","html":"<!--kg-card-begin: html--><ul class=\"actions special\">\n                    <li><a href=\"https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en\" class=\"button large\">Download Now</a></li>\n                </ul><!--kg-card-end: html--><p>Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly. You can choose to show or hide your top sites.</p><p><strong>NEW </strong>I am working on adding more languages to this extension, and I need help with many of them. If you think you can help in translating it, please go <a href=\"https://crowdin.com/project/quran-in-new-tab-extension\">here</a> to start helping!</p><hr><h2 id=\"recitations\">Recitations</h2><p>You can play an audio of the recitation of the verse shown. You can choose from the following reciters:</p><ul><li>Mashary Rashid Alafasy</li><li>Abdallah Basfar</li><li>Abdurrahmaan As-Sudais</li><li>Abdul Samad</li></ul><p>and many more.</p><hr><h2 id=\"translations\">Translations</h2><p>You can turn on the translation for the verses. Some of the languages available for translations are:</p><ul><li>English</li><li>German</li><li>Spanish</li><li>Indonesian</li><li>Italian</li></ul><p>and many more.</p><hr><h2 id=\"athkar\">Athkar</h2><p>Starting from version 1.0, you can show randomly generated Athkar on your new tab as well.</p><hr><h2 id=\"credits\">Credits</h2><p>All Quran verses, audios and translations use the API of Al Quran Cloud<br>Icons from Feather<br>Logo from <a href=\"https://www.freeiconspng.com/img/8824\">https://www.freeiconspng.com/img/8824</a><br></p><hr><h2 id=\"issues\">Issues</h2><p>If you find any issues or bugs, please create an issue on the <a href=\"https://github.com/shahednasser/quran-extension\">Github Repo</a>.</p>","url":"https://backend.shahednasser.com/quran-in-new-tab-chrome-extension/","canonical_url":"https://shahednasserblog.tk/quran-in-new-tab-chrome-extension","uuid":"6cb8f7dc-9ccd-4e56-b4ad-d8e72803f26f","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"5f9742bfb366d4001e86ccb9","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<!--kg-card-begin: html--><ul class=\"actions special\">\n                    <li><a href=\"https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en\" class=\"button large\">Download Now</a></li>\n                </ul><!--kg-card-end: html--><p>Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly. You can choose to show or hide your top sites.</p><p><strong>NEW </strong>I am working on adding more languages to this extension, and I need help with many of them. If you think you can help in translating it, please go <a href=\"https://crowdin.com/project/quran-in-new-tab-extension\">here</a> to start helping!</p><hr><h2 id=\"recitations\">Recitations</h2><p>You can play an audio of the recitation of the verse shown. You can choose from the following reciters:</p><ul><li>Mashary Rashid Alafasy</li><li>Abdallah Basfar</li><li>Abdurrahmaan As-Sudais</li><li>Abdul Samad</li></ul><p>and many more.</p><hr><h2 id=\"translations\">Translations</h2><p>You can turn on the translation for the verses. Some of the languages available for translations are:</p><ul><li>English</li><li>German</li><li>Spanish</li><li>Indonesian</li><li>Italian</li></ul><p>and many more.</p><hr><h2 id=\"athkar\">Athkar</h2><p>Starting from version 1.0, you can show randomly generated Athkar on your new tab as well.</p><hr><h2 id=\"credits\">Credits</h2><p>All Quran verses, audios and translations use the API of Al Quran Cloud<br>Icons from Feather<br>Logo from <a href=\"https://www.freeiconspng.com/img/8824\">https://www.freeiconspng.com/img/8824</a><br></p><hr><h2 id=\"issues\">Issues</h2><p>If you find any issues or bugs, please create an issue on the <a href=\"https://github.com/shahednasser/quran-extension\">Github Repo</a>.</p>","htmlAst":{"type":"root","children":[{"type":"comment","value":"kg-card-begin: html"},{"type":"element","tagName":"ul","properties":{"className":["actions","special"]},"children":[{"type":"text","value":"\n                    "},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en","className":["button","large"]},"children":[{"type":"text","value":"Download Now"}]}]},{"type":"text","value":"\n                "}]},{"type":"comment","value":"kg-card-end: html"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly. You can choose to show or hide your top sites."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"NEW "}]},{"type":"text","value":"I am working on adding more languages to this extension, and I need help with many of them. If you think you can help in translating it, please go "},{"type":"element","tagName":"a","properties":{"href":"https://crowdin.com/project/quran-in-new-tab-extension"},"children":[{"type":"text","value":"here"}]},{"type":"text","value":" to start helping!"}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"recitations"},"children":[{"type":"text","value":"Recitations"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can play an audio of the recitation of the verse shown. You can choose from the following reciters:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Mashary Rashid Alafasy"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Abdallah Basfar"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Abdurrahmaan As-Sudais"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Abdul Samad"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"and many more."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"translations"},"children":[{"type":"text","value":"Translations"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can turn on the translation for the verses. Some of the languages available for translations are:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"English"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"German"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Spanish"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Indonesian"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Italian"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"and many more."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"athkar"},"children":[{"type":"text","value":"Athkar"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Starting from version 1.0, you can show randomly generated Athkar on your new tab as well."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"credits"},"children":[{"type":"text","value":"Credits"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"All Quran verses, audios and translations use the API of Al Quran Cloud"},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"Icons from Feather"},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"Logo from "},{"type":"element","tagName":"a","properties":{"href":"https://www.freeiconspng.com/img/8824"},"children":[{"type":"text","value":"https://www.freeiconspng.com/img/8824"}]},{"type":"element","tagName":"br","properties":{},"children":[]}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"issues"},"children":[{"type":"text","value":"Issues"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you find any issues or bugs, please create an issue on the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/quran-extension"},"children":[{"type":"text","value":"Github Repo"}]},{"type":"text","value":"."}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"recitations","heading":"Recitations"},{"id":"translations","heading":"Translations"},{"id":"athkar","heading":"Athkar"},{"id":"credits","heading":"Credits"},{"id":"issues","heading":"Issues"}]},"featureImageSharp":{"base":"quran.jpg","publicURL":"/static/34fbf15a86a81d576af29f787f7f9f04/quran.jpg","imageMeta":{"width":2000,"height":2000},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGQABAAMBAQAAAAAAAAAAAAAAAAECBAUD/8QAFwEAAwEAAAAAAAAAAAAAAAAAAAECA//aAAwDAQACEAMQAAABiPXZL4zqApQRnGk//8QAHBAAAgICAwAAAAAAAAAAAAAAAQIAAxESBCEi/9oACAEBAAEFAkZwqrYjCm0zjuWm65OSUrTVfQsHf//EABYRAAMAAAAAAAAAAAAAAAAAAAAQIf/aAAgBAwEBPwEj/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oACAECAQE/AW1Uf//EABwQAAICAgMAAAAAAAAAAAAAAAABAhESISIxYf/aAAgBAQAGPwLGMHRxizo3R2i+Rko0/BaW0L1H/8QAGxABAAMAAwEAAAAAAAAAAAAAAQARITFhcZH/2gAIAQEAAT8hygnk5jjKt0hLFKb5DAWCu5Qr+0ChjpJSEaEXj1wh2imlXP/aAAwDAQACAAMAAAAQyy//AP/EABcRAQEBAQAAAAAAAAAAAAAAAAABETH/2gAIAQMBAT8QtYRev//EABgRAAIDAAAAAAAAAAAAAAAAAABRARAx/9oACAECAQE/EGKpiD//xAAdEAEAAwEAAgMAAAAAAAAAAAABABEhMUFRkaHR/9oACAEBAAE/EDnmh4F6kWROD1erfyWmXdi4b3JaDDzquW+eysWzpSybIjlo+4wwatkOOa8ybdone77bBUbUMDaZ8T//2Q==","aspectRatio":1,"src":"/static/34fbf15a86a81d576af29f787f7f9f04/d5c54/quran.jpg","srcSet":"/static/34fbf15a86a81d576af29f787f7f9f04/65d8c/quran.jpg 260w,\n/static/34fbf15a86a81d576af29f787f7f9f04/c5f21/quran.jpg 520w,\n/static/34fbf15a86a81d576af29f787f7f9f04/d5c54/quran.jpg 1040w,\n/static/34fbf15a86a81d576af29f787f7f9f04/81a53/quran.jpg 1560w,\n/static/34fbf15a86a81d576af29f787f7f9f04/4e5f3/quran.jpg 2000w","srcWebp":"/static/34fbf15a86a81d576af29f787f7f9f04/e4875/quran.webp","srcSetWebp":"/static/34fbf15a86a81d576af29f787f7f9f04/dc8f3/quran.webp 260w,\n/static/34fbf15a86a81d576af29f787f7f9f04/2db4b/quran.webp 520w,\n/static/34fbf15a86a81d576af29f787f7f9f04/e4875/quran.webp 1040w,\n/static/34fbf15a86a81d576af29f787f7f9f04/f5845/quran.webp 1560w,\n/static/34fbf15a86a81d576af29f787f7f9f04/49d6b/quran.webp 2000w","sizes":"(max-width: 1040px) 100vw, 1040px"}}}},"ghostPost":{"id":"Ghost__Post__6127ba1b3ed159214d382e6f","title":"Quran In New Tab - Chrome Extension","slug":"quran-in-new-tab-chrome-extension","featured":false,"feature_image":"https://res-5.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/quran.jpg","excerpt":"Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly.","custom_excerpt":"Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly.","visibility":"public","created_at_pretty":"26 Oct 2020","published_at_pretty":"6 Nov 2019","updated_at_pretty":"26 Aug 2021","created_at":"2020-10-26T21:42:23.000+00:00","published_at":"2019-11-06T18:23:00.000+00:00","updated_at":"2021-08-26T17:54:06.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG_0591.jpg","publicURL":"/static/ceb49c3c631485453e71e00d7f84b069/IMG_0591.jpg","imageMeta":{"width":1182,"height":1179},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMEAQL/xAAWAQEBAQAAAAAAAAAAAAAAAAADBAL/2gAMAwEAAhADEAAAAdXiFM6i0CohUWXoKn//xAAcEAACAgIDAAAAAAAAAAAAAAACAwESBBEhM0H/2gAIAQEAAQUCWySE3WEr7SzbXjAj4iKty+sOQ//EABYRAQEBAAAAAAAAAAAAAAAAAAERIP/aAAgBAwEBPwEhj//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAIBBAMBAAAAAAAAAAAAAAABIRESMUECECJx/9oACAEBAAY/ApVGWvOjzgtUwLlTZA0sdL4f/8QAHBAAAwACAwEAAAAAAAAAAAAAAAERITFBkbHB/9oACAEBAAE/IahkCy+N2GwZpjQiJHJCspUFY0QrSi+HqiW2rgf/2gAMAwEAAgADAAAAEPw3/wD/xAAYEQEBAAMAAAAAAAAAAAAAAAAAARExQf/aAAgBAwEBPxCtjDqP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQAxEf/aAAgBAgEBPxBFus6Tt//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcYGR0f/aAAgBAQABPxAuaBPPzkO1wyX7F4wkwXanfZrFQgeqE9JgS14vVOvrERIJomVBKwt2jebAeP0yVa8h1n//2Q==","aspectRatio":1,"src":"/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg","srcSet":"/static/ceb49c3c631485453e71e00d7f84b069/f340b/IMG_0591.jpg 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/22d64/IMG_0591.jpg 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/aa249/IMG_0591.jpg 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/0dc33/IMG_0591.jpg 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/d8257/IMG_0591.jpg 1182w","srcWebp":"/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp","srcSetWebp":"/static/ceb49c3c631485453e71e00d7f84b069/59cda/IMG_0591.webp 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/7da75/IMG_0591.webp 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/f282e/IMG_0591.webp 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/a7b21/IMG_0591.webp 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/63099/IMG_0591.webp 1182w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":" * Download Now\n   [https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en]\n\nReplace the new tab page with Quran verses and beautiful nature pictures. The\nverses and pictures are randomly generated hourly. You can choose to show or\nhide your top sites.\n\nNEW I am working on adding more languages to this extension, and I need help\nwith many of them. If you think you can help in translating it, please go here\n[https://crowdin.com/project/quran-in-new-tab-extension] to start helping!\n\n\n--------------------------------------------------------------------------------\n\nRecitations\nYou can play an audio of the recitation of the verse shown. You can choose from\nthe following reciters:\n\n * Mashary Rashid Alafasy\n * Abdallah Basfar\n * Abdurrahmaan As-Sudais\n * Abdul Samad\n\nand many more.\n\n\n--------------------------------------------------------------------------------\n\nTranslations\nYou can turn on the translation for the verses. Some of the languages available\nfor translations are:\n\n * English\n * German\n * Spanish\n * Indonesian\n * Italian\n\nand many more.\n\n\n--------------------------------------------------------------------------------\n\nAthkar\nStarting from version 1.0, you can show randomly generated Athkar on your new\ntab as well.\n\n\n--------------------------------------------------------------------------------\n\nCredits\nAll Quran verses, audios and translations use the API of Al Quran Cloud\nIcons from Feather\nLogo from https://www.freeiconspng.com/img/8824\n\n\n\n--------------------------------------------------------------------------------\n\nIssues\nIf you find any issues or bugs, please create an issue on the Github Repo\n[https://github.com/shahednasser/quran-extension].","html":"<!--kg-card-begin: html--><ul class=\"actions special\">\n                    <li><a href=\"https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en\" class=\"button large\">Download Now</a></li>\n                </ul><!--kg-card-end: html--><p>Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly. You can choose to show or hide your top sites.</p><p><strong>NEW </strong>I am working on adding more languages to this extension, and I need help with many of them. If you think you can help in translating it, please go <a href=\"https://crowdin.com/project/quran-in-new-tab-extension\">here</a> to start helping!</p><hr><h2 id=\"recitations\">Recitations</h2><p>You can play an audio of the recitation of the verse shown. You can choose from the following reciters:</p><ul><li>Mashary Rashid Alafasy</li><li>Abdallah Basfar</li><li>Abdurrahmaan As-Sudais</li><li>Abdul Samad</li></ul><p>and many more.</p><hr><h2 id=\"translations\">Translations</h2><p>You can turn on the translation for the verses. Some of the languages available for translations are:</p><ul><li>English</li><li>German</li><li>Spanish</li><li>Indonesian</li><li>Italian</li></ul><p>and many more.</p><hr><h2 id=\"athkar\">Athkar</h2><p>Starting from version 1.0, you can show randomly generated Athkar on your new tab as well.</p><hr><h2 id=\"credits\">Credits</h2><p>All Quran verses, audios and translations use the API of Al Quran Cloud<br>Icons from Feather<br>Logo from <a href=\"https://www.freeiconspng.com/img/8824\">https://www.freeiconspng.com/img/8824</a><br></p><hr><h2 id=\"issues\">Issues</h2><p>If you find any issues or bugs, please create an issue on the <a href=\"https://github.com/shahednasser/quran-extension\">Github Repo</a>.</p>","url":"https://backend.shahednasser.com/quran-in-new-tab-chrome-extension/","canonical_url":"https://shahednasserblog.tk/quran-in-new-tab-chrome-extension","uuid":"6cb8f7dc-9ccd-4e56-b4ad-d8e72803f26f","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"5f9742bfb366d4001e86ccb9","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<!--kg-card-begin: html--><ul class=\"actions special\">\n                    <li><a href=\"https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en\" class=\"button large\">Download Now</a></li>\n                </ul><!--kg-card-end: html--><p>Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly. You can choose to show or hide your top sites.</p><p><strong>NEW </strong>I am working on adding more languages to this extension, and I need help with many of them. If you think you can help in translating it, please go <a href=\"https://crowdin.com/project/quran-in-new-tab-extension\">here</a> to start helping!</p><hr><h2 id=\"recitations\">Recitations</h2><p>You can play an audio of the recitation of the verse shown. You can choose from the following reciters:</p><ul><li>Mashary Rashid Alafasy</li><li>Abdallah Basfar</li><li>Abdurrahmaan As-Sudais</li><li>Abdul Samad</li></ul><p>and many more.</p><hr><h2 id=\"translations\">Translations</h2><p>You can turn on the translation for the verses. Some of the languages available for translations are:</p><ul><li>English</li><li>German</li><li>Spanish</li><li>Indonesian</li><li>Italian</li></ul><p>and many more.</p><hr><h2 id=\"athkar\">Athkar</h2><p>Starting from version 1.0, you can show randomly generated Athkar on your new tab as well.</p><hr><h2 id=\"credits\">Credits</h2><p>All Quran verses, audios and translations use the API of Al Quran Cloud<br>Icons from Feather<br>Logo from <a href=\"https://www.freeiconspng.com/img/8824\">https://www.freeiconspng.com/img/8824</a><br></p><hr><h2 id=\"issues\">Issues</h2><p>If you find any issues or bugs, please create an issue on the <a href=\"https://github.com/shahednasser/quran-extension\">Github Repo</a>.</p>","htmlAst":{"type":"root","children":[{"type":"comment","value":"kg-card-begin: html"},{"type":"element","tagName":"ul","properties":{"className":["actions","special"]},"children":[{"type":"text","value":"\n                    "},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://chrome.google.com/webstore/detail/quran-in-new-tab/hggkcijghhpkdjeokpfgbhnpecliiijg?hl=en","className":["button","large"]},"children":[{"type":"text","value":"Download Now"}]}]},{"type":"text","value":"\n                "}]},{"type":"comment","value":"kg-card-end: html"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Replace the new tab page with Quran verses and beautiful nature pictures. The verses and pictures are randomly generated hourly. You can choose to show or hide your top sites."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"NEW "}]},{"type":"text","value":"I am working on adding more languages to this extension, and I need help with many of them. If you think you can help in translating it, please go "},{"type":"element","tagName":"a","properties":{"href":"https://crowdin.com/project/quran-in-new-tab-extension"},"children":[{"type":"text","value":"here"}]},{"type":"text","value":" to start helping!"}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"recitations"},"children":[{"type":"text","value":"Recitations"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can play an audio of the recitation of the verse shown. You can choose from the following reciters:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Mashary Rashid Alafasy"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Abdallah Basfar"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Abdurrahmaan As-Sudais"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Abdul Samad"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"and many more."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"translations"},"children":[{"type":"text","value":"Translations"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can turn on the translation for the verses. Some of the languages available for translations are:"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"English"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"German"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Spanish"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Indonesian"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Italian"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"and many more."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"athkar"},"children":[{"type":"text","value":"Athkar"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Starting from version 1.0, you can show randomly generated Athkar on your new tab as well."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"credits"},"children":[{"type":"text","value":"Credits"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"All Quran verses, audios and translations use the API of Al Quran Cloud"},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"Icons from Feather"},{"type":"element","tagName":"br","properties":{},"children":[]},{"type":"text","value":"Logo from "},{"type":"element","tagName":"a","properties":{"href":"https://www.freeiconspng.com/img/8824"},"children":[{"type":"text","value":"https://www.freeiconspng.com/img/8824"}]},{"type":"element","tagName":"br","properties":{},"children":[]}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"issues"},"children":[{"type":"text","value":"Issues"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you find any issues or bugs, please create an issue on the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/quran-extension"},"children":[{"type":"text","value":"Github Repo"}]},{"type":"text","value":"."}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"recitations","heading":"Recitations"},{"id":"translations","heading":"Translations"},{"id":"athkar","heading":"Athkar"},{"id":"credits","heading":"Credits"},{"id":"issues","heading":"Issues"}]},"featureImageSharp":{"base":"quran.jpg","publicURL":"/static/34fbf15a86a81d576af29f787f7f9f04/quran.jpg","imageMeta":{"width":2000,"height":2000},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGQABAAMBAQAAAAAAAAAAAAAAAAECBAUD/8QAFwEAAwEAAAAAAAAAAAAAAAAAAAECA//aAAwDAQACEAMQAAABiPXZL4zqApQRnGk//8QAHBAAAgICAwAAAAAAAAAAAAAAAQIAAxESBCEi/9oACAEBAAEFAkZwqrYjCm0zjuWm65OSUrTVfQsHf//EABYRAAMAAAAAAAAAAAAAAAAAAAAQIf/aAAgBAwEBPwEj/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oACAECAQE/AW1Uf//EABwQAAICAgMAAAAAAAAAAAAAAAABAhESISIxYf/aAAgBAQAGPwLGMHRxizo3R2i+Rko0/BaW0L1H/8QAGxABAAMAAwEAAAAAAAAAAAAAAQARITFhcZH/2gAIAQEAAT8hygnk5jjKt0hLFKb5DAWCu5Qr+0ChjpJSEaEXj1wh2imlXP/aAAwDAQACAAMAAAAQyy//AP/EABcRAQEBAQAAAAAAAAAAAAAAAAABETH/2gAIAQMBAT8QtYRev//EABgRAAIDAAAAAAAAAAAAAAAAAABRARAx/9oACAECAQE/EGKpiD//xAAdEAEAAwEAAgMAAAAAAAAAAAABABEhMUFRkaHR/9oACAEBAAE/EDnmh4F6kWROD1erfyWmXdi4b3JaDDzquW+eysWzpSybIjlo+4wwatkOOa8ybdone77bBUbUMDaZ8T//2Q==","aspectRatio":1,"src":"/static/34fbf15a86a81d576af29f787f7f9f04/d5c54/quran.jpg","srcSet":"/static/34fbf15a86a81d576af29f787f7f9f04/65d8c/quran.jpg 260w,\n/static/34fbf15a86a81d576af29f787f7f9f04/c5f21/quran.jpg 520w,\n/static/34fbf15a86a81d576af29f787f7f9f04/d5c54/quran.jpg 1040w,\n/static/34fbf15a86a81d576af29f787f7f9f04/81a53/quran.jpg 1560w,\n/static/34fbf15a86a81d576af29f787f7f9f04/4e5f3/quran.jpg 2000w","srcWebp":"/static/34fbf15a86a81d576af29f787f7f9f04/e4875/quran.webp","srcSetWebp":"/static/34fbf15a86a81d576af29f787f7f9f04/dc8f3/quran.webp 260w,\n/static/34fbf15a86a81d576af29f787f7f9f04/2db4b/quran.webp 520w,\n/static/34fbf15a86a81d576af29f787f7f9f04/e4875/quran.webp 1040w,\n/static/34fbf15a86a81d576af29f787f7f9f04/f5845/quran.webp 1560w,\n/static/34fbf15a86a81d576af29f787f7f9f04/49d6b/quran.webp 2000w","sizes":"(max-width: 1040px) 100vw, 1040px"}}}},"prev":{"id":"Ghost__Post__6127ba1b3ed159214d382e70","title":"Tips for Magento 2 Layouts","slug":"tips-for-magento-2-layouts","featured":false,"feature_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/1_bwLgYgHn7R2RXs13d9HYfA.png","excerpt":"One of the things you will use a lot while developing in Magento 2 is the XML layouts, which can be confusing in the beginning.","custom_excerpt":"One of the things you will use a lot while developing in Magento 2 is the XML layouts, which can be confusing in the beginning.","visibility":"public","created_at_pretty":"6 Nov 2020","published_at_pretty":"8 Feb 2020","updated_at_pretty":"26 Aug 2021","created_at":"2020-11-06T18:24:45.000+00:00","published_at":"2020-02-08T18:24:00.000+00:00","updated_at":"2021-08-26T17:53:58.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG_0591.jpg","publicURL":"/static/ceb49c3c631485453e71e00d7f84b069/IMG_0591.jpg","imageMeta":{"width":1182,"height":1179},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMEAQL/xAAWAQEBAQAAAAAAAAAAAAAAAAADBAL/2gAMAwEAAhADEAAAAdXiFM6i0CohUWXoKn//xAAcEAACAgIDAAAAAAAAAAAAAAACAwESBBEhM0H/2gAIAQEAAQUCWySE3WEr7SzbXjAj4iKty+sOQ//EABYRAQEBAAAAAAAAAAAAAAAAAAERIP/aAAgBAwEBPwEhj//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAIBBAMBAAAAAAAAAAAAAAABIRESMUECECJx/9oACAEBAAY/ApVGWvOjzgtUwLlTZA0sdL4f/8QAHBAAAwACAwEAAAAAAAAAAAAAAAERITFBkbHB/9oACAEBAAE/IahkCy+N2GwZpjQiJHJCspUFY0QrSi+HqiW2rgf/2gAMAwEAAgADAAAAEPw3/wD/xAAYEQEBAAMAAAAAAAAAAAAAAAAAARExQf/aAAgBAwEBPxCtjDqP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQAxEf/aAAgBAgEBPxBFus6Tt//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcYGR0f/aAAgBAQABPxAuaBPPzkO1wyX7F4wkwXanfZrFQgeqE9JgS14vVOvrERIJomVBKwt2jebAeP0yVa8h1n//2Q==","aspectRatio":1,"src":"/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg","srcSet":"/static/ceb49c3c631485453e71e00d7f84b069/f340b/IMG_0591.jpg 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/22d64/IMG_0591.jpg 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/aa249/IMG_0591.jpg 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/0dc33/IMG_0591.jpg 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/d8257/IMG_0591.jpg 1182w","srcWebp":"/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp","srcSetWebp":"/static/ceb49c3c631485453e71e00d7f84b069/59cda/IMG_0591.webp 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/7da75/IMG_0591.webp 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/f282e/IMG_0591.webp 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/a7b21/IMG_0591.webp 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/63099/IMG_0591.webp 1182w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"magento","url":"https://backend.shahednasser.com/tag/magento/","name":"Magento","visibility":"public","feature_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/1_ZxqU4dcMgnOkEe_YcZ01EQ.png","description":"Learn more about Magento through tutorials, articles, and tips.","meta_title":null,"meta_description":null,"featureImageSharp":{"base":"1_ZxqU4dcMgnOkEe_YcZ01EQ.png","publicURL":"/static/a31aa55d79836c6ec2a7d0044e4ac60d/1_ZxqU4dcMgnOkEe_YcZ01EQ.png","imageMeta":{"width":2000,"height":1000},"childImageSharp":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA/UlEQVQoz2P4TwFgQDD//YMi/ACk4B82zX//IPHQAVabQaL/vn/5fXT9r/3L/314DTMem60/vv0+f+Dfp7cQNQwQ237uWfZjdd+PzTP+bJ119sLFXTt3Xr1y5d7du9evXb99+/bRw0euX7v26eu3/5/efV/W9WPjDJDmP3+gmn8d2fRtWsm3yQW/9iw7e+78po0bN2/aNHP6jEULFu7auXPdmrU7tm9/9uLl/18/vk0t/n3lGNjmv3A///t1bPOv3Uv//foJ9jsIPHv27MOHDxDpXz9//vv//+/jm99mVf65dQ7mbJQA+4vHw0REFUqkYAQyJEb+/cXQTHoiAQDMTzrKXUcJ/gAAAABJRU5ErkJggg==","aspectRatio":2,"src":"/static/a31aa55d79836c6ec2a7d0044e4ac60d/50033/1_ZxqU4dcMgnOkEe_YcZ01EQ.png","srcSet":"/static/a31aa55d79836c6ec2a7d0044e4ac60d/bcfcb/1_ZxqU4dcMgnOkEe_YcZ01EQ.png 260w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/19d75/1_ZxqU4dcMgnOkEe_YcZ01EQ.png 520w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/50033/1_ZxqU4dcMgnOkEe_YcZ01EQ.png 1040w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/47b0f/1_ZxqU4dcMgnOkEe_YcZ01EQ.png 1560w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/71514/1_ZxqU4dcMgnOkEe_YcZ01EQ.png 2000w","srcWebp":"/static/a31aa55d79836c6ec2a7d0044e4ac60d/e4875/1_ZxqU4dcMgnOkEe_YcZ01EQ.webp","srcSetWebp":"/static/a31aa55d79836c6ec2a7d0044e4ac60d/dc8f3/1_ZxqU4dcMgnOkEe_YcZ01EQ.webp 260w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/2db4b/1_ZxqU4dcMgnOkEe_YcZ01EQ.webp 520w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/e4875/1_ZxqU4dcMgnOkEe_YcZ01EQ.webp 1040w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/f5845/1_ZxqU4dcMgnOkEe_YcZ01EQ.webp 1560w,\n/static/a31aa55d79836c6ec2a7d0044e4ac60d/49d6b/1_ZxqU4dcMgnOkEe_YcZ01EQ.webp 2000w","sizes":"(max-width: 1040px) 100vw, 1040px"}}}},"tags":[{"slug":"magento","url":"https://backend.shahednasser.com/tag/magento/","name":"Magento","visibility":"public","feature_image":"https://res-4.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/1_ZxqU4dcMgnOkEe_YcZ01EQ.png","description":"Learn more about Magento through tutorials, articles, and tips.","meta_title":null,"meta_description":null,"featureImageSharp":null},{"slug":"beginner","url":"https://backend.shahednasser.com/tag/beginner/","name":"Beginners","visibility":"public","feature_image":"https://backend.shahednasser.com/content/images/2022/01/photo-1521185496955-15097b20c5fe-2.jpeg","description":"Tutorials, articles, and tips to help beginners accelerate their journey in programming.","meta_title":"Beginners","meta_description":"Tutorials, articles, and tips to help beginners accelerate their journey in programming.","featureImageSharp":null},{"slug":"tips","url":"https://backend.shahednasser.com/tag/tips/","name":"Tips","visibility":"public","feature_image":null,"description":"Learn more about programming and development through these articles that have essential tips!","meta_title":"Tips on Technology and Programming","meta_description":null,"featureImageSharp":null}],"plaintext":"Magento 2 is one of the most popular e-commerce platforms, and it’s probably the\nmost difficult to use for developers. One of the things you will use a lot while\ndeveloping in Magento 2 is the XML layouts, which can be confusing in the\nbeginning.\n\nI will include some quick tips you might need in developing and modifying\nexisting layouts.\n\nMove Elements\nIf you want to move a block or container from one place to another in a page,\nyou can use the following: \n\n<move element=\"element.to.move\" destination=\"new.parent\" />\n\nHere, we have the element attribute which should be the name of the block or\ncontainer you want to move, and the destination attribute which should be the\nname of the block or container you want to move the element to.\n\nYou can also use before or after attributes to specify where the element should\ngo inside the parent like this:<move element=\"element.to.move\"\ndestination=\"new.parent\" after=\"new.sibling\" />\n\nwhere new.sibling is another child in new.parent\n\nRemove Element\nTo remove a block from a page, use the following:\n\n<referenceBlock name=\"element.to.remove\" remove=\"true\" />\n\nYou can also do the same for containers:\n\n<referenceContainer name=\"element.to.remove\" remove=\"true\" />\n\nNote: When Magento applies layout changes, move rules are applied before remove \n. This means if you move an element to a parent, and remove then the parent, the\nelement you moved into it will be removed as well.\n\nChange a Block’s Template\nTo change a block’s template, you can do the following:\n\n<referenceBlock name=\"block.to.change\">\n\t<action method=\"setTemplate\">\n    <argument name=\"template\" xsi:type=\"string\">VENDOR_MODULE::path/to/template</argument>\n    </action>\n</referenceBlock>\n\nWhere VENDOR_MODULE::path/to/template should be the path to the new template you\nwant to use for the block.\n\nChange Block’s Visibility Based on Configuration\nIf you want a block to be visible based on configuration’s value that is set by\nthe admin, you can do it this way:\n\n<block class=\"...\" name=\"...\" ifconfig=\"my/yesno/field\">\n\nWhere my/yesno/field can be any path to a field in the system settings.\n\nRemove CSS or JS files\nTo remove a css, javascript or any static file present in <head> , use the\nfollowing:\n\n<head>\n\t<remove src=\"src/to/file\" />\n</head>\n\nSet Attributes of Body\nTo set attributes of the body of a page, like class, use the following:\n\n<body>\n\t<attribute name=\"class\" value=\"class-name\"/>\n</body>\n\nYou can also set style , class and other attributes.\n\nConclusion\nThose were just some quick tips you will probably use a lot if you’re developing\na store with Magento 2. You can read more about this, as well as other helpful\ninformation, see here\n[https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html]\n.","html":"<p>Magento 2 is one of the most popular e-commerce platforms, and it’s probably the most difficult to use for developers. One of the things you will use a lot while developing in Magento 2 is the XML layouts, which can be confusing in the beginning.</p><p>I will include some quick tips you might need in developing and modifying existing layouts.</p><h1 id=\"move-elements\">Move Elements</h1><p>If you want to move a block or container from one place to another in a page, you can use the following: </p><pre><code class=\"language-XML\">&lt;move element=\"element.to.move\" destination=\"new.parent\" /&gt;</code></pre><p>Here, we have the <code>element</code> attribute which should be the name of the block or container you want to move, and the <code>destination</code> attribute which should be the name of the block or container you want to move the element to.</p><p>You can also use <code>before</code> or <code>after</code> attributes to specify where the element should go inside the parent like this:&lt;move element=\"element.to.move\" destination=\"new.parent\" after=\"<strong><strong>new.sibling</strong></strong>\" /&gt;</p><p>where <code>new.sibling</code> is another child in <code>new.parent</code></p><h1 id=\"remove-element\">Remove Element</h1><p>To remove a block from a page, use the following:</p><pre><code class=\"language-XML\">&lt;referenceBlock name=\"element.to.remove\" remove=\"true\" /&gt;</code></pre><p>You can also do the same for containers:</p><pre><code class=\"language-XML\">&lt;referenceContainer name=\"element.to.remove\" remove=\"true\" /&gt;</code></pre><p><strong><strong>Note</strong></strong>: When Magento applies layout changes, <code>move</code> rules are applied before <code>remove</code> . This means if you move an element to a parent, and remove then the parent, the element you moved into it will be removed as well.</p><h1 id=\"change-a-block-s-template\">Change a Block’s Template</h1><p>To change a block’s template, you can do the following:</p><pre><code class=\"language-XML\">&lt;referenceBlock name=\"block.to.change\"&gt;\n\t&lt;action method=\"setTemplate\"&gt;\n    &lt;argument name=\"template\" xsi:type=\"string\"&gt;VENDOR_MODULE::path/to/template&lt;/argument&gt;\n    &lt;/action&gt;\n&lt;/referenceBlock&gt;</code></pre><p>Where <code>VENDOR_MODULE::path/to/template</code> should be the path to the new template you want to use for the block.</p><h1 id=\"change-block-s-visibility-based-on-configuration\">Change Block’s Visibility Based on Configuration</h1><p>If you want a block to be visible based on configuration’s value that is set by the admin, you can do it this way:</p><pre><code class=\"language-XML\">&lt;block class=\"...\" name=\"...\" ifconfig=\"my/yesno/field\"&gt;</code></pre><p>Where <code>my/yesno/field</code> can be any path to a field in the system settings.</p><h1 id=\"remove-css-or-js-files\">Remove CSS or JS files</h1><p>To remove a css, javascript or any static file present in <code>&lt;head&gt;</code> , use the following:</p><pre><code class=\"language-XML\">&lt;head&gt;\n\t&lt;remove src=\"src/to/file\" /&gt;\n&lt;/head&gt;</code></pre><h1 id=\"set-attributes-of-body\">Set Attributes of Body</h1><p>To set attributes of the body of a page, like class, use the following:</p><pre><code class=\"language-XML\">&lt;body&gt;\n\t&lt;attribute name=\"class\" value=\"class-name\"/&gt;\n&lt;/body&gt;</code></pre><p>You can also set <code>style</code> , <code>class</code> and other attributes.</p><h1 id=\"conclusion\">Conclusion</h1><p>Those were just some quick tips you will probably use a lot if you’re developing a store with Magento 2. You can read more about this, as well as other helpful information, see <a href=\"https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html\" rel=\"noopener nofollow\">here</a>.</p>","url":"https://backend.shahednasser.com/tips-for-magento-2-layouts/","canonical_url":null,"uuid":"994e98e7-7823-464d-aab9-225d82809696","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"5fa594edbc1317001e675bc8","reading_time":2,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Magento 2 is one of the most popular e-commerce platforms, and it’s probably the most difficult to use for developers. One of the things you will use a lot while developing in Magento 2 is the XML layouts, which can be confusing in the beginning.</p><p>I will include some quick tips you might need in developing and modifying existing layouts.</p><h1 id=\"move-elements\">Move Elements</h1><p>If you want to move a block or container from one place to another in a page, you can use the following: </p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>move</span> <span class=\"token attr-name\">element</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>element.to.move<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">destination</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>new.parent<span class=\"token punctuation\">\"</span></span> <span class=\"token punctuation\">/></span></span></code></pre></div><p>Here, we have the <code class=\"language-text\">element</code> attribute which should be the name of the block or container you want to move, and the <code class=\"language-text\">destination</code> attribute which should be the name of the block or container you want to move the element to.</p><p>You can also use <code class=\"language-text\">before</code> or <code class=\"language-text\">after</code> attributes to specify where the element should go inside the parent like this:&#x3C;move element=\"element.to.move\" destination=\"new.parent\" after=\"<strong><strong>new.sibling</strong></strong>\" /></p><p>where <code class=\"language-text\">new.sibling</code> is another child in <code class=\"language-text\">new.parent</code></p><h1 id=\"remove-element\">Remove Element</h1><p>To remove a block from a page, use the following:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>referenceBlock</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>element.to.remove<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">remove</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>true<span class=\"token punctuation\">\"</span></span> <span class=\"token punctuation\">/></span></span></code></pre></div><p>You can also do the same for containers:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>referenceContainer</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>element.to.remove<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">remove</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>true<span class=\"token punctuation\">\"</span></span> <span class=\"token punctuation\">/></span></span></code></pre></div><p><strong><strong>Note</strong></strong>: When Magento applies layout changes, <code class=\"language-text\">move</code> rules are applied before <code class=\"language-text\">remove</code> . This means if you move an element to a parent, and remove then the parent, the element you moved into it will be removed as well.</p><h1 id=\"change-a-block-s-template\">Change a Block’s Template</h1><p>To change a block’s template, you can do the following:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>referenceBlock</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>block.to.change<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n\t<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>action</span> <span class=\"token attr-name\">method</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>setTemplate<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>argument</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>template<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\"><span class=\"token namespace\">xsi:</span>type</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>string<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>VENDOR_MODULE::path/to/template<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;/</span>argument</span><span class=\"token punctuation\">></span></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;/</span>action</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;/</span>referenceBlock</span><span class=\"token punctuation\">></span></span></code></pre></div><p>Where <code class=\"language-text\">VENDOR_MODULE::path/to/template</code> should be the path to the new template you want to use for the block.</p><h1 id=\"change-block-s-visibility-based-on-configuration\">Change Block’s Visibility Based on Configuration</h1><p>If you want a block to be visible based on configuration’s value that is set by the admin, you can do it this way:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>block</span> <span class=\"token attr-name\">class</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>...<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>...<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">ifconfig</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>my/yesno/field<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span></code></pre></div><p>Where <code class=\"language-text\">my/yesno/field</code> can be any path to a field in the system settings.</p><h1 id=\"remove-css-or-js-files\">Remove CSS or JS files</h1><p>To remove a css, javascript or any static file present in <code class=\"language-text\">&#x3C;head></code> , use the following:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>head</span><span class=\"token punctuation\">></span></span>\n\t<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>remove</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>src/to/file<span class=\"token punctuation\">\"</span></span> <span class=\"token punctuation\">/></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;/</span>head</span><span class=\"token punctuation\">></span></span></code></pre></div><h1 id=\"set-attributes-of-body\">Set Attributes of Body</h1><p>To set attributes of the body of a page, like class, use the following:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>body</span><span class=\"token punctuation\">></span></span>\n\t<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;</span>attribute</span> <span class=\"token attr-name\">name</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>class<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">value</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>class-name<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">/></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&#x3C;/</span>body</span><span class=\"token punctuation\">></span></span></code></pre></div><p>You can also set <code class=\"language-text\">style</code> , <code class=\"language-text\">class</code> and other attributes.</p><h1 id=\"conclusion\">Conclusion</h1><p>Those were just some quick tips you will probably use a lot if you’re developing a store with Magento 2. You can read more about this, as well as other helpful information, see <a href=\"https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html\" rel=\"noopener nofollow\">here</a>.</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Magento 2 is one of the most popular e-commerce platforms, and it’s probably the most difficult to use for developers. One of the things you will use a lot while developing in Magento 2 is the XML layouts, which can be confusing in the beginning."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I will include some quick tips you might need in developing and modifying existing layouts."}]},{"type":"element","tagName":"h1","properties":{"id":"move-elements"},"children":[{"type":"text","value":"Move Elements"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you want to move a block or container from one place to another in a page, you can use the following: "}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"xml"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"move"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"element"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"element.to.move"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"destination"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"new.parent"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"/>"}]}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Here, we have the "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"element"}]},{"type":"text","value":" attribute which should be the name of the block or container you want to move, and the "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"destination"}]},{"type":"text","value":" attribute which should be the name of the block or container you want to move the element to."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can also use "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"before"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"after"}]},{"type":"text","value":" attributes to specify where the element should go inside the parent like this:<move element=\"element.to.move\" destination=\"new.parent\" after=\""},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"new.sibling"}]}]},{"type":"text","value":"\" />"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"where "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"new.sibling"}]},{"type":"text","value":" is another child in "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"new.parent"}]}]},{"type":"element","tagName":"h1","properties":{"id":"remove-element"},"children":[{"type":"text","value":"Remove Element"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To remove a block from a page, use the following:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"xml"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"referenceBlock"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"name"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"element.to.remove"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"remove"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"true"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"/>"}]}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can also do the same for containers:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"xml"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"referenceContainer"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"name"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"element.to.remove"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"remove"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"true"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"/>"}]}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Note"}]}]},{"type":"text","value":": When Magento applies layout changes, "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"move"}]},{"type":"text","value":" rules are applied before "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"remove"}]},{"type":"text","value":" . This means if you move an element to a parent, and remove then the parent, the element you moved into it will be removed as well."}]},{"type":"element","tagName":"h1","properties":{"id":"change-a-block-s-template"},"children":[{"type":"text","value":"Change a Block’s Template"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To change a block’s template, you can do the following:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"xml"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"referenceBlock"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"name"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"block.to.change"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]},{"type":"text","value":"\n\t"},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"action"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"method"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"setTemplate"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"argument"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"name"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"template"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","namespace"]},"children":[{"type":"text","value":"xsi:"}]},{"type":"text","value":"type"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"string"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]},{"type":"text","value":"VENDOR_MODULE::path/to/template"},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"</"}]},{"type":"text","value":"argument"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"</"}]},{"type":"text","value":"action"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"</"}]},{"type":"text","value":"referenceBlock"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Where "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"VENDOR_MODULE::path/to/template"}]},{"type":"text","value":" should be the path to the new template you want to use for the block."}]},{"type":"element","tagName":"h1","properties":{"id":"change-block-s-visibility-based-on-configuration"},"children":[{"type":"text","value":"Change Block’s Visibility Based on Configuration"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you want a block to be visible based on configuration’s value that is set by the admin, you can do it this way:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"xml"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"block"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"class"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"..."},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"name"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"..."},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"ifconfig"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"my/yesno/field"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Where "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"my/yesno/field"}]},{"type":"text","value":" can be any path to a field in the system settings."}]},{"type":"element","tagName":"h1","properties":{"id":"remove-css-or-js-files"},"children":[{"type":"text","value":"Remove CSS or JS files"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To remove a css, javascript or any static file present in "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"<head>"}]},{"type":"text","value":" , use the following:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"xml"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"head"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]},{"type":"text","value":"\n\t"},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"remove"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"src"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"src/to/file"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"/>"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"</"}]},{"type":"text","value":"head"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]}]}]}]},{"type":"element","tagName":"h1","properties":{"id":"set-attributes-of-body"},"children":[{"type":"text","value":"Set Attributes of Body"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To set attributes of the body of a page, like class, use the following:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"xml"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-xml"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"body"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]},{"type":"text","value":"\n\t"},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"attribute"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"name"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"class"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","attr-name"]},"children":[{"type":"text","value":"value"}]},{"type":"element","tagName":"span","properties":{"className":["token","attr-value"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation","attr-equals"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]},{"type":"text","value":"class-name"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"\""}]}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"/>"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","tag"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"</"}]},{"type":"text","value":"body"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":">"}]}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can also set "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"style"}]},{"type":"text","value":" , "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"class"}]},{"type":"text","value":" and other attributes."}]},{"type":"element","tagName":"h1","properties":{"id":"conclusion"},"children":[{"type":"text","value":"Conclusion"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Those were just some quick tips you will probably use a lot if you’re developing a store with Magento 2. You can read more about this, as well as other helpful information, see "},{"type":"element","tagName":"a","properties":{"href":"https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html","rel":["noopener","nofollow"]},"children":[{"type":"text","value":"here"}]},{"type":"text","value":"."}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"move-elements","heading":"Move Elements"},{"id":"remove-element","heading":"Remove Element"},{"id":"change-a-block-s-template","heading":"Change a Block’s Template"},{"id":"change-block-s-visibility-based-on-configuration","heading":"Change Block’s Visibility Based on Configuration"},{"id":"remove-css-or-js-files","heading":"Remove CSS or JS files"},{"id":"set-attributes-of-body","heading":"Set Attributes of Body"},{"id":"conclusion","heading":"Conclusion"}]},"featureImageSharp":{"base":"1_bwLgYgHn7R2RXs13d9HYfA.png","publicURL":"/static/32e0e004999f20bd55bad508d863fad3/1_bwLgYgHn7R2RXs13d9HYfA.png","imageMeta":{"width":700,"height":828},"childImageSharp":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAYAAAD6S912AAAACXBIWXMAAAsTAAALEwEAmpwYAAACsElEQVQ4y9WVP2gVQRDG770XxIjxLwTsrAQRC2Py7avsRbAQLVSQGJMZFbGzVAsLCZJCK6O2WpgmqJXBJIgoYm8UjUgIIu++SwoRNIlGZnfvckkUA7HxYLm7Yea3383ufpck8aIioSDJBPZcs3sqzmI7qRii4jkV7am6kKuoMeSG0dMeQYLk8ZmDiU8UVFN1VUvIBM1UXKHgW6pu3gYFP6i4QcVmy2lovUJFtaH1IEQQgFRUqK7JkrwqxSEK3lKQg+bz51TcPBWTVHQ2otpUXc0zxHlgLfOyvcIdVAxSY3GANSjopOAIBR+LuMLGEyra7Ouy0LKaVzilWEPBJQq+lkA2blHQyvg5FLRQcI2C2RJ4joq+TLHB1JrkA1S8zlVF0EsK9sW++pnD6Mh7vYeCoaIlATxBxdHEg8R640FTFJyfPrk7ByWlVU0aCxMkqdbtfoKCybQAY94WYTa+PKVg2yKQoE7BhXxLUXGOgv1xO+VjPRUDccFmLGnGq1N3ORUkDXFNvleKi77xghGDx9W/GxfjOhWtqbgmq8nUHQ8MGNDNRmCvFX3q8UoG0oUtM0gP9PF+354Qf0FBc4i705GxCHjVCse62i32LMas8GEJeLs00TsKNkeg/BE4fqrDYsMrAI5RsPGvwPcBOLIC4BsKNv2XwGLbrAIIiabx3Yp//kOFc7bTs0BfLdDHvhhweyrekXut8MNy4KPSSbnz+22DsxS8omBXcW4zReuDY23JRDeWAgdLZ/nmEoUtEbiV3W2V3LGr3jkUduyq4ei50RJwtKTwfskvzdHXmqWFf8pezwq98QcclVT8CM5tynJocPF7XPDLYfPEYG2u+MFZbXFNawgYtGRfhykYLxnCZwq6ohdaTiU34WXXtLqkEWcp/n7heR0FfRT0U7ClZK5V34olwF9mAqQS68J6cAAAAABJRU5ErkJggg==","aspectRatio":0.8454106280193237,"src":"/static/32e0e004999f20bd55bad508d863fad3/60290/1_bwLgYgHn7R2RXs13d9HYfA.png","srcSet":"/static/32e0e004999f20bd55bad508d863fad3/847ef/1_bwLgYgHn7R2RXs13d9HYfA.png 175w,\n/static/32e0e004999f20bd55bad508d863fad3/91cba/1_bwLgYgHn7R2RXs13d9HYfA.png 350w,\n/static/32e0e004999f20bd55bad508d863fad3/60290/1_bwLgYgHn7R2RXs13d9HYfA.png 700w","srcWebp":"/static/32e0e004999f20bd55bad508d863fad3/89afa/1_bwLgYgHn7R2RXs13d9HYfA.webp","srcSetWebp":"/static/32e0e004999f20bd55bad508d863fad3/9fca7/1_bwLgYgHn7R2RXs13d9HYfA.webp 175w,\n/static/32e0e004999f20bd55bad508d863fad3/37a4e/1_bwLgYgHn7R2RXs13d9HYfA.webp 350w,\n/static/32e0e004999f20bd55bad508d863fad3/89afa/1_bwLgYgHn7R2RXs13d9HYfA.webp 700w","sizes":"(max-width: 700px) 100vw, 700px"}}}},"next":{"id":"Ghost__Post__6127ba1b3ed159214d382e6d","title":"Best Websites to Find Free Resources for Frontend Web Developers and Designers","slug":"best-websites-to-find-free-resources-for-frontend-web-developers-and-designers","featured":false,"feature_image":"https://res-2.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/photo-1505304451-3b3b85a91afe.jpg","excerpt":"Perhaps one of the hardest tasks is finding free resources for your projects. This list will hold websites that offer freebies.","custom_excerpt":"Perhaps one of the hardest tasks is finding free resources for your projects. This list will hold websites that offer freebies.","visibility":"public","created_at_pretty":"26 Oct 2020","published_at_pretty":"26 Aug 2019","updated_at_pretty":"26 Aug 2021","created_at":"2020-10-26T21:33:46.000+00:00","published_at":"2019-08-26T21:33:00.000+00:00","updated_at":"2021-08-26T17:54:20.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG_0591.jpg","publicURL":"/static/ceb49c3c631485453e71e00d7f84b069/IMG_0591.jpg","imageMeta":{"width":1182,"height":1179},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMEAQL/xAAWAQEBAQAAAAAAAAAAAAAAAAADBAL/2gAMAwEAAhADEAAAAdXiFM6i0CohUWXoKn//xAAcEAACAgIDAAAAAAAAAAAAAAACAwESBBEhM0H/2gAIAQEAAQUCWySE3WEr7SzbXjAj4iKty+sOQ//EABYRAQEBAAAAAAAAAAAAAAAAAAERIP/aAAgBAwEBPwEhj//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAIBBAMBAAAAAAAAAAAAAAABIRESMUECECJx/9oACAEBAAY/ApVGWvOjzgtUwLlTZA0sdL4f/8QAHBAAAwACAwEAAAAAAAAAAAAAAAERITFBkbHB/9oACAEBAAE/IahkCy+N2GwZpjQiJHJCspUFY0QrSi+HqiW2rgf/2gAMAwEAAgADAAAAEPw3/wD/xAAYEQEBAAMAAAAAAAAAAAAAAAAAARExQf/aAAgBAwEBPxCtjDqP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQAxEf/aAAgBAgEBPxBFus6Tt//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcYGR0f/aAAgBAQABPxAuaBPPzkO1wyX7F4wkwXanfZrFQgeqE9JgS14vVOvrERIJomVBKwt2jebAeP0yVa8h1n//2Q==","aspectRatio":1,"src":"/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg","srcSet":"/static/ceb49c3c631485453e71e00d7f84b069/f340b/IMG_0591.jpg 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/22d64/IMG_0591.jpg 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/aa249/IMG_0591.jpg 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/0dc33/IMG_0591.jpg 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/d8257/IMG_0591.jpg 1182w","srcWebp":"/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp","srcSetWebp":"/static/ceb49c3c631485453e71e00d7f84b069/59cda/IMG_0591.webp 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/7da75/IMG_0591.webp 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/f282e/IMG_0591.webp 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/a7b21/IMG_0591.webp 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/63099/IMG_0591.webp 1182w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"beginner","url":"https://backend.shahednasser.com/tag/beginner/","name":"Beginners","visibility":"public","feature_image":"https://backend.shahednasser.com/content/images/2022/01/photo-1521185496955-15097b20c5fe-2.jpeg","description":"Tutorials, articles, and tips to help beginners accelerate their journey in programming.","meta_title":"Beginners","meta_description":"Tutorials, articles, and tips to help beginners accelerate their journey in programming.","featureImageSharp":{"base":"photo-1521185496955-15097b20c5fe-2.jpeg","publicURL":"/static/13f953658eaecb779984996ea356b1c4/photo-1521185496955-15097b20c5fe-2.jpeg","imageMeta":{"width":2000,"height":1547},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAPABQDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAQCBf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/aAAwDAQACEAMQAAABhU05c9sV/8QAGRAAAwEBAQAAAAAAAAAAAAAAAQIDABIR/9oACAEBAAEFAuTgGxGjVeRdPLOHf//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAABD/2gAIAQIBAT8BP//EABkQAAMBAQEAAAAAAAAAAAAAAAABEXECEP/aAAgBAQAGPwL2dJaOqYVH/8QAGhAAAwADAQAAAAAAAAAAAAAAAAERITFBYf/aAAgBAQABPyFpWJH6IutKCacL+lRRGxiDm+H/2gAMAwEAAgADAAAAEK//AP/EABYRAQEBAAAAAAAAAAAAAAAAAAEREP/aAAgBAwEBPxAI3P/EABYRAQEBAAAAAAAAAAAAAAAAAAERAP/aAAgBAgEBPxBaR03/xAAbEAEBAAIDAQAAAAAAAAAAAAABEQAhMUGxcf/aAAgBAQABPxAInmDF9wQ6urfMI5JgA/si0141k9pEa4fcjFJmybz/2Q==","aspectRatio":1.2935323383084578,"src":"/static/13f953658eaecb779984996ea356b1c4/d5c54/photo-1521185496955-15097b20c5fe-2.jpg","srcSet":"/static/13f953658eaecb779984996ea356b1c4/65d8c/photo-1521185496955-15097b20c5fe-2.jpg 260w,\n/static/13f953658eaecb779984996ea356b1c4/c5f21/photo-1521185496955-15097b20c5fe-2.jpg 520w,\n/static/13f953658eaecb779984996ea356b1c4/d5c54/photo-1521185496955-15097b20c5fe-2.jpg 1040w,\n/static/13f953658eaecb779984996ea356b1c4/81a53/photo-1521185496955-15097b20c5fe-2.jpg 1560w,\n/static/13f953658eaecb779984996ea356b1c4/4e5f3/photo-1521185496955-15097b20c5fe-2.jpg 2000w","srcWebp":"/static/13f953658eaecb779984996ea356b1c4/e4875/photo-1521185496955-15097b20c5fe-2.webp","srcSetWebp":"/static/13f953658eaecb779984996ea356b1c4/dc8f3/photo-1521185496955-15097b20c5fe-2.webp 260w,\n/static/13f953658eaecb779984996ea356b1c4/2db4b/photo-1521185496955-15097b20c5fe-2.webp 520w,\n/static/13f953658eaecb779984996ea356b1c4/e4875/photo-1521185496955-15097b20c5fe-2.webp 1040w,\n/static/13f953658eaecb779984996ea356b1c4/f5845/photo-1521185496955-15097b20c5fe-2.webp 1560w,\n/static/13f953658eaecb779984996ea356b1c4/49d6b/photo-1521185496955-15097b20c5fe-2.webp 2000w","sizes":"(max-width: 1040px) 100vw, 1040px"}}}},"tags":[{"slug":"beginner","url":"https://backend.shahednasser.com/tag/beginner/","name":"Beginners","visibility":"public","feature_image":"https://backend.shahednasser.com/content/images/2022/01/photo-1521185496955-15097b20c5fe-2.jpeg","description":"Tutorials, articles, and tips to help beginners accelerate their journey in programming.","meta_title":"Beginners","meta_description":"Tutorials, articles, and tips to help beginners accelerate their journey in programming.","featureImageSharp":null},{"slug":"tips","url":"https://backend.shahednasser.com/tag/tips/","name":"Tips","visibility":"public","feature_image":null,"description":"Learn more about programming and development through these articles that have essential tips!","meta_title":"Tips on Technology and Programming","meta_description":null,"featureImageSharp":null},{"slug":"open-source","url":"https://backend.shahednasser.com/tag/open-source/","name":"Open Source","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},{"slug":"design","url":"https://backend.shahednasser.com/tag/design/","name":"Design","visibility":"public","feature_image":null,"description":"Learn more about Web Design through tutorials, articles and tips.","meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"Perhaps one of the hardest tasks is finding free resources for your projects.\nThis list will hold websites that offer freebies. I will try to keep the list\nupdated along the way.\n\nSome of the websites may have a different license for each resource they offer,\nso you might need to look out for that.\n\n\n--------------------------------------------------------------------------------\n\nGeneral\n 1. Freebie Supply [https://freebiesupply.com/]: Free icons, vectors, fonts,\n    templates, themes and more.\n 2. Freebiesbug [https://freebiesbug.com/]: Another website that has a wide\n    collection of icons, vectors, templates, and more.\n 3. Neede [https://neede.co/]: It’s aimed more towards designers, but developers\n    might find some useful stuff like templates, colors, illustrations and more.\n\nFonts\n 1. Google Fonts [https://fonts.google.com/]\n 2. 1001 Fonts [https://www.1001fonts.com/]\n\nIcons\n 1. Material Design Icons [https://material.io/resources/icons/]\n 2. Feather [https://feathericons.com/]\n 3. SVG Repo [https://www.svgrepo.com/]\n\nWebsite Templates\n 1. Free CSS [https://www.free-css.com/]: Free CSS templates, layouts, and\n    menus.\n 2. Free Web Templates [https://www.freewebtemplates.com/]\n 3. Free Website Templates [https://freewebsitetemplates.com/]\n 4. One Page HTML templates [https://onepagelove.com/templates/html-templates]\n 5. BootstrapMade [https://bootstrapmade.com/]: Free website templates (requires\n    attribution)\n 6. HTML5 UP! [https://html5up.net/]: Free responsive HTML5 templates (requires\n    attribution)\n 7. TEMPLATD [https://templated.co/]: Free HTML templates (requires attribution)\n\nIllustrations\n 1. unDraw [https://undraw.co/]: Free illustrations for any project you can\n    think of.\n 2. Lukasz Adam’s Free Illustrations [https://lukaszadam.com/illustrations]: \n    Free unique illustrations.\n 3. DrawKit [https://www.drawkit.io/]: Free wide range of illustrations.\n\nImages\n 1. Unsplash [https://unsplash.com/]: Free images with no attribution required.\n 2. Pexels [https://www.pexels.com/]: Free stock images with no attribution\n    required.\n\nGradients and Colors\n 1. WebGradients [https://webgradients.com/]: Free gradients that you can either\n    copy as CSS rules or download them as .sketch or .psd\n 2. uiGradients [https://uigradients.com/#Pinky]: Free gradients that you can\n    either copy as CSS rules or download them as .jpg images.\n 3. Gradient Hunt [https://gradienthunt.com/]: Free gradients that you can\n    either copy as CSS rules or download them as .png images. They also offer a\n    Chrome extension.\n 4. Color Hunt [https://colorhunt.co/]: Free color schemas. Also offers a Chrome\n    extension.\n\nOther\n 1. Pattern Cooler [https://www.patterncooler.com/]: Free background patterns.\n 2. The Pattern Library [http://thepatternlibrary.com/]: Free background\n    patterns.\n 3. hatchful [https://hatchful.shopify.com/]: Free logo generator.","html":"<p>Perhaps one of the hardest tasks is finding free resources for your projects. This list will hold websites that offer freebies. I will try to keep the list updated along the way.</p><p>Some of the websites may have a different license for each resource they offer, so you might need to look out for that.</p><hr><h2 id=\"general\">General</h2><ol><li><a href=\"https://freebiesupply.com/\" rel=\"noopener nofollow\"><strong><strong>Freebie Supply</strong></strong></a><strong><strong>: </strong></strong>Free icons, vectors, fonts, templates, themes and more.</li><li><a href=\"https://freebiesbug.com/\" rel=\"noopener nofollow\"><strong><strong>Freebiesbug</strong></strong></a>: Another website that has a wide collection of icons, vectors, templates, and more.</li><li><a href=\"https://neede.co/\" rel=\"noopener nofollow\"><strong><strong>Neede</strong></strong></a><strong><strong>: </strong></strong>It’s aimed more towards designers, but developers might find some useful stuff like templates, colors, illustrations and more.</li></ol><h2 id=\"fonts\">Fonts</h2><ol><li><a href=\"https://fonts.google.com/\" rel=\"noopener nofollow\"><strong><strong>Google Fonts</strong></strong></a></li><li><a href=\"https://www.1001fonts.com/\" rel=\"noopener nofollow\"><strong><strong>1001 Fonts</strong></strong></a></li></ol><h2 id=\"icons\">Icons</h2><ol><li><a href=\"https://material.io/resources/icons/\" rel=\"noopener nofollow\"><strong><strong>Material Design Icons</strong></strong></a></li><li><a href=\"https://feathericons.com/\" rel=\"noopener nofollow\"><strong><strong>Feather</strong></strong></a></li><li><a href=\"https://www.svgrepo.com/\" rel=\"noopener nofollow\"><strong><strong>SVG Repo</strong></strong></a></li></ol><h2 id=\"website-templates\">Website Templates</h2><ol><li><a href=\"https://www.free-css.com/\" rel=\"noopener nofollow\"><strong><strong>Free CSS</strong></strong></a>: Free CSS templates, layouts, and menus.</li><li><a href=\"https://www.freewebtemplates.com/\" rel=\"noopener nofollow\"><strong><strong>Free Web Templates</strong></strong></a></li><li><a href=\"https://freewebsitetemplates.com/\" rel=\"noopener nofollow\"><strong><strong>Free Website Templates</strong></strong></a></li><li><a href=\"https://onepagelove.com/templates/html-templates\" rel=\"noopener nofollow\"><strong><strong>One Page HTML templates</strong></strong></a></li><li><a href=\"https://bootstrapmade.com/\" rel=\"noopener nofollow\"><strong><strong>BootstrapMade</strong></strong></a>: Free website templates (requires attribution)</li><li><a href=\"https://html5up.net/\" rel=\"noopener nofollow\"><strong><strong>HTML5 UP!</strong></strong></a><strong><strong>: </strong></strong>Free responsive HTML5 templates (requires attribution)</li><li><a href=\"https://templated.co/\" rel=\"noopener nofollow\"><strong><strong>TEMPLATD</strong></strong></a>: Free HTML templates (requires attribution)</li></ol><h2 id=\"illustrations\">Illustrations</h2><ol><li><a href=\"https://undraw.co/\" rel=\"noopener nofollow\"><strong><strong>unDraw</strong></strong></a>: Free illustrations for any project you can think of.</li><li><a href=\"https://lukaszadam.com/illustrations\" rel=\"noopener nofollow\"><strong><strong>Lukasz Adam’s Free Illustrations</strong></strong></a><strong><strong>: </strong></strong>Free unique illustrations.</li><li><a href=\"https://www.drawkit.io/\" rel=\"noopener nofollow\"><strong><strong>DrawKit</strong></strong></a>: Free wide range of illustrations.</li></ol><h2 id=\"images\">Images</h2><ol><li><a href=\"https://unsplash.com/\" rel=\"noopener nofollow\"><strong><strong>Unsplash</strong></strong></a><strong><strong>: </strong></strong>Free images with no attribution required.</li><li><a href=\"https://www.pexels.com/\" rel=\"noopener nofollow\"><strong><strong>Pexels</strong></strong></a>: Free stock images with no attribution required.</li></ol><h2 id=\"gradients-and-colors\">Gradients and Colors</h2><ol><li><a href=\"https://webgradients.com/\" rel=\"noopener nofollow\"><strong><strong>WebGradients</strong></strong></a>: Free gradients that you can either copy as CSS rules or download them as .sketch or .psd</li><li><a href=\"https://uigradients.com/#Pinky\" rel=\"noopener nofollow\"><strong><strong>uiGradients</strong></strong></a>: Free gradients that you can either copy as CSS rules or download them as .jpg images.</li><li><a href=\"https://gradienthunt.com/\" rel=\"noopener nofollow\"><strong><strong>Gradient Hunt</strong></strong></a>: Free gradients that you can either copy as CSS rules or download them as .png images. They also offer a Chrome extension.</li><li><a href=\"https://colorhunt.co/\" rel=\"noopener nofollow\"><strong><strong>Color Hunt</strong></strong></a>: Free color schemas. Also offers a Chrome extension.</li></ol><h2 id=\"other\">Other</h2><ol><li><a href=\"https://www.patterncooler.com/\" rel=\"noopener nofollow\"><strong><strong>Pattern Cooler</strong></strong></a>: Free background patterns.</li><li><a href=\"http://thepatternlibrary.com/\" rel=\"noopener nofollow\"><strong><strong>The Pattern Library</strong></strong></a>: Free background patterns.</li><li><a href=\"https://hatchful.shopify.com/\" rel=\"noopener nofollow\"><strong><strong>hatchful</strong></strong></a>: Free logo generator.</li></ol>","url":"https://backend.shahednasser.com/best-websites-to-find-free-resources-for-frontend-web-developers-and-designers/","canonical_url":null,"uuid":"09c132ce-ef97-45b9-8943-a38cf875e93f","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"5f9740bab366d4001e86cc8c","reading_time":1,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Perhaps one of the hardest tasks is finding free resources for your projects. This list will hold websites that offer freebies. I will try to keep the list updated along the way.</p><p>Some of the websites may have a different license for each resource they offer, so you might need to look out for that.</p><hr><h2 id=\"general\">General</h2><ol><li><a href=\"https://freebiesupply.com/\" rel=\"noopener nofollow\"><strong><strong>Freebie Supply</strong></strong></a><strong><strong>: </strong></strong>Free icons, vectors, fonts, templates, themes and more.</li><li><a href=\"https://freebiesbug.com/\" rel=\"noopener nofollow\"><strong><strong>Freebiesbug</strong></strong></a>: Another website that has a wide collection of icons, vectors, templates, and more.</li><li><a href=\"https://neede.co/\" rel=\"noopener nofollow\"><strong><strong>Neede</strong></strong></a><strong><strong>: </strong></strong>It’s aimed more towards designers, but developers might find some useful stuff like templates, colors, illustrations and more.</li></ol><h2 id=\"fonts\">Fonts</h2><ol><li><a href=\"https://fonts.google.com/\" rel=\"noopener nofollow\"><strong><strong>Google Fonts</strong></strong></a></li><li><a href=\"https://www.1001fonts.com/\" rel=\"noopener nofollow\"><strong><strong>1001 Fonts</strong></strong></a></li></ol><h2 id=\"icons\">Icons</h2><ol><li><a href=\"https://material.io/resources/icons/\" rel=\"noopener nofollow\"><strong><strong>Material Design Icons</strong></strong></a></li><li><a href=\"https://feathericons.com/\" rel=\"noopener nofollow\"><strong><strong>Feather</strong></strong></a></li><li><a href=\"https://www.svgrepo.com/\" rel=\"noopener nofollow\"><strong><strong>SVG Repo</strong></strong></a></li></ol><h2 id=\"website-templates\">Website Templates</h2><ol><li><a href=\"https://www.free-css.com/\" rel=\"noopener nofollow\"><strong><strong>Free CSS</strong></strong></a>: Free CSS templates, layouts, and menus.</li><li><a href=\"https://www.freewebtemplates.com/\" rel=\"noopener nofollow\"><strong><strong>Free Web Templates</strong></strong></a></li><li><a href=\"https://freewebsitetemplates.com/\" rel=\"noopener nofollow\"><strong><strong>Free Website Templates</strong></strong></a></li><li><a href=\"https://onepagelove.com/templates/html-templates\" rel=\"noopener nofollow\"><strong><strong>One Page HTML templates</strong></strong></a></li><li><a href=\"https://bootstrapmade.com/\" rel=\"noopener nofollow\"><strong><strong>BootstrapMade</strong></strong></a>: Free website templates (requires attribution)</li><li><a href=\"https://html5up.net/\" rel=\"noopener nofollow\"><strong><strong>HTML5 UP!</strong></strong></a><strong><strong>: </strong></strong>Free responsive HTML5 templates (requires attribution)</li><li><a href=\"https://templated.co/\" rel=\"noopener nofollow\"><strong><strong>TEMPLATD</strong></strong></a>: Free HTML templates (requires attribution)</li></ol><h2 id=\"illustrations\">Illustrations</h2><ol><li><a href=\"https://undraw.co/\" rel=\"noopener nofollow\"><strong><strong>unDraw</strong></strong></a>: Free illustrations for any project you can think of.</li><li><a href=\"https://lukaszadam.com/illustrations\" rel=\"noopener nofollow\"><strong><strong>Lukasz Adam’s Free Illustrations</strong></strong></a><strong><strong>: </strong></strong>Free unique illustrations.</li><li><a href=\"https://www.drawkit.io/\" rel=\"noopener nofollow\"><strong><strong>DrawKit</strong></strong></a>: Free wide range of illustrations.</li></ol><h2 id=\"images\">Images</h2><ol><li><a href=\"https://unsplash.com/\" rel=\"noopener nofollow\"><strong><strong>Unsplash</strong></strong></a><strong><strong>: </strong></strong>Free images with no attribution required.</li><li><a href=\"https://www.pexels.com/\" rel=\"noopener nofollow\"><strong><strong>Pexels</strong></strong></a>: Free stock images with no attribution required.</li></ol><h2 id=\"gradients-and-colors\">Gradients and Colors</h2><ol><li><a href=\"https://webgradients.com/\" rel=\"noopener nofollow\"><strong><strong>WebGradients</strong></strong></a>: Free gradients that you can either copy as CSS rules or download them as .sketch or .psd</li><li><a href=\"https://uigradients.com/#Pinky\" rel=\"noopener nofollow\"><strong><strong>uiGradients</strong></strong></a>: Free gradients that you can either copy as CSS rules or download them as .jpg images.</li><li><a href=\"https://gradienthunt.com/\" rel=\"noopener nofollow\"><strong><strong>Gradient Hunt</strong></strong></a>: Free gradients that you can either copy as CSS rules or download them as .png images. They also offer a Chrome extension.</li><li><a href=\"https://colorhunt.co/\" rel=\"noopener nofollow\"><strong><strong>Color Hunt</strong></strong></a>: Free color schemas. Also offers a Chrome extension.</li></ol><h2 id=\"other\">Other</h2><ol><li><a href=\"https://www.patterncooler.com/\" rel=\"noopener nofollow\"><strong><strong>Pattern Cooler</strong></strong></a>: Free background patterns.</li><li><a href=\"http://thepatternlibrary.com/\" rel=\"noopener nofollow\"><strong><strong>The Pattern Library</strong></strong></a>: Free background patterns.</li><li><a href=\"https://hatchful.shopify.com/\" rel=\"noopener nofollow\"><strong><strong>hatchful</strong></strong></a>: Free logo generator.</li></ol>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Perhaps one of the hardest tasks is finding free resources for your projects. This list will hold websites that offer freebies. I will try to keep the list updated along the way."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Some of the websites may have a different license for each resource they offer, so you might need to look out for that."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"general"},"children":[{"type":"text","value":"General"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://freebiesupply.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Freebie Supply"}]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":": "}]}]},{"type":"text","value":"Free icons, vectors, fonts, templates, themes and more."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://freebiesbug.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Freebiesbug"}]}]}]},{"type":"text","value":": Another website that has a wide collection of icons, vectors, templates, and more."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://neede.co/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Neede"}]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":": "}]}]},{"type":"text","value":"It’s aimed more towards designers, but developers might find some useful stuff like templates, colors, illustrations and more."}]}]},{"type":"element","tagName":"h2","properties":{"id":"fonts"},"children":[{"type":"text","value":"Fonts"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://fonts.google.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Google Fonts"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.1001fonts.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"1001 Fonts"}]}]}]}]}]},{"type":"element","tagName":"h2","properties":{"id":"icons"},"children":[{"type":"text","value":"Icons"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://material.io/resources/icons/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Material Design Icons"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://feathericons.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Feather"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.svgrepo.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"SVG Repo"}]}]}]}]}]},{"type":"element","tagName":"h2","properties":{"id":"website-templates"},"children":[{"type":"text","value":"Website Templates"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.free-css.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Free CSS"}]}]}]},{"type":"text","value":": Free CSS templates, layouts, and menus."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.freewebtemplates.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Free Web Templates"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://freewebsitetemplates.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Free Website Templates"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://onepagelove.com/templates/html-templates","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"One Page HTML templates"}]}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://bootstrapmade.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"BootstrapMade"}]}]}]},{"type":"text","value":": Free website templates (requires attribution)"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://html5up.net/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"HTML5 UP!"}]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":": "}]}]},{"type":"text","value":"Free responsive HTML5 templates (requires attribution)"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://templated.co/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"TEMPLATD"}]}]}]},{"type":"text","value":": Free HTML templates (requires attribution)"}]}]},{"type":"element","tagName":"h2","properties":{"id":"illustrations"},"children":[{"type":"text","value":"Illustrations"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://undraw.co/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"unDraw"}]}]}]},{"type":"text","value":": Free illustrations for any project you can think of."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://lukaszadam.com/illustrations","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Lukasz Adam’s Free Illustrations"}]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":": "}]}]},{"type":"text","value":"Free unique illustrations."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.drawkit.io/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"DrawKit"}]}]}]},{"type":"text","value":": Free wide range of illustrations."}]}]},{"type":"element","tagName":"h2","properties":{"id":"images"},"children":[{"type":"text","value":"Images"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://unsplash.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Unsplash"}]}]}]},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":": "}]}]},{"type":"text","value":"Free images with no attribution required."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.pexels.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Pexels"}]}]}]},{"type":"text","value":": Free stock images with no attribution required."}]}]},{"type":"element","tagName":"h2","properties":{"id":"gradients-and-colors"},"children":[{"type":"text","value":"Gradients and Colors"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://webgradients.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"WebGradients"}]}]}]},{"type":"text","value":": Free gradients that you can either copy as CSS rules or download them as .sketch or .psd"}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://uigradients.com/#Pinky","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"uiGradients"}]}]}]},{"type":"text","value":": Free gradients that you can either copy as CSS rules or download them as .jpg images."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://gradienthunt.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Gradient Hunt"}]}]}]},{"type":"text","value":": Free gradients that you can either copy as CSS rules or download them as .png images. They also offer a Chrome extension."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://colorhunt.co/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Color Hunt"}]}]}]},{"type":"text","value":": Free color schemas. Also offers a Chrome extension."}]}]},{"type":"element","tagName":"h2","properties":{"id":"other"},"children":[{"type":"text","value":"Other"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.patterncooler.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Pattern Cooler"}]}]}]},{"type":"text","value":": Free background patterns."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"http://thepatternlibrary.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"The Pattern Library"}]}]}]},{"type":"text","value":": Free background patterns."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://hatchful.shopify.com/","rel":["noopener","nofollow"]},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"hatchful"}]}]}]},{"type":"text","value":": Free logo generator."}]}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"general","heading":"General"},{"id":"fonts","heading":"Fonts"},{"id":"icons","heading":"Icons"},{"id":"website-templates","heading":"Website Templates"},{"id":"illustrations","heading":"Illustrations"},{"id":"images","heading":"Images"},{"id":"gradients-and-colors","heading":"Gradients and Colors"},{"id":"other","heading":"Other"}]},"featureImageSharp":{"base":"photo-1505304451-3b3b85a91afe.jpg","publicURL":"/static/5b5b3cb18304a6e7b147980c13d0c5b3/photo-1505304451-3b3b85a91afe.jpg","imageMeta":{"width":2000,"height":1125},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAALABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAMEAv/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAFdUUwgwR//xAAbEAEAAgIDAAAAAAAAAAAAAAABAgMABBMiMf/aAAgBAQABBQLX7FsXJqTqsmPPasvf/8QAFREBAQAAAAAAAAAAAAAAAAAAEBH/2gAIAQMBAT8Bh//EABYRAAMAAAAAAAAAAAAAAAAAABARIf/aAAgBAgEBPwFwf//EABsQAQACAgMAAAAAAAAAAAAAAAEAAhEhEBIx/9oACAEBAAY/An0me9tRhUdRzd4//8QAGhAAAwEBAQEAAAAAAAAAAAAAAAERITFBUf/aAAgBAQABPyGW9r2xJGLH0paKO3fSKn5GiMDNu31n/9oADAMBAAIAAwAAABBv3//EABYRAAMAAAAAAAAAAAAAAAAAAAABIf/aAAgBAwEBPxCHRn//xAAWEQEBAQAAAAAAAAAAAAAAAAAAIQH/2gAIAQIBAT8QuGP/xAAdEAEAAwABBQAAAAAAAAAAAAABABEhMUFRYXGh/9oACAEBAAE/EKUdjLuR9lP3wg8Zce+b0WxhiG0Ngsg4MipLor1n/9k=","aspectRatio":1.7857142857142858,"src":"/static/5b5b3cb18304a6e7b147980c13d0c5b3/ea4ab/photo-1505304451-3b3b85a91afe.jpg","srcSet":"/static/5b5b3cb18304a6e7b147980c13d0c5b3/477ba/photo-1505304451-3b3b85a91afe.jpg 175w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/06776/photo-1505304451-3b3b85a91afe.jpg 350w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/ea4ab/photo-1505304451-3b3b85a91afe.jpg 700w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/3055e/photo-1505304451-3b3b85a91afe.jpg 1050w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/eff08/photo-1505304451-3b3b85a91afe.jpg 1400w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/4e5f3/photo-1505304451-3b3b85a91afe.jpg 2000w","srcWebp":"/static/5b5b3cb18304a6e7b147980c13d0c5b3/89afa/photo-1505304451-3b3b85a91afe.webp","srcSetWebp":"/static/5b5b3cb18304a6e7b147980c13d0c5b3/9fca7/photo-1505304451-3b3b85a91afe.webp 175w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/37a4e/photo-1505304451-3b3b85a91afe.webp 350w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/89afa/photo-1505304451-3b3b85a91afe.webp 700w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/78e7a/photo-1505304451-3b3b85a91afe.webp 1050w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/03d34/photo-1505304451-3b3b85a91afe.webp 1400w,\n/static/5b5b3cb18304a6e7b147980c13d0c5b3/49d6b/photo-1505304451-3b3b85a91afe.webp 2000w","sizes":"(max-width: 700px) 100vw, 700px"}}}},"allGhostPost":{"edges":[{"node":{"id":"Ghost__Post__621c858deb81df0613580535","title":"Cross-Post CLI Tool: New Features and Fixes","slug":"cross-post-cli-tool-new-features-and-fixes","featured":true,"feature_image":"https://backend.shahednasser.com/content/images/2022/03/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp","excerpt":"I'll be sharing some of the features and fixes the new version of cross-post-blog includes.","custom_excerpt":"I'll be sharing some of the features and fixes the new version of cross-post-blog includes.","visibility":"public","created_at_pretty":"28 Feb 2022","published_at_pretty":"28 Feb 2022","updated_at_pretty":"27 Mar 2022","created_at":"2022-02-28T08:19:25.000+00:00","published_at":"2022-02-28T09:05:19.000+00:00","updated_at":"2022-03-27T10:37:59.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG_0591.jpg","publicURL":"/static/ceb49c3c631485453e71e00d7f84b069/IMG_0591.jpg","imageMeta":{"width":1182,"height":1179},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMEAQL/xAAWAQEBAQAAAAAAAAAAAAAAAAADBAL/2gAMAwEAAhADEAAAAdXiFM6i0CohUWXoKn//xAAcEAACAgIDAAAAAAAAAAAAAAACAwESBBEhM0H/2gAIAQEAAQUCWySE3WEr7SzbXjAj4iKty+sOQ//EABYRAQEBAAAAAAAAAAAAAAAAAAERIP/aAAgBAwEBPwEhj//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAIBBAMBAAAAAAAAAAAAAAABIRESMUECECJx/9oACAEBAAY/ApVGWvOjzgtUwLlTZA0sdL4f/8QAHBAAAwACAwEAAAAAAAAAAAAAAAERITFBkbHB/9oACAEBAAE/IahkCy+N2GwZpjQiJHJCspUFY0QrSi+HqiW2rgf/2gAMAwEAAgADAAAAEPw3/wD/xAAYEQEBAAMAAAAAAAAAAAAAAAAAARExQf/aAAgBAwEBPxCtjDqP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQAxEf/aAAgBAgEBPxBFus6Tt//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcYGR0f/aAAgBAQABPxAuaBPPzkO1wyX7F4wkwXanfZrFQgeqE9JgS14vVOvrERIJomVBKwt2jebAeP0yVa8h1n//2Q==","aspectRatio":1,"src":"/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg","srcSet":"/static/ceb49c3c631485453e71e00d7f84b069/f340b/IMG_0591.jpg 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/22d64/IMG_0591.jpg 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/aa249/IMG_0591.jpg 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/0dc33/IMG_0591.jpg 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/d8257/IMG_0591.jpg 1182w","srcWebp":"/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp","srcSetWebp":"/static/ceb49c3c631485453e71e00d7f84b069/59cda/IMG_0591.webp 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/7da75/IMG_0591.webp 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/f282e/IMG_0591.webp 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/a7b21/IMG_0591.webp 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/63099/IMG_0591.webp 1182w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"Almost a year ago, I wrote about how I created a CLI tool\n[https://blog.shahednasser.com/i-created-a-cli-to-cross-post-your-articles-on-dev-hashnode-and-medium] \nto cross-post [https://github.com/shahednasser/cross-post] articles to Dev.to,\nHashnode, and Medium. I created the tool because it made the process easier for\nme, but I also received a lot of feedback from other writers about how it was\nhelpful for them.\n\nSince then, I haven't been able to maintain it much due to my busy schedule.\nNow, I'm taking more time to commit to it and improve it with the help of the\ncommunity.\n\nOn Monday, the 28th of February, I pushed out a new release of cross-post-blog \nwith the version 1.3.0. I'll be sharing some of the features and fixes it\nincludes. You can also check out the GitHub repository\n[https://github.com/shahednasser/cross-post] for more information about the\nlibrary.\n\nIf you're reading this article on Dev.to, Hashnode, or Medium, then it is\nreposted from my own blog\n[https://blog.shahednasser.com/cross-post-cli-tool-new-features-and-fixes/] \nusing the Cross-Post CLI tool!\n\nPosting From Local Files\nBased on demand from some of the developers using this library, I've now added\nthe ability to post directly from a local file instead of a public URL. To do\nthat, you simply need to add the -l or --local option to your command.\n\nFor example:\n\ncross-post run /path/to/test.md -l\n\nThis will post a local file test.md to all of the platforms.\n\nYou can also use it with all of the options you previously used\n[https://github.com/shahednasser/cross-post#cross-posting-your-articles].\n\nChanged Markdown Converter\nEach of the platforms requires you to send the content of your article to post\nin Markdown format. So, when you pass a URL to the command, the content of the\narticle on that page is converted to Markdown before submitting it to the\nplatform you want to post on.\n\nI previously was using node-html-markdown\n[https://www.npmjs.com/package/node-html-markdown]. It worked fine in terms of\nfunctionality. However, there were some issues related to how it parsed code\nblocks [https://github.com/shahednasser/cross-post/issues/14].\n\nThe new version is now using turndown [https://www.npmjs.com/package/turndown] \ninstead, which does a better job of parsing code blocks. Your articles should\nnow be posted to the different platforms almost exactly as you have it posted on\nyour own blog.\n\nAdded Title Selector\nPreviously, you could set a default article and image selectors in the\nconfiguration. You could also override those configurations in the run command.\n\nN0w, you can also set the default title selector in your configuration:\n\ncross-post config titleConfig\n\nOr, pass it as an option -ts or --title-selector to the run command:\n\ncross-post run <url> -ts .post-full-title\n\nUpcoming Features\nI'll be working from now on to improve the tool and add new features, either\nfrom the request of developers using this tool or from my own experience using\nit. For example, a feature that has been requested is the ability to update\nposts [https://github.com/shahednasser/cross-post/issues/20].\n\nI'm also going to look into adding new platforms to enable posting to. If you\nhave any platform in mind that you think would be good to add please do let me\nknow!\n\nHow to Install or Update\nIf you want to install and start using Cross-Post or update your version you can\ninstall it with NPM:\n\nnpm i -g cross-post-blog\n\nPlease check the README [https://github.com/shahednasser/cross-post] for more\ninformation on installing and using this tool.\n\nContribution\nAt the moment, there's no contribution guideline added in the repository (I'm\nworking on that). However, if you would like to contribute to any of the \nexisting issues [https://github.com/shahednasser/cross-post/issues] or add new\nfeatures, then please don't hesitate!","html":"<p>Almost a year ago, I wrote about how <a href=\"https://blog.shahednasser.com/i-created-a-cli-to-cross-post-your-articles-on-dev-hashnode-and-medium\">I created a CLI tool</a> to <a href=\"https://github.com/shahednasser/cross-post\">cross-post</a> articles to Dev.to, Hashnode, and Medium. I created the tool because it made the process easier for me, but I also received a lot of feedback from other writers about how it was helpful for them.</p><p>Since then, I haven't been able to maintain it much due to my busy schedule. Now, I'm taking more time to commit to it and improve it with the help of the community.</p><p>On Monday, the 28th of February, I pushed out a new release of <code>cross-post-blog</code> with the version <code>1.3.0</code>. I'll be sharing some of the features and fixes it includes. You can also check out the <a href=\"https://github.com/shahednasser/cross-post\">GitHub repository</a> for more information about the library.</p><p>If you're reading this article on Dev.to, Hashnode, or Medium, then it is reposted from <a href=\"https://blog.shahednasser.com/cross-post-cli-tool-new-features-and-fixes/\">my own blog</a> using the Cross-Post CLI tool!</p><h2 id=\"posting-from-local-files\">Posting From Local Files</h2><p>Based on demand from some of the developers using this library, I've now added the ability to post directly from a local file instead of a public URL. To do that, you simply need to add the <code>-l</code> or <code>--local</code> option to your command.</p><p>For example:</p><pre><code class=\"language-bash\">cross-post run /path/to/test.md -l</code></pre><p>This will post a local file <code>test.md</code> to all of the platforms.</p><p>You can also use it with all of the <a href=\"https://github.com/shahednasser/cross-post#cross-posting-your-articles\">options you previously used</a>.</p><h2 id=\"changed-markdown-converter\">Changed Markdown Converter</h2><p>Each of the platforms requires you to send the content of your article to post in Markdown format. So, when you pass a URL to the command, the content of the article on that page is converted to Markdown before submitting it to the platform you want to post on.</p><p>I previously was using <a href=\"https://www.npmjs.com/package/node-html-markdown\"><code>node-html-markdown</code></a>. It worked fine in terms of functionality. However, there were some issues related to how it <a href=\"https://github.com/shahednasser/cross-post/issues/14\">parsed code blocks</a>.</p><p>The new version is now using <a href=\"https://www.npmjs.com/package/turndown\"><code>turndown</code></a> instead, which does a better job of parsing code blocks. Your articles should now be posted to the different platforms almost exactly as you have it posted on your own blog.</p><h2 id=\"added-title-selector\">Added Title Selector</h2><p>Previously, you could set a default article and image selectors in the configuration. You could also override those configurations in the <code>run</code> command.</p><p>N0w, you can also set the default title selector in your configuration:</p><pre><code class=\"language-bash\">cross-post config titleConfig</code></pre><p>Or, pass it as an option <code>-ts</code> or <code>--title-selector</code> to the <code>run</code> command:</p><pre><code class=\"language-bash\">cross-post run &lt;url&gt; -ts .post-full-title</code></pre><h2 id=\"upcoming-features\">Upcoming Features</h2><p>I'll be working from now on to improve the tool and add new features, either from the request of developers using this tool or from my own experience using it. For example, a feature that has been requested is the ability to <a href=\"https://github.com/shahednasser/cross-post/issues/20\">update posts</a>.</p><p>I'm also going to look into adding new platforms to enable posting to. If you have any platform in mind that you think would be good to add please do let me know!</p><h2 id=\"how-to-install-or-update\">How to Install or Update</h2><p>If you want to install and start using Cross-Post or update your version you can install it with NPM:</p><pre><code class=\"language-bash\">npm i -g cross-post-blog</code></pre><p>Please check the <a href=\"https://github.com/shahednasser/cross-post\">README</a> for more information on installing and using this tool.</p><h2 id=\"contribution\">Contribution</h2><p>At the moment, there's no contribution guideline added in the repository (I'm working on that). However, if you would like to contribute to any of the <a href=\"https://github.com/shahednasser/cross-post/issues\">existing issues</a> or add new features, then please don't hesitate!</p>","url":"https://backend.shahednasser.com/cross-post-cli-tool-new-features-and-fixes/","canonical_url":null,"uuid":"0a1d38d3-80a7-479b-94f7-bc16b2f8de06","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"621c858deb81df0613580535","reading_time":2,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>Almost a year ago, I wrote about how <a href=\"https://blog.shahednasser.com/i-created-a-cli-to-cross-post-your-articles-on-dev-hashnode-and-medium\">I created a CLI tool</a> to <a href=\"https://github.com/shahednasser/cross-post\">cross-post</a> articles to Dev.to, Hashnode, and Medium. I created the tool because it made the process easier for me, but I also received a lot of feedback from other writers about how it was helpful for them.</p><p>Since then, I haven't been able to maintain it much due to my busy schedule. Now, I'm taking more time to commit to it and improve it with the help of the community.</p><p>On Monday, the 28th of February, I pushed out a new release of <code class=\"language-text\">cross-post-blog</code> with the version <code class=\"language-text\">1.3.0</code>. I'll be sharing some of the features and fixes it includes. You can also check out the <a href=\"https://github.com/shahednasser/cross-post\">GitHub repository</a> for more information about the library.</p><p>If you're reading this article on Dev.to, Hashnode, or Medium, then it is reposted from <a href=\"https://blog.shahednasser.com/cross-post-cli-tool-new-features-and-fixes/\">my own blog</a> using the Cross-Post CLI tool!</p><h2 id=\"posting-from-local-files\">Posting From Local Files</h2><p>Based on demand from some of the developers using this library, I've now added the ability to post directly from a local file instead of a public URL. To do that, you simply need to add the <code class=\"language-text\">-l</code> or <code class=\"language-text\">--local</code> option to your command.</p><p>For example:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">cross-post run /path/to/test.md -l</code></pre></div><p>This will post a local file <code class=\"language-text\">test.md</code> to all of the platforms.</p><p>You can also use it with all of the <a href=\"https://github.com/shahednasser/cross-post#cross-posting-your-articles\">options you previously used</a>.</p><h2 id=\"changed-markdown-converter\">Changed Markdown Converter</h2><p>Each of the platforms requires you to send the content of your article to post in Markdown format. So, when you pass a URL to the command, the content of the article on that page is converted to Markdown before submitting it to the platform you want to post on.</p><p>I previously was using <a href=\"https://www.npmjs.com/package/node-html-markdown\"><code class=\"language-text\">node-html-markdown</code></a>. It worked fine in terms of functionality. However, there were some issues related to how it <a href=\"https://github.com/shahednasser/cross-post/issues/14\">parsed code blocks</a>.</p><p>The new version is now using <a href=\"https://www.npmjs.com/package/turndown\"><code class=\"language-text\">turndown</code></a> instead, which does a better job of parsing code blocks. Your articles should now be posted to the different platforms almost exactly as you have it posted on your own blog.</p><h2 id=\"added-title-selector\">Added Title Selector</h2><p>Previously, you could set a default article and image selectors in the configuration. You could also override those configurations in the <code class=\"language-text\">run</code> command.</p><p>N0w, you can also set the default title selector in your configuration:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">cross-post config titleConfig</code></pre></div><p>Or, pass it as an option <code class=\"language-text\">-ts</code> or <code class=\"language-text\">--title-selector</code> to the <code class=\"language-text\">run</code> command:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">cross-post run <span class=\"token operator\">&#x3C;</span>url<span class=\"token operator\">></span> -ts .post-full-title</code></pre></div><h2 id=\"upcoming-features\">Upcoming Features</h2><p>I'll be working from now on to improve the tool and add new features, either from the request of developers using this tool or from my own experience using it. For example, a feature that has been requested is the ability to <a href=\"https://github.com/shahednasser/cross-post/issues/20\">update posts</a>.</p><p>I'm also going to look into adding new platforms to enable posting to. If you have any platform in mind that you think would be good to add please do let me know!</p><h2 id=\"how-to-install-or-update\">How to Install or Update</h2><p>If you want to install and start using Cross-Post or update your version you can install it with NPM:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">npm</span> i -g cross-post-blog</code></pre></div><p>Please check the <a href=\"https://github.com/shahednasser/cross-post\">README</a> for more information on installing and using this tool.</p><h2 id=\"contribution\">Contribution</h2><p>At the moment, there's no contribution guideline added in the repository (I'm working on that). However, if you would like to contribute to any of the <a href=\"https://github.com/shahednasser/cross-post/issues\">existing issues</a> or add new features, then please don't hesitate!</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Almost a year ago, I wrote about how "},{"type":"element","tagName":"a","properties":{"href":"https://blog.shahednasser.com/i-created-a-cli-to-cross-post-your-articles-on-dev-hashnode-and-medium"},"children":[{"type":"text","value":"I created a CLI tool"}]},{"type":"text","value":" to "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post"},"children":[{"type":"text","value":"cross-post"}]},{"type":"text","value":" articles to Dev.to, Hashnode, and Medium. I created the tool because it made the process easier for me, but I also received a lot of feedback from other writers about how it was helpful for them."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Since then, I haven't been able to maintain it much due to my busy schedule. Now, I'm taking more time to commit to it and improve it with the help of the community."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"On Monday, the 28th of February, I pushed out a new release of "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"cross-post-blog"}]},{"type":"text","value":" with the version "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"1.3.0"}]},{"type":"text","value":". I'll be sharing some of the features and fixes it includes. You can also check out the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post"},"children":[{"type":"text","value":"GitHub repository"}]},{"type":"text","value":" for more information about the library."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you're reading this article on Dev.to, Hashnode, or Medium, then it is reposted from "},{"type":"element","tagName":"a","properties":{"href":"https://blog.shahednasser.com/cross-post-cli-tool-new-features-and-fixes/"},"children":[{"type":"text","value":"my own blog"}]},{"type":"text","value":" using the Cross-Post CLI tool!"}]},{"type":"element","tagName":"h2","properties":{"id":"posting-from-local-files"},"children":[{"type":"text","value":"Posting From Local Files"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Based on demand from some of the developers using this library, I've now added the ability to post directly from a local file instead of a public URL. To do that, you simply need to add the "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"-l"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"--local"}]},{"type":"text","value":" option to your command."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For example:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"cross-post run /path/to/test.md -l"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This will post a local file "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"test.md"}]},{"type":"text","value":" to all of the platforms."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can also use it with all of the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post#cross-posting-your-articles"},"children":[{"type":"text","value":"options you previously used"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"h2","properties":{"id":"changed-markdown-converter"},"children":[{"type":"text","value":"Changed Markdown Converter"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Each of the platforms requires you to send the content of your article to post in Markdown format. So, when you pass a URL to the command, the content of the article on that page is converted to Markdown before submitting it to the platform you want to post on."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I previously was using "},{"type":"element","tagName":"a","properties":{"href":"https://www.npmjs.com/package/node-html-markdown"},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"node-html-markdown"}]}]},{"type":"text","value":". It worked fine in terms of functionality. However, there were some issues related to how it "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post/issues/14"},"children":[{"type":"text","value":"parsed code blocks"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The new version is now using "},{"type":"element","tagName":"a","properties":{"href":"https://www.npmjs.com/package/turndown"},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"turndown"}]}]},{"type":"text","value":" instead, which does a better job of parsing code blocks. Your articles should now be posted to the different platforms almost exactly as you have it posted on your own blog."}]},{"type":"element","tagName":"h2","properties":{"id":"added-title-selector"},"children":[{"type":"text","value":"Added Title Selector"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Previously, you could set a default article and image selectors in the configuration. You could also override those configurations in the "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"run"}]},{"type":"text","value":" command."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"N0w, you can also set the default title selector in your configuration:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"cross-post config titleConfig"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Or, pass it as an option "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"-ts"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"--title-selector"}]},{"type":"text","value":" to the "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"run"}]},{"type":"text","value":" command:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"cross-post run "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"url"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":">"}]},{"type":"text","value":" -ts .post-full-title"}]}]}]},{"type":"element","tagName":"h2","properties":{"id":"upcoming-features"},"children":[{"type":"text","value":"Upcoming Features"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I'll be working from now on to improve the tool and add new features, either from the request of developers using this tool or from my own experience using it. For example, a feature that has been requested is the ability to "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post/issues/20"},"children":[{"type":"text","value":"update posts"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I'm also going to look into adding new platforms to enable posting to. If you have any platform in mind that you think would be good to add please do let me know!"}]},{"type":"element","tagName":"h2","properties":{"id":"how-to-install-or-update"},"children":[{"type":"text","value":"How to Install or Update"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you want to install and start using Cross-Post or update your version you can install it with NPM:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"bash"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"npm"}]},{"type":"text","value":" i -g cross-post-blog"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Please check the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post"},"children":[{"type":"text","value":"README"}]},{"type":"text","value":" for more information on installing and using this tool."}]},{"type":"element","tagName":"h2","properties":{"id":"contribution"},"children":[{"type":"text","value":"Contribution"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"At the moment, there's no contribution guideline added in the repository (I'm working on that). However, if you would like to contribute to any of the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post/issues"},"children":[{"type":"text","value":"existing issues"}]},{"type":"text","value":" or add new features, then please don't hesitate!"}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"posting-from-local-files","heading":"Posting From Local Files"},{"id":"changed-markdown-converter","heading":"Changed Markdown Converter"},{"id":"added-title-selector","heading":"Added Title Selector"},{"id":"upcoming-features","heading":"Upcoming Features"},{"id":"how-to-install-or-update","heading":"How to Install or Update"},{"id":"contribution","heading":"Contribution"}]},"featureImageSharp":{"base":"Cross-Post-CLI-Tool-New-Features-and-Fixes.webp","publicURL":"/static/3992c44a6f85cbb0e7f336ddf13d9f6e/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp","imageMeta":{"width":1000,"height":420},"childImageSharp":{"fluid":{"base64":"data:image/webp;base64,UklGRkoAAABXRUJQVlA4ID4AAAAwAwCdASoUAAgAPtFWo0uoJKMhsAgBABoJaQAAW+FdmqtQAP7yO9S/h6sU4d2KDtkqIR0EW+vogSm7QAAAAA==","aspectRatio":2.364864864864865,"src":"/static/3992c44a6f85cbb0e7f336ddf13d9f6e/89afa/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp","srcSet":"/static/3992c44a6f85cbb0e7f336ddf13d9f6e/9fca7/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 175w,\n/static/3992c44a6f85cbb0e7f336ddf13d9f6e/37a4e/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 350w,\n/static/3992c44a6f85cbb0e7f336ddf13d9f6e/89afa/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 700w,\n/static/3992c44a6f85cbb0e7f336ddf13d9f6e/47f67/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 1000w","srcWebp":"/static/3992c44a6f85cbb0e7f336ddf13d9f6e/89afa/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp","srcSetWebp":"/static/3992c44a6f85cbb0e7f336ddf13d9f6e/9fca7/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 175w,\n/static/3992c44a6f85cbb0e7f336ddf13d9f6e/37a4e/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 350w,\n/static/3992c44a6f85cbb0e7f336ddf13d9f6e/89afa/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 700w,\n/static/3992c44a6f85cbb0e7f336ddf13d9f6e/47f67/Cross-Post-CLI-Tool-New-Features-and-Fixes.webp 1000w","sizes":"(max-width: 700px) 100vw, 700px"}}}}},{"node":{"id":"Ghost__Post__6127ba1b3ed159214d382e9a","title":"I Created a CLI to Cross-Post Your Articles On Dev, Hashnode, and Medium","slug":"i-created-a-cli-to-cross-post-your-articles-on-dev-hashnode-and-medium","featured":false,"feature_image":"https://res-2.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/photo-1567361808960-dec9cb578182.jpg","excerpt":"If you own a blog like me, but also cross-post your articles on other platforms, it gets tedious. So I created a simple CLI to do it easily.","custom_excerpt":"If you own a blog like me, but also cross-post your articles on other platforms, it gets tedious. So I created a simple CLI to do it easily.","visibility":"public","created_at_pretty":"26 Mar 2021","published_at_pretty":"26 Mar 2021","updated_at_pretty":"26 Aug 2021","created_at":"2021-03-26T21:20:31.000+00:00","published_at":"2021-03-26T21:32:49.000+00:00","updated_at":"2021-08-26T17:42:48.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG_0591.jpg","publicURL":"/static/ceb49c3c631485453e71e00d7f84b069/IMG_0591.jpg","imageMeta":{"width":1182,"height":1179},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMEAQL/xAAWAQEBAQAAAAAAAAAAAAAAAAADBAL/2gAMAwEAAhADEAAAAdXiFM6i0CohUWXoKn//xAAcEAACAgIDAAAAAAAAAAAAAAACAwESBBEhM0H/2gAIAQEAAQUCWySE3WEr7SzbXjAj4iKty+sOQ//EABYRAQEBAAAAAAAAAAAAAAAAAAERIP/aAAgBAwEBPwEhj//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAIBBAMBAAAAAAAAAAAAAAABIRESMUECECJx/9oACAEBAAY/ApVGWvOjzgtUwLlTZA0sdL4f/8QAHBAAAwACAwEAAAAAAAAAAAAAAAERITFBkbHB/9oACAEBAAE/IahkCy+N2GwZpjQiJHJCspUFY0QrSi+HqiW2rgf/2gAMAwEAAgADAAAAEPw3/wD/xAAYEQEBAAMAAAAAAAAAAAAAAAAAARExQf/aAAgBAwEBPxCtjDqP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQAxEf/aAAgBAgEBPxBFus6Tt//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcYGR0f/aAAgBAQABPxAuaBPPzkO1wyX7F4wkwXanfZrFQgeqE9JgS14vVOvrERIJomVBKwt2jebAeP0yVa8h1n//2Q==","aspectRatio":1,"src":"/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg","srcSet":"/static/ceb49c3c631485453e71e00d7f84b069/f340b/IMG_0591.jpg 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/22d64/IMG_0591.jpg 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/aa249/IMG_0591.jpg 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/0dc33/IMG_0591.jpg 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/d8257/IMG_0591.jpg 1182w","srcWebp":"/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp","srcSetWebp":"/static/ceb49c3c631485453e71e00d7f84b069/59cda/IMG_0591.webp 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/7da75/IMG_0591.webp 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/f282e/IMG_0591.webp 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/a7b21/IMG_0591.webp 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/63099/IMG_0591.webp 1182w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"open-source","url":"https://backend.shahednasser.com/tag/open-source/","name":"Open Source","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"open-source","url":"https://backend.shahednasser.com/tag/open-source/","name":"Open Source","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},{"slug":"my-experience","url":"https://backend.shahednasser.com/tag/my-experience/","name":"My Experience","visibility":"public","feature_image":"https://backend.shahednasser.com/content/images/2022/01/photo-1493612276216-ee3925520721-2-1.jpeg","description":"Sharing my experience in or opinions regarding programming, work, or other concepts.","meta_title":null,"meta_description":null,"featureImageSharp":null},{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"If you own a blog like me, but also cross-post your articles on platforms like\nDev, Hashnode, and Medium, it gets tedious to post your articles in different\nplaces.\n\nSo, I created a simple CLI to cross-post my articles on these platforms easily.\nYou can find it on NPM [https://www.npmjs.com/package/cross-post-blog] and check\nthe code on GitHub [https://github.com/shahednasser/cross-post#readme].\n\n\n--------------------------------------------------------------------------------\n\nInstallation\nIn your terminal:\n\nnpm i -g cross-post-blog\n\n\n\n--------------------------------------------------------------------------------\n\nUsage\nSet Configuration\nFor the simplicity of the CLI, and considering most of the APIs of each of the\nplatforms do not allow or provide endpoints for user authentication, you will\nneed to get your access tokens, API keys, or integration tokens from your own\nprofile before using cross-post. This will just need to be done the first time\nor if you want to change the tokens.\n\nThe tokens are all stored on your local machine.\n\nHere's a guide on how to do this for each of the platforms:\n\ndev.to\nAfter logging into your account on dev.to, click on your profile image and then\nclick on Settings\n\nThen, click on the Accounts tab in the sidebar\n\nScroll down to the \"DEV Community API Keys\" section. You need to generate a new\nkey. Enter \"Cross Post\" in the description text box or any name you want then\nclick \"Generate API key\"\n\nCopy the generated API key, then in your terminal:\n\ncross-post config dev\n\n\nYou'll be prompted to enter the API key. Paste the API key you copied earlier\nand hit enter. The API key will be saved.\n\nHashnode\nAfter logging into your account on Hashnode, click on your profile image and\nthen click on \"Account Settings\"\n\nIn the sidebar click on \"Developer\"\n\nClick the \"Generate\" button and then copy the generated access token.\n\nRun the following in your terminal:\n\ncross-post config hashnode\n\n\nFirst, you'll be prompted to enter your access token. Then, you need to enter\nyour Hashnode username. The reason behind that is that when later posting on\nhashnode your publication id is required, so your username will be used here to\nretrieve the publication id. Once you do and everything goes well, the\nconfiguration will be saved successfully.\n\nMedium\nAfter logging into Medium, click on your profile image and then click on\n\"Settings\"\n\nThen click on \"Integration Tokens\" in the sidebar\n\nYou have to enter the description of the token then click \"Get integration\ntoken\" and copy the generated token.\n\nIn your terminal run:\n\ncross-post config medium\n\n\nThen enter the integration token you copied. A request will also be sent to\nMedium to get your authorId as it will be used later to post your article on\nMedium. Once that is done successfully, your configuration will be saved.\n\n\n--------------------------------------------------------------------------------\n\nCross-Posting Your Articles\nTo cross-post your articles, you will use the following command:\n\ncross-post run <url> [options]\n\n\nWhere url is the URL of your article that you want to cross-post. options can\nbe:\n\n 1. -p, --platforms [platforms...] The platform(s) you want to post the article\n    on. By default, if this option is not included, it will be posted on all the\n    platforms. An example of its usage:\n\ncross-post run <url> -p dev hashnode\n\n\n 1. -t, --title [title] The title by default will be taken from the URL you\n    supplied, however, if you want to use a different title you can supply it in\n    this option.\n 2. -s, --selector [selector] by default, the article selector will be used to\n    find your article in the URL you pass as an argument. However, if you need a\n    different selector to be used to find the article, you can pass it here.\n\nThis command will find the HTML element in the URL page you pass as an argument\nand if found, it will extract the title (if no title is passed in the arguments)\nand cover the image.\n\nIt should be noted that on all platforms the article will be posted as a draft,\nhowever, due to the limitations of the Hashnode API, it will be posted as\n\"hidden from Hashnode\" but it will be public in your publication.\n\nUPDATE: In the latest version of this library, you can now pass the option -pu,\n--public to publish the article publicly.\n\n\n--------------------------------------------------------------------------------\n\nConclusion\nIf you find any bugs or have any ideas you would like to contribute, please do\nso on the issues tab in the GitHub Repository\n[https://github.com/shahednasser/cross-post]!","html":"<p>If you own a blog like me, but also cross-post your articles on platforms like Dev, Hashnode, and Medium, it gets tedious to post your articles in different places.</p><p>So, I created a simple CLI to cross-post my articles on these platforms easily. You can find it on <a href=\"https://www.npmjs.com/package/cross-post-blog\">NPM</a> and check the code on <a href=\"https://github.com/shahednasser/cross-post#readme\">GitHub</a>.</p><hr><h2 id=\"installation\">Installation</h2><p>In your terminal:</p><pre><code>npm i -g cross-post-blog\n</code></pre><hr><h2 id=\"usage\">Usage</h2><h3 id=\"set-configuration\">Set Configuration</h3><p>For the simplicity of the CLI, and considering most of the APIs of each of the platforms do not allow or provide endpoints for user authentication, you will need to get your access tokens, API keys, or integration tokens from your own profile before using cross-post. This will just need to be done the first time or if you want to change the tokens.</p><p><strong>The tokens are all stored on your local machine.</strong></p><p>Here's a guide on how to do this for each of the platforms:</p><h3 id=\"dev-to\">dev.to</h3><p>After logging into your account on dev.to, click on your profile image and then click on Settings</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/dev-1.png\" class=\"kg-image\" alt=\"Settings\" loading=\"lazy\"></figure><p>Then, click on the Accounts tab in the sidebar</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/dev-2.png\" class=\"kg-image\" alt=\"Accounts\" loading=\"lazy\"></figure><p>Scroll down to the \"DEV Community API Keys\" section. You need to generate a new key. Enter \"Cross Post\" in the description text box or any name you want then click \"Generate API key\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/dev-3.png\" class=\"kg-image\" alt=\"Generate API Key\" loading=\"lazy\"></figure><p>Copy the generated API key, then in your terminal:</p><pre><code>cross-post config dev\n</code></pre><p>You'll be prompted to enter the API key. Paste the API key you copied earlier and hit enter. The API key will be saved.</p><h3 id=\"hashnode\">Hashnode</h3><p>After logging into your account on Hashnode, click on your profile image and then click on \"Account Settings\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-1.png\" class=\"kg-image\" alt=\"Settings\" loading=\"lazy\"></figure><p>In the sidebar click on \"Developer\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-2.png\" class=\"kg-image\" alt=\"Developer\" loading=\"lazy\"></figure><p>Click the \"Generate\" button and then copy the generated access token.</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-3.png\" class=\"kg-image\" alt=\"Generate\" loading=\"lazy\"></figure><p>Run the following in your terminal:</p><pre><code>cross-post config hashnode\n</code></pre><p>First, you'll be prompted to enter your access token. Then, you need to enter your Hashnode username. The reason behind that is that when later posting on hashnode your publication id is required, so your username will be used here to retrieve the publication id. Once you do and everything goes well, the configuration will be saved successfully.</p><h3 id=\"medium\">Medium</h3><p>After logging into Medium, click on your profile image and then click on \"Settings\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-1.png\" class=\"kg-image\" alt=\"Settings\" loading=\"lazy\"></figure><p>Then click on \"Integration Tokens\" in the sidebar</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-2.png\" class=\"kg-image\" alt=\"Integration Tokens\" loading=\"lazy\"></figure><p>You have to enter the description of the token then click \"Get integration token\" and copy the generated token.</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-3.png\" class=\"kg-image\" alt=\"Generate token\" loading=\"lazy\"></figure><p>In your terminal run:</p><pre><code>cross-post config medium\n</code></pre><p>Then enter the integration token you copied. A request will also be sent to Medium to get your authorId as it will be used later to post your article on Medium. Once that is done successfully, your configuration will be saved.</p><hr><h3 id=\"cross-posting-your-articles\">Cross-Posting Your Articles</h3><p>To cross-post your articles, you will use the following command:</p><pre><code>cross-post run &lt;url&gt; [options]\n</code></pre><p>Where <code>url</code> is the URL of your article that you want to cross-post. <code>options</code> can be:</p><ol><li><code>-p, --platforms [platforms...]</code> The platform(s) you want to post the article on. By default, if this option is not included, it will be posted on all the platforms. An example of its usage:</li></ol><pre><code>cross-post run &lt;url&gt; -p dev hashnode\n</code></pre><ol><li><code>-t, --title [title]</code> The title by default will be taken from the URL you supplied, however, if you want to use a different title you can supply it in this option.</li><li><code>-s, --selector [selector]</code> by default, the <code>article</code> selector will be used to find your article in the URL you pass as an argument. However, if you need a different selector to be used to find the article, you can pass it here.</li></ol><p>This command will find the HTML element in the URL page you pass as an argument and if found, it will extract the title (if no title is passed in the arguments) and cover the image.</p><p>It should be noted that on all platforms the article will be posted as a draft, however, due to the limitations of the Hashnode API, it will be posted as \"hidden from Hashnode\" but it will be public in your publication.</p><p><strong>UPDATE:</strong> In the latest version of this library, you can now pass the option <code>-pu, --public</code> to publish the article publicly.</p><hr><h3 id=\"conclusion\">Conclusion</h3><p>If you find any bugs or have any ideas you would like to contribute, please do so on the issues tab in the <a href=\"https://github.com/shahednasser/cross-post\">GitHub Repository</a>!</p>","url":"https://backend.shahednasser.com/i-created-a-cli-to-cross-post-your-articles-on-dev-hashnode-and-medium/","canonical_url":null,"uuid":"810d1589-151e-4878-8e94-b564b4ea0d85","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"605e501fe52227001e518c28","reading_time":4,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>If you own a blog like me, but also cross-post your articles on platforms like Dev, Hashnode, and Medium, it gets tedious to post your articles in different places.</p><p>So, I created a simple CLI to cross-post my articles on these platforms easily. You can find it on <a href=\"https://www.npmjs.com/package/cross-post-blog\">NPM</a> and check the code on <a href=\"https://github.com/shahednasser/cross-post#readme\">GitHub</a>.</p><hr><h2 id=\"installation\">Installation</h2><p>In your terminal:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">npm i -g cross-post-blog\n</code></pre></div><hr><h2 id=\"usage\">Usage</h2><h3 id=\"set-configuration\">Set Configuration</h3><p>For the simplicity of the CLI, and considering most of the APIs of each of the platforms do not allow or provide endpoints for user authentication, you will need to get your access tokens, API keys, or integration tokens from your own profile before using cross-post. This will just need to be done the first time or if you want to change the tokens.</p><p><strong>The tokens are all stored on your local machine.</strong></p><p>Here's a guide on how to do this for each of the platforms:</p><h3 id=\"dev-to\">dev.to</h3><p>After logging into your account on dev.to, click on your profile image and then click on Settings</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/dev-1.png\" class=\"kg-image\" alt=\"Settings\" loading=\"lazy\"></figure><p>Then, click on the Accounts tab in the sidebar</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/dev-2.png\" class=\"kg-image\" alt=\"Accounts\" loading=\"lazy\"></figure><p>Scroll down to the \"DEV Community API Keys\" section. You need to generate a new key. Enter \"Cross Post\" in the description text box or any name you want then click \"Generate API key\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/dev-3.png\" class=\"kg-image\" alt=\"Generate API Key\" loading=\"lazy\"></figure><p>Copy the generated API key, then in your terminal:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">cross-post config dev\n</code></pre></div><p>You'll be prompted to enter the API key. Paste the API key you copied earlier and hit enter. The API key will be saved.</p><h3 id=\"hashnode\">Hashnode</h3><p>After logging into your account on Hashnode, click on your profile image and then click on \"Account Settings\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-1.png\" class=\"kg-image\" alt=\"Settings\" loading=\"lazy\"></figure><p>In the sidebar click on \"Developer\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-2.png\" class=\"kg-image\" alt=\"Developer\" loading=\"lazy\"></figure><p>Click the \"Generate\" button and then copy the generated access token.</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-3.png\" class=\"kg-image\" alt=\"Generate\" loading=\"lazy\"></figure><p>Run the following in your terminal:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">cross-post config hashnode\n</code></pre></div><p>First, you'll be prompted to enter your access token. Then, you need to enter your Hashnode username. The reason behind that is that when later posting on hashnode your publication id is required, so your username will be used here to retrieve the publication id. Once you do and everything goes well, the configuration will be saved successfully.</p><h3 id=\"medium\">Medium</h3><p>After logging into Medium, click on your profile image and then click on \"Settings\"</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-1.png\" class=\"kg-image\" alt=\"Settings\" loading=\"lazy\"></figure><p>Then click on \"Integration Tokens\" in the sidebar</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-2.png\" class=\"kg-image\" alt=\"Integration Tokens\" loading=\"lazy\"></figure><p>You have to enter the description of the token then click \"Get integration token\" and copy the generated token.</p><figure class=\"kg-card kg-image-card\"><img src=\"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-3.png\" class=\"kg-image\" alt=\"Generate token\" loading=\"lazy\"></figure><p>In your terminal run:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">cross-post config medium\n</code></pre></div><p>Then enter the integration token you copied. A request will also be sent to Medium to get your authorId as it will be used later to post your article on Medium. Once that is done successfully, your configuration will be saved.</p><hr><h3 id=\"cross-posting-your-articles\">Cross-Posting Your Articles</h3><p>To cross-post your articles, you will use the following command:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">cross-post run &#x3C;url> [options]\n</code></pre></div><p>Where <code class=\"language-text\">url</code> is the URL of your article that you want to cross-post. <code class=\"language-text\">options</code> can be:</p><ol><li><code class=\"language-text\">-p, --platforms [platforms...]</code> The platform(s) you want to post the article on. By default, if this option is not included, it will be posted on all the platforms. An example of its usage:</li></ol><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">cross-post run &#x3C;url> -p dev hashnode\n</code></pre></div><ol><li><code class=\"language-text\">-t, --title [title]</code> The title by default will be taken from the URL you supplied, however, if you want to use a different title you can supply it in this option.</li><li><code class=\"language-text\">-s, --selector [selector]</code> by default, the <code class=\"language-text\">article</code> selector will be used to find your article in the URL you pass as an argument. However, if you need a different selector to be used to find the article, you can pass it here.</li></ol><p>This command will find the HTML element in the URL page you pass as an argument and if found, it will extract the title (if no title is passed in the arguments) and cover the image.</p><p>It should be noted that on all platforms the article will be posted as a draft, however, due to the limitations of the Hashnode API, it will be posted as \"hidden from Hashnode\" but it will be public in your publication.</p><p><strong>UPDATE:</strong> In the latest version of this library, you can now pass the option <code class=\"language-text\">-pu, --public</code> to publish the article publicly.</p><hr><h3 id=\"conclusion\">Conclusion</h3><p>If you find any bugs or have any ideas you would like to contribute, please do so on the issues tab in the <a href=\"https://github.com/shahednasser/cross-post\">GitHub Repository</a>!</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you own a blog like me, but also cross-post your articles on platforms like Dev, Hashnode, and Medium, it gets tedious to post your articles in different places."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, I created a simple CLI to cross-post my articles on these platforms easily. You can find it on "},{"type":"element","tagName":"a","properties":{"href":"https://www.npmjs.com/package/cross-post-blog"},"children":[{"type":"text","value":"NPM"}]},{"type":"text","value":" and check the code on "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post#readme"},"children":[{"type":"text","value":"GitHub"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"installation"},"children":[{"type":"text","value":"Installation"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In your terminal:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"npm i -g cross-post-blog\n"}]}]}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"usage"},"children":[{"type":"text","value":"Usage"}]},{"type":"element","tagName":"h3","properties":{"id":"set-configuration"},"children":[{"type":"text","value":"Set Configuration"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For the simplicity of the CLI, and considering most of the APIs of each of the platforms do not allow or provide endpoints for user authentication, you will need to get your access tokens, API keys, or integration tokens from your own profile before using cross-post. This will just need to be done the first time or if you want to change the tokens."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"The tokens are all stored on your local machine."}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Here's a guide on how to do this for each of the platforms:"}]},{"type":"element","tagName":"h3","properties":{"id":"dev-to"},"children":[{"type":"text","value":"dev.to"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After logging into your account on dev.to, click on your profile image and then click on Settings"}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/dev-1.png","className":["kg-image"],"alt":"Settings","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then, click on the Accounts tab in the sidebar"}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/dev-2.png","className":["kg-image"],"alt":"Accounts","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Scroll down to the \"DEV Community API Keys\" section. You need to generate a new key. Enter \"Cross Post\" in the description text box or any name you want then click \"Generate API key\""}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/dev-3.png","className":["kg-image"],"alt":"Generate API Key","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Copy the generated API key, then in your terminal:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"cross-post config dev\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You'll be prompted to enter the API key. Paste the API key you copied earlier and hit enter. The API key will be saved."}]},{"type":"element","tagName":"h3","properties":{"id":"hashnode"},"children":[{"type":"text","value":"Hashnode"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After logging into your account on Hashnode, click on your profile image and then click on \"Account Settings\""}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-1.png","className":["kg-image"],"alt":"Settings","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the sidebar click on \"Developer\""}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-2.png","className":["kg-image"],"alt":"Developer","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Click the \"Generate\" button and then copy the generated access token."}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/Hashnode-3.png","className":["kg-image"],"alt":"Generate","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Run the following in your terminal:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"cross-post config hashnode\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"First, you'll be prompted to enter your access token. Then, you need to enter your Hashnode username. The reason behind that is that when later posting on hashnode your publication id is required, so your username will be used here to retrieve the publication id. Once you do and everything goes well, the configuration will be saved successfully."}]},{"type":"element","tagName":"h3","properties":{"id":"medium"},"children":[{"type":"text","value":"Medium"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After logging into Medium, click on your profile image and then click on \"Settings\""}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-1.png","className":["kg-image"],"alt":"Settings","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then click on \"Integration Tokens\" in the sidebar"}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-2.png","className":["kg-image"],"alt":"Integration Tokens","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You have to enter the description of the token then click \"Get integration token\" and copy the generated token."}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://github.com/shahednasser/cross-post/raw/master/assets/Medium-3.png","className":["kg-image"],"alt":"Generate token","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In your terminal run:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"cross-post config medium\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Then enter the integration token you copied. A request will also be sent to Medium to get your authorId as it will be used later to post your article on Medium. Once that is done successfully, your configuration will be saved."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h3","properties":{"id":"cross-posting-your-articles"},"children":[{"type":"text","value":"Cross-Posting Your Articles"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To cross-post your articles, you will use the following command:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"cross-post run <url> [options]\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Where "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"url"}]},{"type":"text","value":" is the URL of your article that you want to cross-post. "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"options"}]},{"type":"text","value":" can be:"}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"-p, --platforms [platforms...]"}]},{"type":"text","value":" The platform(s) you want to post the article on. By default, if this option is not included, it will be posted on all the platforms. An example of its usage:"}]}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"text"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-text"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"cross-post run <url> -p dev hashnode\n"}]}]}]},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"-t, --title [title]"}]},{"type":"text","value":" The title by default will be taken from the URL you supplied, however, if you want to use a different title you can supply it in this option."}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"-s, --selector [selector]"}]},{"type":"text","value":" by default, the "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"article"}]},{"type":"text","value":" selector will be used to find your article in the URL you pass as an argument. However, if you need a different selector to be used to find the article, you can pass it here."}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This command will find the HTML element in the URL page you pass as an argument and if found, it will extract the title (if no title is passed in the arguments) and cover the image."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"It should be noted that on all platforms the article will be posted as a draft, however, due to the limitations of the Hashnode API, it will be posted as \"hidden from Hashnode\" but it will be public in your publication."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"UPDATE:"}]},{"type":"text","value":" In the latest version of this library, you can now pass the option "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"-pu, --public"}]},{"type":"text","value":" to publish the article publicly."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h3","properties":{"id":"conclusion"},"children":[{"type":"text","value":"Conclusion"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you find any bugs or have any ideas you would like to contribute, please do so on the issues tab in the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/cross-post"},"children":[{"type":"text","value":"GitHub Repository"}]},{"type":"text","value":"!"}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"installation","heading":"Installation"},{"id":"usage","heading":"Usage","items":[{"id":"set-configuration","heading":"Set Configuration"},{"id":"dev-to","heading":"dev.to"},{"id":"hashnode","heading":"Hashnode"},{"id":"medium","heading":"Medium"},{"id":"cross-posting-your-articles","heading":"Cross-Posting Your Articles"},{"id":"conclusion","heading":"Conclusion"}]}]},"featureImageSharp":{"base":"photo-1567361808960-dec9cb578182.jpg","publicURL":"/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/photo-1567361808960-dec9cb578182.jpg","imageMeta":{"width":2000,"height":1297},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAANABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAECAwT/xAAVAQEBAAAAAAAAAAAAAAAAAAABA//aAAwDAQACEAMQAAABvKeidEMT/8QAGhABAAMAAwAAAAAAAAAAAAAAAgABERIiQv/aAAgBAQABBQInYi8s1o7T1R5V/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwE//8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwE//8QAGxAAAgIDAQAAAAAAAAAAAAAAABEBAiExMoH/2gAIAQEABj8CdcHSyzlkWk9Nn//EAB0QAQADAAIDAQAAAAAAAAAAAAEAESExUUFxobH/2gAIAQEAAT8h6K5pj6lwsedj9Fe6h0G8o6IfsfJSqh4yf//aAAwDAQACAAMAAAAQGN//xAAXEQADAQAAAAAAAAAAAAAAAAAAASER/9oACAEDAQE/EHrrKf/EABcRAAMBAAAAAAAAAAAAAAAAAAEQITH/2gAIAQIBAT8QExf/xAAeEAEBAAMAAQUAAAAAAAAAAAABEQAhMdFBYYGh8P/aAAgBAQABPxCHYxoiodt5d7xcBgqweDcRJLSuj935za4oJhY17+mJYfFcSNhVdjL9Z//Z","aspectRatio":1.5486725663716814,"src":"/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/ea4ab/photo-1567361808960-dec9cb578182.jpg","srcSet":"/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/477ba/photo-1567361808960-dec9cb578182.jpg 175w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/06776/photo-1567361808960-dec9cb578182.jpg 350w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/ea4ab/photo-1567361808960-dec9cb578182.jpg 700w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/3055e/photo-1567361808960-dec9cb578182.jpg 1050w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/eff08/photo-1567361808960-dec9cb578182.jpg 1400w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/4e5f3/photo-1567361808960-dec9cb578182.jpg 2000w","srcWebp":"/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/89afa/photo-1567361808960-dec9cb578182.webp","srcSetWebp":"/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/9fca7/photo-1567361808960-dec9cb578182.webp 175w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/37a4e/photo-1567361808960-dec9cb578182.webp 350w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/89afa/photo-1567361808960-dec9cb578182.webp 700w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/78e7a/photo-1567361808960-dec9cb578182.webp 1050w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/03d34/photo-1567361808960-dec9cb578182.webp 1400w,\n/static/8aed5b6ee3f2e7aeb2f33a45ecfe6595/49d6b/photo-1567361808960-dec9cb578182.webp 2000w","sizes":"(max-width: 700px) 100vw, 700px"}}}}},{"node":{"id":"Ghost__Post__6127ba1b3ed159214d382e93","title":"use-dark-mode-hook: A Simple Library To Add Dark Mode to Your React Project","slug":"use-dark-mode-hook-a-simple-library","featured":false,"feature_image":"https://res-1.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/photo-1607027340685-3e1ae9a54a93.jpg","excerpt":"use-dark-mode-hook is a simple library that allows you to easily add dark mode to your React projects.","custom_excerpt":"use-dark-mode-hook is a simple library that allows you to easily add dark mode to your React projects.","visibility":"public","created_at_pretty":"5 Mar 2021","published_at_pretty":"5 Mar 2021","updated_at_pretty":"26 Aug 2021","created_at":"2021-03-05T17:44:04.000+00:00","published_at":"2021-03-05T20:08:19.000+00:00","updated_at":"2021-08-26T17:44:38.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":null}],"primary_author":{"slug":"shahed","url":"https://backend.shahednasser.com/author/shahed/","name":"Shahed Nasser","bio":null,"cover_image":null,"profile_image":"https://backend.shahednasser.com/content/images/2022/03/IMG_0591.jpg","location":null,"website":null,"twitter":null,"facebook":null,"meta_title":null,"meta_description":null,"coverImageSharp":null,"profileImageSharp":{"base":"IMG_0591.jpg","publicURL":"/static/ceb49c3c631485453e71e00d7f84b069/IMG_0591.jpg","imageMeta":{"width":1182,"height":1179},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAUABQDASIAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMEAQL/xAAWAQEBAQAAAAAAAAAAAAAAAAADBAL/2gAMAwEAAhADEAAAAdXiFM6i0CohUWXoKn//xAAcEAACAgIDAAAAAAAAAAAAAAACAwESBBEhM0H/2gAIAQEAAQUCWySE3WEr7SzbXjAj4iKty+sOQ//EABYRAQEBAAAAAAAAAAAAAAAAAAERIP/aAAgBAwEBPwEhj//EABQRAQAAAAAAAAAAAAAAAAAAACD/2gAIAQIBAT8BH//EAB4QAAIBBAMBAAAAAAAAAAAAAAABIRESMUECECJx/9oACAEBAAY/ApVGWvOjzgtUwLlTZA0sdL4f/8QAHBAAAwACAwEAAAAAAAAAAAAAAAERITFBkbHB/9oACAEBAAE/IahkCy+N2GwZpjQiJHJCspUFY0QrSi+HqiW2rgf/2gAMAwEAAgADAAAAEPw3/wD/xAAYEQEBAAMAAAAAAAAAAAAAAAAAARExQf/aAAgBAwEBPxCtjDqP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQAxEf/aAAgBAgEBPxBFus6Tt//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQWFRcYGR0f/aAAgBAQABPxAuaBPPzkO1wyX7F4wkwXanfZrFQgeqE9JgS14vVOvrERIJomVBKwt2jebAeP0yVa8h1n//2Q==","aspectRatio":1,"src":"/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg","srcSet":"/static/ceb49c3c631485453e71e00d7f84b069/f340b/IMG_0591.jpg 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/22d64/IMG_0591.jpg 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/31709/IMG_0591.jpg 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/aa249/IMG_0591.jpg 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/0dc33/IMG_0591.jpg 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/d8257/IMG_0591.jpg 1182w","srcWebp":"/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp","srcSetWebp":"/static/ceb49c3c631485453e71e00d7f84b069/59cda/IMG_0591.webp 28w,\n/static/ceb49c3c631485453e71e00d7f84b069/7da75/IMG_0591.webp 55w,\n/static/ceb49c3c631485453e71e00d7f84b069/8678c/IMG_0591.webp 110w,\n/static/ceb49c3c631485453e71e00d7f84b069/f282e/IMG_0591.webp 165w,\n/static/ceb49c3c631485453e71e00d7f84b069/a7b21/IMG_0591.webp 220w,\n/static/ceb49c3c631485453e71e00d7f84b069/63099/IMG_0591.webp 1182w","sizes":"(max-width: 110px) 100vw, 110px"}}}},"primary_tag":{"slug":"open-source","url":"https://backend.shahednasser.com/tag/open-source/","name":"Open Source","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},"tags":[{"slug":"open-source","url":"https://backend.shahednasser.com/tag/open-source/","name":"Open Source","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null},{"slug":"projects","url":"https://backend.shahednasser.com/tag/projects/","name":"Projects","visibility":"public","feature_image":null,"description":null,"meta_title":null,"meta_description":null,"featureImageSharp":null}],"plaintext":"I have created a new library called use-dark-mode-hook\n[https://www.npmjs.com/package/use-dark-mode-hook]. It's a simple library that\nallows you to easily add dark mode to your React projects.\n\nThis library provides a custom hook useDarkMode and a button toggler component \nDarkModeToggler. You can use them together or separately. However, this library\ndoes not provide any styling regarding dark and light modes. You have to do that\nyourself.\n\n\n--------------------------------------------------------------------------------\n\nPurpose\nAs I was trying to add Dark mode in my react project, I noticed that there are\npackages out there that do provide this, however, either they don't work with\nthe latest React version or they only provide the functionality or UI. Thus, I\ndecided to create a simple hook that adds the dark mode functionality to the\nwebsite, and a component that provides a toggling button.\n\n\n--------------------------------------------------------------------------------\n\nInstallation\nTo install the package:\n\nnpm i use-dark-mode-hook\n\n\n--------------------------------------------------------------------------------\n\nUsage\nuseDarkMode + DarkModeToggler\nTo use both the functionality and UI (more details about the options of each in\nbelow sections):\n\nimport useDarkMode, { DarkModeToggler } from 'use-dark-mode-hook'\n\nfunction MyComponent () {\n    const [isDarkMode, toggleDarkMode] = useDarkMode()\n\n    return (\n        <DarkModeToggler \n            isDarkMode={isDarkMode} \n            toggleDarkMode={toggleDarkMode}\n            buttonClassName=\"some-classes\"\n        />\n    )\n}\n\nThat's it! useDarkMode will manage the state and logic while DarkModeToggler \nprovides a toggle button for the user to toggle dark mode.\n\nBy default, useDarkMode will apply either dark or light class to the body of the\ndocument based on the choice of the user. You can change the names of the\nclasses by passing darkModeClass and lightModeClass to useDarkMode, and change\nthe element the class will be applied to by passing its selector in element to \nuseDarkMode. You can check out the all the options here\n[https://github.com/shahednasser/use-dark-mode-hook#options].\n\nuseDarkMode hook\nYou can use the hook separately with your own toggler:\n\nimport useDarkMode from 'use-dark-mode-hook'\n\nfunction myComponent (props) {\n    const [isDarkMode, toggleDarkMode] = useDarkMode()\n\n    //do something with it\n}\n\nYou'll have to use isDarkMode as the current state of dark mode, and \ntoggleDarkMode to toggle dark mode. toggleDarkMode takes a boolean specifying\nwhether dark mode is enabled or disabled.\n\nDarkModeToggler\nYou can use the toggler separately with your own logic:\n\nimport { DarkModeToggler } from 'use-dark-mode-hook'\n\nfunction MyComponent () {\n    //some code\n\n    function toggleDarkMode (checked) {\n        //logic to toggle dark mode\n    }\n\n    return (\n        <DarkModeToggler isDarkMode={value} toggleDarkMode={toggleDarkMode} />\n    )\n}\n\nFor isDarkMode you have to pass the current value of whether dark mode is\nenabled or not, and for toggleDarkMode it should be a function that takes a\nboolean for whether dark mode is enabled or not.\n\n\n--------------------------------------------------------------------------------\n\nContribution\nIf you find any issues or bugs, or would like to contribute to this library,\nplease check out the GitHub repository\n[https://github.com/shahednasser/use-dark-mode-hook].","html":"<p>I have created a new library called <a href=\"https://www.npmjs.com/package/use-dark-mode-hook\">use-dark-mode-hook</a>. It's a simple library that allows you to easily add dark mode to your React projects.</p><p>This library provides a custom hook <code>useDarkMode</code> and a button toggler component <code>DarkModeToggler</code>. You can use them together or separately. However, this library does <strong>not</strong> provide any styling regarding dark and light modes. You have to do that yourself.</p><hr><h3 id=\"purpose\">Purpose</h3><p>As I was trying to add Dark mode in my react project, I noticed that there are packages out there that do provide this, however, either they don't work with the latest React version or they only provide the functionality or UI. Thus, I decided to create a simple hook that adds the dark mode functionality to the website, and a component that provides a toggling button.</p><hr><h3 id=\"installation\">Installation</h3><p>To install the package:</p><pre><code class=\"language-shell\">npm i use-dark-mode-hook</code></pre><hr><h2 id=\"usage\">Usage</h2><h3 id=\"usedarkmode-darkmodetoggler\">useDarkMode + DarkModeToggler</h3><p>To use both the functionality and UI (more details about the options of each in below sections):</p><pre><code class=\"language-javascript\">import useDarkMode, { DarkModeToggler } from 'use-dark-mode-hook'\n\nfunction MyComponent () {\n    const [isDarkMode, toggleDarkMode] = useDarkMode()\n\n    return (\n        &lt;DarkModeToggler \n            isDarkMode={isDarkMode} \n            toggleDarkMode={toggleDarkMode}\n            buttonClassName=\"some-classes\"\n        /&gt;\n    )\n}</code></pre><p>That's it! <code>useDarkMode</code> will manage the state and logic while <code>DarkModeToggler</code> provides a toggle button for the user to toggle dark mode.</p><figure class=\"kg-card kg-image-card\"><img src=\"https://res-5.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/demo.gif\" class=\"kg-image\" alt loading=\"lazy\"></figure><p>By default, <code>useDarkMode</code> will apply either <code>dark</code> or <code>light</code> class to the <code>body</code> of the document based on the choice of the user. You can change the names of the classes by passing <code>darkModeClass</code> and <code>lightModeClass</code> to <code>useDarkMode</code>, and change the element the class will be applied to by passing its selector in <code>element</code> to <code>useDarkMode</code>. You can check out the all the options <a href=\"https://github.com/shahednasser/use-dark-mode-hook#options\">here</a>.</p><h3 id=\"usedarkmode-hook\">useDarkMode hook</h3><p>You can use the hook separately with your own toggler:</p><pre><code class=\"language-javascript\">import useDarkMode from 'use-dark-mode-hook'\n\nfunction myComponent (props) {\n    const [isDarkMode, toggleDarkMode] = useDarkMode()\n\n    //do something with it\n}</code></pre><p>You'll have to use <code>isDarkMode</code> as the current state of dark mode, and <code>toggleDarkMode</code> to toggle dark mode. <code>toggleDarkMode</code> takes a boolean specifying whether dark mode is enabled or disabled.</p><h3 id=\"darkmodetoggler\">DarkModeToggler</h3><p>You can use the toggler separately with your own logic:</p><pre><code class=\"language-javascript\">import { DarkModeToggler } from 'use-dark-mode-hook'\n\nfunction MyComponent () {\n    //some code\n\n    function toggleDarkMode (checked) {\n        //logic to toggle dark mode\n    }\n\n    return (\n        &lt;DarkModeToggler isDarkMode={value} toggleDarkMode={toggleDarkMode} /&gt;\n    )\n}</code></pre><p>For <code>isDarkMode</code> you have to pass the current value of whether dark mode is enabled or not, and for <code>toggleDarkMode</code> it should be a function that takes a boolean for whether dark mode is enabled or not.</p><hr><h3 id=\"contribution\">Contribution</h3><p>If you find any issues or bugs, or would like to contribute to this library, please check out the <a href=\"https://github.com/shahednasser/use-dark-mode-hook\">GitHub repository</a>.</p>","url":"https://backend.shahednasser.com/use-dark-mode-hook-a-simple-library/","canonical_url":null,"uuid":"15e5e947-5963-434e-be89-f9c5b492259c","codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"60426de4996660001e874264","reading_time":2,"send_email_when_published":null,"email_subject":null,"childHtmlRehype":{"html":"<p>I have created a new library called <a href=\"https://www.npmjs.com/package/use-dark-mode-hook\">use-dark-mode-hook</a>. It's a simple library that allows you to easily add dark mode to your React projects.</p><p>This library provides a custom hook <code class=\"language-text\">useDarkMode</code> and a button toggler component <code class=\"language-text\">DarkModeToggler</code>. You can use them together or separately. However, this library does <strong>not</strong> provide any styling regarding dark and light modes. You have to do that yourself.</p><hr><h3 id=\"purpose\">Purpose</h3><p>As I was trying to add Dark mode in my react project, I noticed that there are packages out there that do provide this, however, either they don't work with the latest React version or they only provide the functionality or UI. Thus, I decided to create a simple hook that adds the dark mode functionality to the website, and a component that provides a toggling button.</p><hr><h3 id=\"installation\">Installation</h3><p>To install the package:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"shell\"><pre class=\"language-shell\"><code class=\"language-shell\"><span class=\"token function\">npm</span> i use-dark-mode-hook</code></pre></div><hr><h2 id=\"usage\">Usage</h2><h3 id=\"usedarkmode-darkmodetoggler\">useDarkMode + DarkModeToggler</h3><p>To use both the functionality and UI (more details about the options of each in below sections):</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">import</span> useDarkMode<span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span> DarkModeToggler <span class=\"token punctuation\">}</span> <span class=\"token keyword\">from</span> <span class=\"token string\">'use-dark-mode-hook'</span>\n\n<span class=\"token keyword\">function</span> <span class=\"token function\">MyComponent</span> <span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token keyword\">const</span> <span class=\"token punctuation\">[</span>isDarkMode<span class=\"token punctuation\">,</span> toggleDarkMode<span class=\"token punctuation\">]</span> <span class=\"token operator\">=</span> <span class=\"token function\">useDarkMode</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n\n    <span class=\"token keyword\">return</span> <span class=\"token punctuation\">(</span>\n        <span class=\"token operator\">&#x3C;</span>DarkModeToggler \n            isDarkMode<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>isDarkMode<span class=\"token punctuation\">}</span> \n            toggleDarkMode<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>toggleDarkMode<span class=\"token punctuation\">}</span>\n            buttonClassName<span class=\"token operator\">=</span><span class=\"token string\">\"some-classes\"</span>\n        <span class=\"token operator\">/</span><span class=\"token operator\">></span>\n    <span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span></code></pre></div><p>That's it! <code class=\"language-text\">useDarkMode</code> will manage the state and logic while <code class=\"language-text\">DarkModeToggler</code> provides a toggle button for the user to toggle dark mode.</p><figure class=\"kg-card kg-image-card\"><img src=\"https://res-5.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/demo.gif\" class=\"kg-image\" alt=\"\" loading=\"lazy\"></figure><p>By default, <code class=\"language-text\">useDarkMode</code> will apply either <code class=\"language-text\">dark</code> or <code class=\"language-text\">light</code> class to the <code class=\"language-text\">body</code> of the document based on the choice of the user. You can change the names of the classes by passing <code class=\"language-text\">darkModeClass</code> and <code class=\"language-text\">lightModeClass</code> to <code class=\"language-text\">useDarkMode</code>, and change the element the class will be applied to by passing its selector in <code class=\"language-text\">element</code> to <code class=\"language-text\">useDarkMode</code>. You can check out the all the options <a href=\"https://github.com/shahednasser/use-dark-mode-hook#options\">here</a>.</p><h3 id=\"usedarkmode-hook\">useDarkMode hook</h3><p>You can use the hook separately with your own toggler:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">import</span> useDarkMode <span class=\"token keyword\">from</span> <span class=\"token string\">'use-dark-mode-hook'</span>\n\n<span class=\"token keyword\">function</span> <span class=\"token function\">myComponent</span> <span class=\"token punctuation\">(</span><span class=\"token parameter\">props</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token keyword\">const</span> <span class=\"token punctuation\">[</span>isDarkMode<span class=\"token punctuation\">,</span> toggleDarkMode<span class=\"token punctuation\">]</span> <span class=\"token operator\">=</span> <span class=\"token function\">useDarkMode</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\n\n    <span class=\"token comment\">//do something with it</span>\n<span class=\"token punctuation\">}</span></code></pre></div><p>You'll have to use <code class=\"language-text\">isDarkMode</code> as the current state of dark mode, and <code class=\"language-text\">toggleDarkMode</code> to toggle dark mode. <code class=\"language-text\">toggleDarkMode</code> takes a boolean specifying whether dark mode is enabled or disabled.</p><h3 id=\"darkmodetoggler\">DarkModeToggler</h3><p>You can use the toggler separately with your own logic:</p><div class=\"kg-card kg-code-card gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">import</span> <span class=\"token punctuation\">{</span> DarkModeToggler <span class=\"token punctuation\">}</span> <span class=\"token keyword\">from</span> <span class=\"token string\">'use-dark-mode-hook'</span>\n\n<span class=\"token keyword\">function</span> <span class=\"token function\">MyComponent</span> <span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token comment\">//some code</span>\n\n    <span class=\"token keyword\">function</span> <span class=\"token function\">toggleDarkMode</span> <span class=\"token punctuation\">(</span><span class=\"token parameter\">checked</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n        <span class=\"token comment\">//logic to toggle dark mode</span>\n    <span class=\"token punctuation\">}</span>\n\n    <span class=\"token keyword\">return</span> <span class=\"token punctuation\">(</span>\n        <span class=\"token operator\">&#x3C;</span>DarkModeToggler isDarkMode<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>value<span class=\"token punctuation\">}</span> toggleDarkMode<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>toggleDarkMode<span class=\"token punctuation\">}</span> <span class=\"token operator\">/</span><span class=\"token operator\">></span>\n    <span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span></code></pre></div><p>For <code class=\"language-text\">isDarkMode</code> you have to pass the current value of whether dark mode is enabled or not, and for <code class=\"language-text\">toggleDarkMode</code> it should be a function that takes a boolean for whether dark mode is enabled or not.</p><hr><h3 id=\"contribution\">Contribution</h3><p>If you find any issues or bugs, or would like to contribute to this library, please check out the <a href=\"https://github.com/shahednasser/use-dark-mode-hook\">GitHub repository</a>.</p>","htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I have created a new library called "},{"type":"element","tagName":"a","properties":{"href":"https://www.npmjs.com/package/use-dark-mode-hook"},"children":[{"type":"text","value":"use-dark-mode-hook"}]},{"type":"text","value":". It's a simple library that allows you to easily add dark mode to your React projects."}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This library provides a custom hook "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"useDarkMode"}]},{"type":"text","value":" and a button toggler component "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"DarkModeToggler"}]},{"type":"text","value":". You can use them together or separately. However, this library does "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"not"}]},{"type":"text","value":" provide any styling regarding dark and light modes. You have to do that yourself."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h3","properties":{"id":"purpose"},"children":[{"type":"text","value":"Purpose"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"As I was trying to add Dark mode in my react project, I noticed that there are packages out there that do provide this, however, either they don't work with the latest React version or they only provide the functionality or UI. Thus, I decided to create a simple hook that adds the dark mode functionality to the website, and a component that provides a toggling button."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h3","properties":{"id":"installation"},"children":[{"type":"text","value":"Installation"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To install the package:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"shell"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-shell"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-shell"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"npm"}]},{"type":"text","value":" i use-dark-mode-hook"}]}]}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h2","properties":{"id":"usage"},"children":[{"type":"text","value":"Usage"}]},{"type":"element","tagName":"h3","properties":{"id":"usedarkmode-darkmodetoggler"},"children":[{"type":"text","value":"useDarkMode + DarkModeToggler"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To use both the functionality and UI (more details about the options of each in below sections):"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"javascript"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-javascript"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-javascript"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" useDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":" DarkModeToggler "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"'use-dark-mode-hook'"}]},{"type":"text","value":"\n\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"function"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"MyComponent"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"const"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"["}]},{"type":"text","value":"isDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" toggleDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"useDarkMode"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n\n    "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"return"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"\n        "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"DarkModeToggler \n            isDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"isDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":" \n            toggleDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"toggleDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"\n            buttonClassName"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"\"some-classes\""}]},{"type":"text","value":"\n        "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":">"}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"That's it! "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"useDarkMode"}]},{"type":"text","value":" will manage the state and logic while "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"DarkModeToggler"}]},{"type":"text","value":" provides a toggle button for the user to toggle dark mode."}]},{"type":"element","tagName":"figure","properties":{"className":["kg-card","kg-image-card"]},"children":[{"type":"element","tagName":"img","properties":{"src":"https://res-5.cloudinary.com/hbqmf3mbz/image/upload/q_auto/v1/ghost-blog-images/demo.gif","className":["kg-image"],"alt":"","loading":"lazy"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"By default, "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"useDarkMode"}]},{"type":"text","value":" will apply either "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"dark"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"light"}]},{"type":"text","value":" class to the "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"body"}]},{"type":"text","value":" of the document based on the choice of the user. You can change the names of the classes by passing "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"darkModeClass"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"lightModeClass"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"useDarkMode"}]},{"type":"text","value":", and change the element the class will be applied to by passing its selector in "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"element"}]},{"type":"text","value":" to "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"useDarkMode"}]},{"type":"text","value":". You can check out the all the options "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/use-dark-mode-hook#options"},"children":[{"type":"text","value":"here"}]},{"type":"text","value":"."}]},{"type":"element","tagName":"h3","properties":{"id":"usedarkmode-hook"},"children":[{"type":"text","value":"useDarkMode hook"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can use the hook separately with your own toggler:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"javascript"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-javascript"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-javascript"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" useDarkMode "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"'use-dark-mode-hook'"}]},{"type":"text","value":"\n\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"function"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"myComponent"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","parameter"]},"children":[{"type":"text","value":"props"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"const"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"["}]},{"type":"text","value":"isDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":","}]},{"type":"text","value":" toggleDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"]"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"useDarkMode"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n\n    "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"//do something with it"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You'll have to use "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"isDarkMode"}]},{"type":"text","value":" as the current state of dark mode, and "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"toggleDarkMode"}]},{"type":"text","value":" to toggle dark mode. "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"toggleDarkMode"}]},{"type":"text","value":" takes a boolean specifying whether dark mode is enabled or disabled."}]},{"type":"element","tagName":"h3","properties":{"id":"darkmodetoggler"},"children":[{"type":"text","value":"DarkModeToggler"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can use the toggler separately with your own logic:"}]},{"type":"element","tagName":"div","properties":{"className":["kg-card","kg-code-card","gatsby-highlight"],"dataLanguage":"javascript"},"children":[{"type":"element","tagName":"pre","properties":{"className":["language-javascript"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-javascript"]},"children":[{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"import"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":" DarkModeToggler "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"from"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","string"]},"children":[{"type":"text","value":"'use-dark-mode-hook'"}]},{"type":"text","value":"\n\n"},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"function"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"MyComponent"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"//some code"}]},{"type":"text","value":"\n\n    "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"function"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","function"]},"children":[{"type":"text","value":"toggleDarkMode"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"element","tagName":"span","properties":{"className":["token","parameter"]},"children":[{"type":"text","value":"checked"}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"\n        "},{"type":"element","tagName":"span","properties":{"className":["token","comment"]},"children":[{"type":"text","value":"//logic to toggle dark mode"}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":"\n\n    "},{"type":"element","tagName":"span","properties":{"className":["token","keyword"]},"children":[{"type":"text","value":"return"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"("}]},{"type":"text","value":"\n        "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"<"}]},{"type":"text","value":"DarkModeToggler isDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"value"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":" toggleDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"="}]},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"{"}]},{"type":"text","value":"toggleDarkMode"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]},{"type":"text","value":" "},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":"/"}]},{"type":"element","tagName":"span","properties":{"className":["token","operator"]},"children":[{"type":"text","value":">"}]},{"type":"text","value":"\n    "},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":")"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"span","properties":{"className":["token","punctuation"]},"children":[{"type":"text","value":"}"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"isDarkMode"}]},{"type":"text","value":" you have to pass the current value of whether dark mode is enabled or not, and for "},{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"toggleDarkMode"}]},{"type":"text","value":" it should be a function that takes a boolean for whether dark mode is enabled or not."}]},{"type":"element","tagName":"hr","properties":{},"children":[]},{"type":"element","tagName":"h3","properties":{"id":"contribution"},"children":[{"type":"text","value":"Contribution"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"If you find any issues or bugs, or would like to contribute to this library, please check out the "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/shahednasser/use-dark-mode-hook"},"children":[{"type":"text","value":"GitHub repository"}]},{"type":"text","value":"."}]}],"data":{"quirksMode":false}},"tableOfContents":[{"id":"purpose","heading":"Purpose"},{"id":"installation","heading":"Installation"},{"id":"usage","heading":"Usage","items":[{"id":"usedarkmode-darkmodetoggler","heading":"useDarkMode + DarkModeToggler"},{"id":"usedarkmode-hook","heading":"useDarkMode hook"},{"id":"darkmodetoggler","heading":"DarkModeToggler"},{"id":"contribution","heading":"Contribution"}]}]},"featureImageSharp":{"base":"photo-1607027340685-3e1ae9a54a93.jpg","publicURL":"/static/a31f23226ff9e49e40d6b5dd3887a562/photo-1607027340685-3e1ae9a54a93.jpg","imageMeta":{"width":2000,"height":1502},"childImageSharp":{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAPABQDASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAAECBf/EABQBAQAAAAAAAAAAAAAAAAAAAAH/2gAMAwEAAhADEAAAAcK5Q0IH/8QAFhABAQEAAAAAAAAAAAAAAAAAEQAQ/9oACAEBAAEFAsIxv//EABYRAQEBAAAAAAAAAAAAAAAAAAARIf/aAAgBAwEBPwGsf//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAECAQE/AYf/xAAWEAEBAQAAAAAAAAAAAAAAAAAQASH/2gAIAQEABj8Cdr//xAAaEAACAgMAAAAAAAAAAAAAAAAAAREhEFGx/9oACAEBAAE/IUIaNihw2TdYf//aAAwDAQACAAMAAAAQ8x//xAAVEQEBAAAAAAAAAAAAAAAAAAABEP/aAAgBAwEBPxAh/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAEh/9oACAECAQE/EKa//8QAGhABAAIDAQAAAAAAAAAAAAAAAQARITFBUf/aAAgBAQABPxAYiCXioGQHlF2ib6HJef/Z","aspectRatio":1.3358778625954197,"src":"/static/a31f23226ff9e49e40d6b5dd3887a562/ea4ab/photo-1607027340685-3e1ae9a54a93.jpg","srcSet":"/static/a31f23226ff9e49e40d6b5dd3887a562/477ba/photo-1607027340685-3e1ae9a54a93.jpg 175w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/06776/photo-1607027340685-3e1ae9a54a93.jpg 350w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/ea4ab/photo-1607027340685-3e1ae9a54a93.jpg 700w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/3055e/photo-1607027340685-3e1ae9a54a93.jpg 1050w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/eff08/photo-1607027340685-3e1ae9a54a93.jpg 1400w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/4e5f3/photo-1607027340685-3e1ae9a54a93.jpg 2000w","srcWebp":"/static/a31f23226ff9e49e40d6b5dd3887a562/89afa/photo-1607027340685-3e1ae9a54a93.webp","srcSetWebp":"/static/a31f23226ff9e49e40d6b5dd3887a562/9fca7/photo-1607027340685-3e1ae9a54a93.webp 175w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/37a4e/photo-1607027340685-3e1ae9a54a93.webp 350w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/89afa/photo-1607027340685-3e1ae9a54a93.webp 700w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/78e7a/photo-1607027340685-3e1ae9a54a93.webp 1050w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/03d34/photo-1607027340685-3e1ae9a54a93.webp 1400w,\n/static/a31f23226ff9e49e40d6b5dd3887a562/49d6b/photo-1607027340685-3e1ae9a54a93.webp 2000w","sizes":"(max-width: 700px) 100vw, 700px"}}}}}]}},"pageContext":{"slug":"quran-in-new-tab-chrome-extension","prev":"tips-for-magento-2-layouts","next":"best-websites-to-find-free-resources-for-frontend-web-developers-and-designers","tag":"projects","limit":3,"skip":0,"primaryTagCount":7,"collectionPaths":{}}},"staticQueryHashes":["1272700106","1676991999","2138873178","2546165603","2681841279","2938721187","293880488","3052966952","4156497161"]}