<?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: Gabrielle Jacobs</title>
    <description>The latest articles on DEV Community by Gabrielle Jacobs (@gabbyj).</description>
    <link>https://dev.to/gabbyj</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%2F493087%2Ffdc9d214-a186-4597-9a96-2f7eb1c5f172.jpg</url>
      <title>DEV Community: Gabrielle Jacobs</title>
      <link>https://dev.to/gabbyj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gabbyj"/>
    <language>en</language>
    <item>
      <title>Why are my RSS Feed posts not saving an uploaded cover image</title>
      <dc:creator>Gabrielle Jacobs</dc:creator>
      <pubDate>Thu, 22 Oct 2020 17:24:38 +0000</pubDate>
      <link>https://dev.to/gabbyj/why-are-my-rss-feed-posts-from-wordpress-not-saving-an-uploaded-featured-image-42jc</link>
      <guid>https://dev.to/gabbyj/why-are-my-rss-feed-posts-from-wordpress-not-saving-an-uploaded-featured-image-42jc</guid>
      <description>&lt;p&gt;My Wordpress posts import fine from the RSS Feed but it doesn't include the featured image. In dev.to, I see the Upload Image button but when I upload an image, it doesn't allow me to edit the Alt Text then when I hit Preview there's no image showing. When I go back to Edit, the uploaded image link disappears. I tried uploading then publishing without previewing but again, no image shows. Images work fine when I write a post or embed them in the article.&lt;/p&gt;

</description>
      <category>help</category>
      <category>rss</category>
      <category>image</category>
      <category>wordpress</category>
    </item>
    <item>
      <title>Git Revert: aka How to delete a commit without losing other commits</title>
      <dc:creator>Gabrielle Jacobs</dc:creator>
      <pubDate>Thu, 22 Oct 2020 16:53:00 +0000</pubDate>
      <link>https://dev.to/gabbyj/git-revert-aka-how-to-delete-a-commit-without-losing-other-commits-4je9</link>
      <guid>https://dev.to/gabbyj/git-revert-aka-how-to-delete-a-commit-without-losing-other-commits-4je9</guid>
      <description>&lt;p&gt;I was pair programming and my partner somehow merged another pair’s branch and made several commits after. My partner never did a git merge so we were confused how that happened. But the important thing is… HOW DO WE FIX IT?!&lt;/p&gt;

&lt;p&gt;I worried it would be very difficult and risky like doing a git rebase or something, but luckily it’s a very simple fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Revert a normal commit&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git revert &amp;lt;commit hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Revert a merge commit&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git revert &amp;lt;commit hash&amp;gt; -m 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note that &lt;code&gt;commit hash&lt;/code&gt; is the 7 character id associated with the commit you want to delete.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You will then be asked to add your commit message as you would a normal commit. Then &lt;code&gt;git push&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That’s it! You’re done!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Extra explanation for those who want it…&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is &lt;code&gt;-m 1&lt;/code&gt;? The &lt;code&gt;-m&lt;/code&gt; specifies the parent number and merge commits have more than one parent. Git doesn’t know automatically which parent branch is the main one and which one you want to un-merge.&lt;/p&gt;

&lt;p&gt;When you do a &lt;code&gt;git log&lt;/code&gt;, you will see next to &lt;code&gt;Merge&lt;/code&gt;, the parent branches&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;commit 8f937c683929b08379097828c8a04350b9b8e183
Merge: 8989ee0 7c6b236
Author: John Doe &amp;lt;john@example.com&amp;gt;
Date: Wed Oct 21 22:49:41 2020 +0100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this situation, &lt;code&gt;git revert 8f937c6 -m 1&lt;/code&gt; will get you the tree as it was in &lt;code&gt;8989ee0&lt;/code&gt;, and &lt;code&gt;git revert -m 2&lt;/code&gt; will reinstate the tree as it was in &lt;code&gt;7c6b236&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you merged another branch with your’s, then your branch is most likely the first one so -m 1 will be what you use.&lt;/p&gt;

