<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AW A RE </title>
    <description>The latest articles on DEV Community by AW A RE  (@mefaba).</description>
    <link>https://dev.to/mefaba</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F356715%2Ff889050e-3aee-4eb4-9923-f5992dc7e2a3.png</url>
      <title>DEV Community: AW A RE </title>
      <link>https://dev.to/mefaba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mefaba"/>
    <language>en</language>
    <item>
      <title>Installing WSL on another drive in Windows</title>
      <dc:creator>AW A RE </dc:creator>
      <pubDate>Mon, 09 May 2022 13:56:10 +0000</pubDate>
      <link>https://dev.to/mefaba/installing-wsl-on-another-drive-in-windows-5c4a</link>
      <guid>https://dev.to/mefaba/installing-wsl-on-another-drive-in-windows-5c4a</guid>
      <description>&lt;p&gt;The only way to do that is to move the linux distrubition you installed on wsl. I installed Ubuntu on windows as wsl and I showed how to move it step by step.&lt;/p&gt;

&lt;p&gt;1.Check WSL 2 installations that are already installed in your computer.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wsl --list -v&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If the installation you want to move to another drive is still running we have to stop it with following command. In my case, I want to move Ubuntu, so I am terminating Ubuntu.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wsl -t Ubuntu&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2.Export to a folder. (Here exporting &lt;em&gt;Ubuntu&lt;/em&gt; as &lt;em&gt;ubuntu-ex.tar&lt;/em&gt; to D:\wsl\wsl_export)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;wsl --export Ubuntu "D:\wsl_export\ubuntu-ex.tar"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;3.Unregister previous WSL installation. When you unregister it will remove Ubuntu from the wsl2 list that we saw earlier. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;wsl --unregister Ubuntu&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;4.import your WSL installation to a folder. This step also re-registers the ubuntu.&lt;br&gt;
&lt;code&gt;wsl --import Ubuntu "D:\wsl_import\ubuntu" "D:\wsl_export\ubuntu-ex.tar"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here’s a breakdown of the command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;wsl --import&lt;/code&gt;: The base command to import a new Linux distribution.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ubuntu&lt;/code&gt;: The name you are giving to the new imported distribution.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;D:\wsl_import\ubuntu&lt;/code&gt;: The directory where the new distribution will be stored.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;D:\wsl_export\ubuntu-ex.tar&lt;/code&gt;: The tar file containing the exported distribution that you want to import.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>wsl</category>
      <category>docker</category>
    </item>
    <item>
      <title>First Glance: Lottie Animations</title>
      <dc:creator>AW A RE </dc:creator>
      <pubDate>Tue, 04 Jan 2022 18:26:58 +0000</pubDate>
      <link>https://dev.to/mefaba/first-glance-lottie-animations-20l5</link>
      <guid>https://dev.to/mefaba/first-glance-lottie-animations-20l5</guid>
      <description>&lt;p&gt;The first time I heard lottie animations, I googled it and landed lottiefiles.com. It was unfortunate to land lottiefiles.com, because I missed understanding the whole concept of lottie animations. I thought lottie animations bound to lottiefiles.com but in reality, it was not. Lottiefiles.com is only a showroom, library, and gathering point for designers and developers. The main lottie animations is lottie by airbnb. &lt;a href="https://airbnb.design/lottie/"&gt;https://airbnb.design/lottie/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lottie has basicly two step. Firstly it enables you to convert after effect animations to json with custom after effects plugin(bodymovin). Secondly you can render that json file on web with importing lottie.js. I guess it is better to stick with svg and key frame animations to have best outcome and file size.&lt;/p&gt;

