<?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: Dana Byerly</title>
    <description>The latest articles on DEV Community by Dana Byerly (@superterrific).</description>
    <link>https://dev.to/superterrific</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%2F133613%2F8d072461-6853-47f9-bd8b-8491165b1cfc.jpeg</url>
      <title>DEV Community: Dana Byerly</title>
      <link>https://dev.to/superterrific</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/superterrific"/>
    <language>en</language>
    <item>
      <title>How to turn off Browsersync ghostMode in Eleventy</title>
      <dc:creator>Dana Byerly</dc:creator>
      <pubDate>Sun, 04 Jul 2021 00:00:00 +0000</pubDate>
      <link>https://dev.to/superterrific/how-to-turn-off-browsersync-ghostmode-in-eleventy-2ofh</link>
      <guid>https://dev.to/superterrific/how-to-turn-off-browsersync-ghostmode-in-eleventy-2ofh</guid>
      <description>&lt;p&gt;In your &lt;code&gt;eleventy.js&lt;/code&gt; file within the module.exports section add the following…&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="nx"&gt;eleventyConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setBrowserSyncConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; 
  &lt;span class="na"&gt;ghostMode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; 
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Eleventy uses &lt;a href="https://browsersync.io"&gt;Browsersync&lt;/a&gt; to serve your site locally. ghostMode &lt;a href="https://browsersync.io/docs/options#option-ghostMode"&gt;is the option&lt;/a&gt; that mirrors clicking, scrolling and other actions across devices. &lt;/p&gt;

&lt;p&gt;For example, if you have the same page open in Firefox and Chrome and click a link in Firefox, both browsers will load the linked page. Scroll the page on your laptop and it will also scroll your phone or tablet, etc.&lt;/p&gt;

&lt;p&gt;I’ve found this feature to be very handy but encountered a scenario where I needed to disable it. I was working on a project and fired up &lt;a href="https://sizzy.app"&gt;Sizzy&lt;/a&gt; to view it across browsers and devices. It had been awhile since I used Sizzy and I was greeted with this message…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--631miVY2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://danabyerly.com/img/ghostMode.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--631miVY2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://danabyerly.com/img/ghostMode.png" alt="An informational pop-up that reads: Browsersync can conflict with Sizzy's synchronization features. We recommend turning off Browsersync's ghost mode option if you are having troubles using Sizzy." width="880" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I didn’t even know ghostMode was an option and thought Browsersync just worked that way! After a bit of searching I found &lt;a href="https://github.com/11ty/eleventy/issues/841"&gt;this thread&lt;/a&gt; about disabling it in the &lt;a href="https://github.com/11ty/eleventy-base-blog"&gt;Eleventy Base Blog starter&lt;/a&gt; and took the example from there.&lt;/p&gt;

&lt;p&gt;There are plenty of other &lt;a href="https://browsersync.io/docs/options"&gt;configurable options&lt;/a&gt; in Browsersync. 11ty Rocks also has an example for &lt;a href="https://11ty.rocks/eleventyjs/browsersync/"&gt;opening a browser on launch&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Happy reloading!&lt;/p&gt;

</description>
      <category>eleventy</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