&lt;p&gt;Hopefully this has helped someone to become 1 step closer to becoming a better developer.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>todayilearned</category>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>7 Git commands essential for contributing with a team</title>
      <dc:creator>Gabrielle Jacobs</dc:creator>
      <pubDate>Wed, 07 Oct 2020 19:41:47 +0000</pubDate>
      <link>https://dev.to/gabbyj/7-git-commands-essential-for-contributing-with-a-team-45fj</link>
      <guid>https://dev.to/gabbyj/7-git-commands-essential-for-contributing-with-a-team-45fj</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zewqglbu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sjt3uoevjegw2x6qbct2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zewqglbu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sjt3uoevjegw2x6qbct2.jpg" alt="git-logo-e1602099771632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You've been coding away, working on your own projects, adding to your own repositories but now you're working with a team of people and you realize, "I have no idea how to work with a team on a project". Let's learn the git commands that will help you transition to this new team workflow so that you can continue confidently.&lt;/p&gt;

&lt;h2&gt;Add repo folder to local computer&lt;/h2&gt;

&lt;p&gt;If you're not already a member of the repository, Fork it  in the upper right corner so it goes to your repos. If you are already apart of the repo you can skip this step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2hdCUWYE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://gabbysadventure.com/wp-content/uploads/2020/10/fork-1024x375.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2hdCUWYE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://gabbysadventure.com/wp-content/uploads/2020/10/fork-1024x375.jpg" alt="Where to find Fork button in top right of repository" class="wp-image-2197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Under the Code tab, click the green Code button and copy the HTTPS repo link.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0N55FNWw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://gabbysadventure.com/wp-content/uploads/2020/10/clone-1024x375.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0N55FNWw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://gabbysadventure.com/wp-content/uploads/2020/10/clone-1024x375.jpg" alt="Where Code button is to copy HTTPS link" class="wp-image-2199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the terminal, cd to your where you want your folder to live, whether Desktop or Documents or another folder.&lt;/p&gt;

&lt;p&gt;Now let's add the repo to your computer by doing git clone and pasting that link you just copied. Then hit enter to let it do it's thing.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/profile-name/repo-name.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This has not only copied the folder but it also connected your local terminal to the GitHub repo&lt;/p&gt;

&lt;p&gt;Now cd into your new created folder.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;repo-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're working with a project that requires dependencies such as node modules, we will need to update those to their latest version. Chances are good they have become out of date while sitting in the original repo.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will automatically update all dependencies and will take some time to complete since dependency folders, like npm modules, are quite large.&lt;/p&gt;

&lt;p&gt;You are all set. Now just double check it works by opening the file in a browser (possibly with npm start).&lt;/p&gt;

&lt;h2&gt;Create a new branch&lt;/h2&gt;

&lt;p&gt;We don't want to commit everything to the main branch immediately because we might break something, so a branch needs to be created that we can work off of.&lt;/p&gt;

&lt;p&gt;If multiple people are working on the same issue, one branch can be used, but each new issue needs a new branch ideally. To create a new branch do this below.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; new-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now this branch is on your local computer, so how do your teammates get access to this branch? We have to push it to the online repo.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin new-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can confirm it worked by going to Github where you can see that the group repo has a new branch and you can click "branches" to see your's and all the others.&lt;/p&gt;

&lt;h2&gt;Change branches&lt;/h2&gt;

&lt;p&gt;Now ate this point, you should be working on this new branch you created. How can you confirm this? If it's wrong, how can you change it?&lt;/p&gt;

&lt;p&gt;To see what branch you are on as well as see all other options for other branches, type this.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your active branch will have an * next to it. The others are branch options you have. It should look something like this.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;*&lt;/span&gt; new-branch-name
main
remotes/origin/new-brach-name
remotes/origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What if that asterisk was on the main branch? Or what if you needed to go to the main branch for some reason? You can easily switch between them. Let's switch from new-branch-name to the main branch.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll get a confirmation that you switched branches and you can check it by doing &lt;code&gt;git branch -a&lt;/code&gt; again.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;*&lt;/span&gt; main
new-branch-name
remotes/origin/new-brach-name
remotes/origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great! Now this was just an example, but remember to switch back to your branch with &lt;code&gt;git checkout new-branch-name&lt;/code&gt; to continue working with your project.&lt;/p&gt;