&lt;p&gt;Use recent versions of Adobe AfterEffects because running plugins in older versions causes problems like blank window. Also, while learning you might want to look into other people's projects, maybe by downloading AE project files from lottiefiles.com. But older versions of After Effects do not open projects files of newer versions. And there is no other way around it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building WSL2 Environment for Web Development</title>
      <dc:creator>AW A RE </dc:creator>
      <pubDate>Sun, 27 Jun 2021 04:07:28 +0000</pubDate>
      <link>https://dev.to/mefaba/building-wsl2-environment-for-web-development-3ggc</link>
      <guid>https://dev.to/mefaba/building-wsl2-environment-for-web-development-3ggc</guid>
      <description>&lt;p&gt;This article will not cover all details about every bit. I just want to give what steps needs to be done for building a wsl2 environment. Therefore I can also come back to this article and do things again.&lt;br&gt;
1)Install WSL2(windows subsystem linux) on your windows.&lt;br&gt;
google&amp;gt;&amp;gt; install wsl2&lt;/p&gt;

&lt;p&gt;2)Install Ubuntu on top of WSL2 environment.&lt;br&gt;
google&amp;gt;&amp;gt; install ubuntu wsl&lt;/p&gt;

&lt;p&gt;3)Install node for ubuntu.&lt;br&gt;
google&amp;gt;&amp;gt; install nodejs linux&lt;/p&gt;

&lt;p&gt;4)Install git for ubuntu&lt;br&gt;
google&amp;gt;&amp;gt;install git wsl&lt;br&gt;
source: &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-git"&gt;https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-git&lt;/a&gt;&lt;br&gt;
bash&amp;gt;&amp;gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"youremail@email.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5)Install vscode wsl extensions pack. We will use wsl: remote out of that bunch of extensions..&lt;br&gt;
At this point, when you want to open a folder in WSL you can type &lt;code&gt;Remote-WSL: Open Folder in WSL&lt;/code&gt; from vscode-command-line-palette(crtrl+shift+P or settings&amp;gt;commandline palette)&lt;/p&gt;

&lt;p&gt;6)How to see folders and files inside wsl without using command line. This will be usefull to reach out your project files easily and it will also allow us open our projects on &lt;strong&gt;github destkop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;try to go following path in normal windows folder &lt;code&gt;\\wsl$&lt;/code&gt; &amp;gt; You will see Ubuntu Folder &amp;gt;Right click on Ubuntu folder icon &amp;gt; Select Map network drive (Z:) &amp;gt; Now Z: can be used as other partition/drive&lt;/p&gt;

&lt;p&gt;Now Ubuntu is visible on drive. So you can easily look up for your files and also open folders in github destkop. &lt;/p&gt;

&lt;p&gt;7)Now you can serve your website as you used to. If for example you served your files with &lt;code&gt;npm start&lt;/code&gt; successfully but there is no signs of life at localhost. Try this. Create .wslconfig file in C:/Users/&amp;lt;username&amp;gt;/.wslconfig&lt;/p&gt;

&lt;p&gt;Inside .wslconfig, write following lines and save it:&lt;/p&gt;

&lt;p&gt;[wsl2]&lt;/p&gt;

&lt;p&gt;localhostForwarding=true&lt;/p&gt;

&lt;p&gt;Then open command line windows: &amp;gt;&amp;gt;&amp;gt;&lt;code&gt;wsl --shutdown&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Reload vscode window.&lt;/p&gt;

&lt;p&gt;8)Since you can reach both wsl and windows folders it is possible to run project in windows file system from wsl. But performance is so poor. You probably want to move your project folder to the wsl. So in linux use following path to store your projects. &lt;code&gt;home/&amp;lt;username&amp;gt;/&lt;/code&gt;. You can also create &lt;code&gt;home/&amp;lt;username&amp;gt;/webprojects/&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;source: &lt;a href="https://github.com/microsoft/WSL/issues/5298"&gt;https://github.com/microsoft/WSL/issues/5298&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to use scss with Svelte?</title>
      <dc:creator>AW A RE </dc:creator>
      <pubDate>Mon, 08 Feb 2021 14:56:50 +0000</pubDate>
      <link>https://dev.to/mefaba/how-to-use-scss-with-svelte-4c6o</link>
      <guid>https://dev.to/mefaba/how-to-use-scss-with-svelte-4c6o</guid>
      <description>&lt;p&gt;It might sound a simple question but it took me enough time to almost get frustrated learning svelte. It is simple, but documantations are not simple. So I wanted to walk through this process.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of Contents
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Svelte Installation&lt;/li&gt;
&lt;li&gt;Svelte Preprocess&lt;/li&gt;
&lt;li&gt;Sass&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Svelte Installation &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;npx degit sveltejs/template my-svelte-project&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;