&lt;h2&gt;Track File Changes&lt;/h2&gt;

&lt;p&gt;Now you've been working and saving your project as normal and you're ready to start committing, but first we need to make sure we commit the right changes.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show all the changes you made in red because that means these changes aren't being tracked yet.&lt;/p&gt;

&lt;p&gt;Most of the time you'll want to commit all the files so you can just do this to add and track all changes.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But what if you have a couple of files that don't need to be committed? Maybe you had a personal file for your own purposes of unofficial debugging or testing .&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add file1 file4 file5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we should be able to do &lt;code&gt;git status&lt;/code&gt; again and if you did all, they should all be green now. If you did certain files, only those files should be green. Green means they are being tracked and ready to be committed.&lt;/p&gt;

&lt;h2&gt;Commit&lt;/h2&gt;

&lt;p&gt;Now we have to commit these changes you made locally along with a message describing what you did. Luckily this is very simple to do!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Before hitting enter to commit, if you worked on this commit with a teammate, read the next section first on adding multiple authors.&lt;/em&gt;&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Commit message here."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want a multi-line message, you can simply hit enter. As long as you don't close the quotes, it will keep going as the commit message.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Commit message here.
Second commit line.
Third commit line."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;Add multiple authors to a commit&lt;/h4&gt;

&lt;p&gt;Now when you commit, Github will give you credit as the committer and author. But you're working with a team, so what if that one commit was a group effort? Let's give everyone credit for it! We're going to add a line or so to the commit message.&lt;/p&gt;

&lt;p&gt;There's a feature called "Co-authored-by" that allows you to connect each member's name and GitHub account to the commit. The name isn't too important but &lt;em&gt;&lt;strong&gt;make sure the email is one they have linked to their GitHub account&lt;/strong&gt;&lt;/em&gt; or else their info will look a bit funky in the official GitHub commit. Notice again that the commit quotes don't close until &lt;em&gt;&lt;strong&gt;after&lt;/strong&gt;&lt;/em&gt; the authors are added.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; “Commit message here.
&lt;span class="k"&gt;*&lt;/span&gt;skip this line&lt;span class="k"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;*&lt;/span&gt;skip this line&lt;span class="k"&gt;*&lt;/span&gt;
Co-authored-by: name &amp;lt;name@example.com&amp;gt;
Co-authored-by: name &amp;lt;name@example.com&amp;gt;”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you did this using Github desktop, you can simply add the exact format, &lt;code&gt;Co-authored-by: name &amp;lt;name@example.com&amp;gt;&lt;/code&gt;,  in the "Detailed description" box under the short description box of the commit.&lt;/p&gt;

&lt;p&gt;You've officially committed your code to your local new-branch-name, but now let's add these commits to the group new-branch-name online.&lt;/p&gt;

&lt;h2&gt;Push Changes&lt;/h2&gt;

&lt;p&gt;Pushing is a very simple task that simply takes all the commits and changes you made locally to the group repository. You should still be in your new-branch-name but double check with git branch -a. Good? Great! Now let's push.&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Origin&lt;/code&gt; is saying, push to the branch I'm currently on and you don't have to fully type out &lt;code&gt;git push origin new-branch-name&lt;/code&gt; every time.&lt;/p&gt;

&lt;p&gt;Now go to Github, click your branch, and you can see your commits along with the co-authors you added.&lt;/p&gt;

&lt;p&gt;Create a pull request via the GitHub desktop to request merging this branch with the main branch. Wait for approval or review or whatever your team does then the head merger will merge it.&lt;/p&gt;

&lt;h2&gt;Pull Latest Code&lt;/h2&gt;

&lt;p&gt;The code on the main repository has updated since you last used it and you need to make some new changes. You don't need to fork and clone anymore because it's on your computer already, just not the updated one. Let's pull the new code. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Be sure to be in your desired branch or just the main one if you don't need a specific branch&lt;/em&gt;&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin
//if new dependencies were added by another contributor or you are not sure, &lt;span class="k"&gt;do&lt;/span&gt;...
npm &lt;span class="nb"&gt;install&lt;/span&gt;
//if its been awhile or you know an update occurred, &lt;span class="k"&gt;do&lt;/span&gt;...
npm update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now check your local folder and you should notice the latest code in there. You can work on this as usual and follow all the same previous steps from above.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;You now have all the basic knowledge you need to effectively contribute to a group project! And just in time for Hacktoberfest ;) .Hopefully this has helped someone to become 1 step closer to becoming a better developer.&lt;/p&gt;