&lt;p&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;



&lt;p&gt;&lt;code&gt;npm run dev&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Svelte Preprocess &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;npm install -D svelte-preprocess&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;After installation, &lt;br&gt;
1)import svelte-preprocess in rollup.config.js. &lt;br&gt;
2)add &lt;strong&gt;preprocess: sveltePreprocess()&lt;/strong&gt;&lt;br&gt;
-&lt;a href="https://github.com/sveltejs/svelte-preprocess/blob/main/docs/getting-started.md"&gt;source for svelte preprocess&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;svelte&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rollup-plugin-svelte&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;sveltePreprocess&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;svelte-preprocess&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;svelte&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;     &lt;span class="na"&gt;preprocess&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;sveltePreprocess&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="c1"&gt;// enable run-time checks when not in production&lt;/span&gt;
      &lt;span class="na"&gt;dev&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;production&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="c1"&gt;// we'll extract any component CSS out into&lt;/span&gt;
      &lt;span class="c1"&gt;// a separate file — better for performance&lt;/span&gt;
      &lt;span class="na"&gt;css&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;public/bundle.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Sass &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;npm install -D sass&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;-&lt;a href="https://github.com/sveltejs/svelte-preprocess/blob/main/docs/getting-started.md#1-installation"&gt;source for this step&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;style&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text/scss"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="k"&gt;@import&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="s1"&gt;"./styles.scss"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OR&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;style&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"scss"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>What microservices mean?(in short)</title>
      <dc:creator>AW A RE </dc:creator>
      <pubDate>Mon, 16 Nov 2020 06:46:21 +0000</pubDate>
      <link>https://dev.to/mefaba/what-microservices-mean-in-short-1kne</link>
      <guid>https://dev.to/mefaba/what-microservices-mean-in-short-1kne</guid>
      <description>&lt;p&gt;I have realized every explanation of microservices is confusing. After spending 1 month understanding it I came up with following short definition. Hope it will give you instant knowledge boost about microservices.&lt;/p&gt;

&lt;p&gt;They are not library, they are not small web technologies, they are not plural, they are just an aproach to split backend into different pieces, especially  when your app and team becomes bigger. &lt;/p&gt;

&lt;p&gt;Microservices is microservice architecture. The idea is to simply divide backend of the website into components. Imagine we have a store website.In product page, we can divide the page into pieces as Navbar, Product Details, Popular Products. Here you go. when your backend code are separated according to parts of your micro needs, they call it microservices.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building Blog with NextJS and Netlify CMS.</title>
      <dc:creator>AW A RE </dc:creator>
      <pubDate>Mon, 25 May 2020 08:52:31 +0000</pubDate>
      <link>https://dev.to/mefaba/building-blog-with-nextjs-and-netlify-cms-fom</link>
      <guid>https://dev.to/mefaba/building-blog-with-nextjs-and-netlify-cms-fom</guid>
      <description>&lt;p&gt;This tutorial have two steps. &lt;br&gt;
_At first we will build markdown blog with nextjs without any netlify cms involved. &lt;br&gt;
_Then at the second step, we will configure our code so we can use netlify cms to manage our blog site.&lt;/p&gt;
&lt;h1&gt;
  
  
  1.
&lt;/h1&gt;