</description>
      <category>git</category>
      <category>whatimlearning</category>
      <category>branches</category>
      <category>commits</category>
    </item>
    <item>
      <title>Install Nodemon and how to deal with potential issues</title>
      <dc:creator>Gabrielle Jacobs</dc:creator>
      <pubDate>Fri, 18 Sep 2020 04:12:38 +0000</pubDate>
      <link>https://dev.to/gabbyj/install-nodemon-and-how-to-deal-with-potential-issues-2og1</link>
      <guid>https://dev.to/gabbyj/install-nodemon-and-how-to-deal-with-potential-issues-2og1</guid>
      <description>&lt;p&gt;Nodemon will monitor any changes in your code and automatically restart your server. This removes the need to type in &lt;code&gt;node server.js&lt;/code&gt; to start, restart webpage to see changes, &lt;code&gt;control+c&lt;/code&gt; to stop, and repeat after every single little change. You can &lt;a href="https://nodemon.io"&gt;read more about it here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In a perfect world, this first step should work for you and be done. You can stop reading. In your terminal, it doesn’t need to be in a project folder, type this to download it to your computer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; nodemon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Potential Issues
&lt;/h2&gt;

&lt;p&gt;If that doesn’t work for you, then try this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; nodemon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will need to enter a password so make sure you have admin privileges on your computer. If it’s your computer and not a job or school’s, then this shouldn’t be a problem.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Your password won’t show up when you type it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After installing Nodemon, if you try to run it and get a long error list, you can get rid of it by entering:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i pstree.remy@1.1.0 &lt;span class="nt"&gt;-D&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The documentation for this issue can be found &lt;a href="https://github.com/remy/nodemon/issues/1459"&gt;here on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You should be good to go now!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Once you have it downloaded, you can go to your folder in the terminal and instead of typing &lt;code&gt;node server.js&lt;/code&gt;, you can type &lt;code&gt;nodemon server.js&lt;/code&gt;. It is now monitoring for changes. Every time you hit save, nodemon will automatically restart the server and you just need to refresh the browser to see your updates.&lt;/p&gt;

&lt;p&gt;Hopefully this has helped someone to become 1 step closer to becoming a better developer.&lt;/p&gt;

</description>
      <category>code</category>
      <category>whatimlearning</category>
      <category>express</category>
      <category>node</category>
    </item>
    <item>
      <title>How to wrap text around an image outline</title>
      <dc:creator>Gabrielle Jacobs</dc:creator>
      <pubDate>Mon, 31 Aug 2020 03:41:31 +0000</pubDate>
      <link>https://dev.to/gabbyj/how-to-easily-wrap-text-around-image-outline-5455</link>
      <guid>https://dev.to/gabbyj/how-to-easily-wrap-text-around-image-outline-5455</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YkEyff5---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/full-style-2.png%3Fresize%3D640%252C229%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YkEyff5---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/full-style-2.png%3Fresize%3D640%252C229%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today we’re going to learn how to wrap text around a non-traditional image outline instead of a square, rectangular, or circular image. In honor of Chadwick Boseman (R.I.P.), we’re going to use Black Panther.&lt;/p&gt;

&lt;p&gt;Let’s start with an image and some text. Make sure the image is a png.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;/*The image can be a link or a file*/
&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"photo"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://image-link.png"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- Add as many paragraphs as you want --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should look like this so far.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1gKEAMQP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Basic-code.png%3Fresize%3D640%252C332%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1gKEAMQP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Basic-code.png%3Fresize%3D640%252C332%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next let’s move the words next to the image. In the css, we’re going to add a float. Note the class name for the image is “photo”.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.photo&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&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;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GGNj4M0o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Float-1.png%3Fresize%3D640%252C248%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GGNj4M0o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i2.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Float-1.png%3Fresize%3D640%252C248%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we’re going to add some css styles you may not have heard of yet.&lt;/p&gt;

&lt;p&gt;The first is called &lt;code&gt;shape-outside&lt;/code&gt;. Shape-outside provides a way to customize the usual text-wrap wrapping, making it possible to wrap text around complex objects rather than simple boxes or circles. Note that this property will only work on floated elements.&lt;/p&gt;

&lt;p&gt;The possible values for shape-outside are :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;circle()&lt;/code&gt;: for making circular shapes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ellipse()&lt;/code&gt;: for making elliptical shapes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;inset()&lt;/code&gt;: for making rectangular shapes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;polygon()&lt;/code&gt;: for creating any shape with 3 or more vertices.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;url()&lt;/code&gt;: identifies which image should be used to wrap text around.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;initial&lt;/code&gt;: the float area is unaffected.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;inherit&lt;/code&gt;: inherits &lt;code&gt;shape-outside&lt;/code&gt; value from parent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’re going to use url. So under your float style, add this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.photo&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-outside&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("https://image-link.png")&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;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HknnfS4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Shape-outside.png%3Fresize%3D640%252C231%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HknnfS4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Shape-outside.png%3Fresize%3D640%252C231%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I’m not saying css is magic… but css can certainly be magical. It’s looking better already! 😉&lt;/p&gt;

&lt;p&gt;Next we’re going to add something called the &lt;code&gt;shape-image-threshold&lt;/code&gt;. It may not always be needed (and in my image’s case it’s not needed), but it’s good to be aware of. So I’m going to show you!&lt;/p&gt;

&lt;p&gt;It’s mainly used with gradient images or images with a shadow and says, “This is how much of the gradient I want the words to cover.” Since my image doesn’t need it, here is an example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O7qWTePR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/gradient.png%3Fresize%3D640%252C953%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O7qWTePR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/gradient.png%3Fresize%3D640%252C953%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The top image has a threshold of 0 while the second has a threshold of 0.3.&lt;/p&gt;

&lt;p&gt;The possible range is from 0 to 1, same as opacity measurements.&lt;/p&gt;

&lt;p&gt;In my image’s case, it will only slightly hug the edges of the image more or fully cover it if I input 1. It’s looking for shadows or gradient which my image doesn’t have. So let’s give Black Panther a nice little hug and add some shape-threshold. Adjust yours as needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.photo&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-outside&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("https://image-link.png")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-image-threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.9&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;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HknnfS4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Shape-outside.png%3Fresize%3D640%252C231%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HknnfS4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i0.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/Shape-outside.png%3Fresize%3D640%252C231%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, nothing has really changed at all for my non-gradient image.&lt;/p&gt;

&lt;p&gt;Now let’s give Black Panther some room to breathe by adding margin. But because we’re using shape-whatever, we can’t just use margin. We have to use &lt;code&gt;shape-margin&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.photo&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-outside&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("https://image-link.png")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-image-threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2%&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;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6I2pUapz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/margin.png%3Fresize%3D640%252C234%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6I2pUapz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/margin.png%3Fresize%3D640%252C234%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s so much better!&lt;/p&gt;

&lt;p&gt;Well there you have it, we’ve created a custom text wrap around an image.&lt;/p&gt;

&lt;p&gt;Just to make it pretty, we can add some styles on the div.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;90%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;justify&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;silver&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt; &lt;span class="no"&gt;purple&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.photo&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-outside&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("https://image-link.png")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-image-threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;shape-margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2%&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;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YkEyff5---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/full-style-2.png%3Fresize%3D640%252C229%26ssl%3D1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YkEyff5---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/gabbysadventure.com/wp-content/uploads/2020/08/full-style-2.png%3Fresize%3D640%252C229%26ssl%3D1" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today we learned about &lt;code&gt;shape-outside&lt;/code&gt;, &lt;code&gt;shape-image-threshold&lt;/code&gt;, and &lt;code&gt;shape-margin&lt;/code&gt; to make a text wrap around a non-traditional image shape.&lt;/p&gt;

&lt;p&gt;Hopefully this has helped someone to become 1 step closer to becoming a better developer.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>css</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