&lt;p&gt;For the first step we will have help from Ben Awad's youtube tutorial on building next.js blog. It is 27 minutes. But 23 minutes and 43 seconds is enough for our project.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pY0vWYLDDco"&gt;
&lt;/iframe&gt;
&lt;br&gt;
First step is completed which means you have working markdown blog. Let connect it to netlify CMS&lt;/p&gt;
&lt;h1&gt;
  
  
  2. For the second step:
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Change the package.json file&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"dev"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"next"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"next build"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"next start"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"export"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run build &amp;amp;&amp;amp; next export"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create two new folders at public/admin:&lt;/strong&gt;&lt;br&gt;
index.html&lt;br&gt;
config.yml&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go to public/admin/index.html and paste the following:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Content Manager&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://identity.netlify.com/v1/netlify-identity-widget.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Include the script that builds the page and powers Netlify CMS --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/netlify-cms@2.9.7/dist/netlify-cms.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Go to public/admin/config.yml at paste the following:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="s"&gt;  name: git-gateway&lt;/span&gt;
&lt;span class="s"&gt;  branch: master&lt;/span&gt;
&lt;span class="s"&gt;media_folder: public/img #images that are uploaded via Netlify Cms interface will be stored in this folder&lt;/span&gt;
&lt;span class="s"&gt;public_folder: img #I dont know&lt;/span&gt;
&lt;span class="na"&gt;collections&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="s"&gt;  - name: "blog" # Used in routes, e.g., /admin/collections/blog&lt;/span&gt;
&lt;span class="s"&gt;    label: "BlogPost" # Used in the UI&lt;/span&gt;
&lt;span class="s"&gt;    folder: "posts" # The path to the folder where the markdown files are stored&lt;/span&gt;
&lt;span class="s"&gt;    create: true # Allow users to create new markdown files.&lt;/span&gt;
&lt;span class="s"&gt;    slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md&lt;/span&gt;
&lt;span class="s"&gt;    fields: # The fields for front matter. You will need to modify fields according to your project.&lt;/span&gt;
&lt;span class="s"&gt;      - {label: "Title", name: "title", widget: "string"}&lt;/span&gt;
&lt;span class="s"&gt;      - {label: "Description", name: "description", widget: "string"}&lt;/span&gt;
&lt;span class="s"&gt;      - {label: "Download", name: "download", widget: "string"}&lt;/span&gt;
&lt;span class="s"&gt;      - {label: "Featured Image", name: "thumbnail", widget: "image"}&lt;/span&gt;
&lt;span class="s"&gt;      - {label: "Author", name: "author", widget: "string", default: "Admin"}&lt;/span&gt;
&lt;span class="s"&gt;      - {label: "Body", name: "body", widget: "markdown"}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Your head section need to have netlify cms script:&lt;/strong&gt;&lt;br&gt;
Create a Layout component. Add following script to Head of Layout component like below. Then wrap pages with Layout component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://identity.netlify.com/v1/netlify-identity-widget.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/Head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Go to pages&amp;gt;index.js:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;netlifyIdentity&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;netlifyIdentity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;init&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;        &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;          &lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;netlifyIdentity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;            &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/admin/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;          &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="err"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;      &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="err"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;  &lt;/span&gt;&lt;span class="p"&gt;},[])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create github repository for your project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploy github repo on netlify:&lt;/strong&gt;&lt;br&gt;
Build command: npm run export&lt;br&gt;
Publish directory: out&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;on Netlify:&lt;/strong&gt;&lt;br&gt;
    1. Go to Settings &amp;gt; Identity, and select Enable Identity service.&lt;br&gt;
    2. Under Registration preferences, select Open or Invite only. &lt;br&gt;
    3. If you'd like to allow one-click login with services like Google and GitHub, check the boxes next to the services you'd like to use, under External providers.&lt;br&gt;
    4. Scroll down to Services &amp;gt; Git Gateway, and click Enable Git Gateway.&lt;/p&gt;

&lt;p&gt;Open your new page via the new Netlify URL, and navigate to /admin&lt;/p&gt;

&lt;p&gt;Congrats.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
