<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.2">Jekyll</generator><link href="https://layeredcraft.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://layeredcraft.com/" rel="alternate" type="text/html" /><updated>2024-03-27T20:10:36+00:00</updated><id>https://layeredcraft.com/feed.xml</id><title type="html">LayeredCraft</title><subtitle>A theme shop building stand-out Ghost themes for your next project. Our themes are SEO-optimized, meticulously designed and a breeze to use.</subtitle><author><name>{&quot;twitter&quot;=&gt;&quot;layeredcraft&quot;}</name></author><entry><title type="html">A Step-by-Step Guide to Editing and Uploading Ghost Theme Files</title><link href="https://layeredcraft.com/blog/a-step-by-step-guide-to-editing-and-uploading-ghost-theme-files/" rel="alternate" type="text/html" title="A Step-by-Step Guide to Editing and Uploading Ghost Theme Files" /><published>2023-07-24T20:53:28+00:00</published><updated>2023-07-24T20:53:28+00:00</updated><id>https://layeredcraft.com/blog/a-step-by-step-guide-to-editing-and-uploading-ghost-theme-files</id><content type="html" xml:base="https://layeredcraft.com/blog/a-step-by-step-guide-to-editing-and-uploading-ghost-theme-files/"><![CDATA[<h2 id="step-1-getting-acquainted-with-theme-files">Step 1: Getting Acquainted with Theme Files</h2>

<p>Before delving into customizing a theme, familiarize yourself with the Ghost theme file structure. A standard Ghost theme contains several required files:</p>

<ol>
  <li><code class="language-plaintext highlighter-rouge">default.hbs</code>: The layout template file responsible for rendering your website’s content.</li>
  <li><code class="language-plaintext highlighter-rouge">post.hbs</code>: The template used for individual blog posts.</li>
  <li><code class="language-plaintext highlighter-rouge">page.hbs</code>: Similar to <code class="language-plaintext highlighter-rouge">post.hbs</code>, this file dictates the layout of pages like About or Contact.</li>
  <li><code class="language-plaintext highlighter-rouge">partials</code>: Contains reusable components, such as headers, footers, and sidebars, applied across the theme.</li>
  <li><code class="language-plaintext highlighter-rouge">assets</code>: A folder containing CSS, JavaScript, and other assets used in the theme.</li>
</ol>

<h2 id="step-2-essential-tools-for-editing">Step 2: Essential Tools for Editing</h2>

<p>To efficiently edit your Ghost theme files, you’ll need the following tools:</p>

<ol>
  <li><strong>Text Editor</strong>: While any text editor suffices, utilizing a code-focused editor like <a href="https://code.visualstudio.com/">Visual Studio Code</a>, or <a href="https://www.sublimetext.com/">Sublime Text</a> will significantly enhance your editing experience.</li>
  <li><strong>Local Development Environment</strong>: Set up a local development environment with Node.js and the Ghost-CLI to preview theme changes before making them live. For more on installing Ghost locally, check out the official guide below:</li>
</ol>

<p><a href="/ghost/docs/install/local/">Install Ghost Locally →</a></p>

<h2 id="step-3-customizing-your-theme">Step 3: Customizing Your Theme</h2>

<p>Now, let’s dive into the process of customizing your Ghost theme. Here’s a comprehensive step-by-step guide:</p>

<ol>
  <li><strong>Locate the Theme Directory:</strong> Access your Ghost theme files by navigating to the <code class="language-plaintext highlighter-rouge">content/themes</code> directory of your Ghost installation.</li>
  <li><strong>Make a Backup:</strong> Before initiating any changes, create a complete backup of your current theme. Copy the entire theme folder and add “-backup.” to the folder name.</li>
  <li><strong>Edit Theme Files:</strong> Open your preferred text editor and unleash your creativity by modifying the theme files. Experiment with colors, fonts, layouts, and include or remove elements as per your vision. Take advantage of the various <a href="/ghost/docs/themes/helpers/">helpers</a>, which Ghost themes utilize, to create dynamic sections.</li>
  <li><strong>Preview Changes Locally:</strong> Employ a local development environment (from step 2) to preview changes locally without affecting your live site. This preview stage is instrumental in identifying any potential issues.</li>
  <li><strong>Debugging and Testing:</strong> During the customization process, rigorously test your theme across various devices and screen sizes to ensure seamless user experience. The browser developer tools will be your ally in identifying and rectifying any bugs or glitches.</li>
</ol>

<h2 id="step-4-zipping-the-theme-and-uploading">Step 4: Zipping the Theme and Uploading</h2>

<p>Once you are content with your theme’s customization, it’s time to package and upload it to your Ghost website.</p>

<ol>
  <li><strong>Compress the Theme:</strong> Select all the files and folders in your customized theme directory, right-click, and choose “Compress” or “Zip” to create a zip file of your theme.</li>
  <li><strong>Log in to Ghost Admin:</strong> Access your Ghost Admin dashboard by visiting your website’s URL followed by <code class="language-plaintext highlighter-rouge">/ghost</code>.</li>
  <li><strong>Navigate to “Settings”:</strong> Within the Ghost Admin dashboard, locate and click on “Settings” in the left-hand sidebar.</li>
  <li><strong>Choose “Design”:</strong> Under the “Settings” section, select the “Design” tab to access the theme settings.</li>
  <li><strong>Upload the Theme:</strong> Look for the “Upload a theme” button and select the zip file you created earlier. Ghost will handle the automatic upload and application of your customized theme to your website.</li>
  <li><strong>Activate the Theme:</strong> After successful uploading, click on the “Activate” button to set your customized theme live on your Ghost website.</li>
</ol>

<p>Also checkout our guide for using <a href="/blog/using-ghost-with-github-the-complete-step-by-step-guide/">Ghost with GitHub</a> for automating and streamlining your deployments.</p>

<h2 id="wrapping-up">Wrapping Up</h2>

<p>By following the steps outlined in this guide, you can confidently edit your Ghost theme files, efficiently use the necessary tools, and effortlessly upload your customized theme to your Ghost website. <br />
<br />
But if that’s a bit too much for you to tackle on your own, we’re here to help! Check out our Ghost services below or <a href="https://x.com/layeredcraft">reach out</a> to us anytime.</p>

<p><a href="https://layeredcraft.com/services">LayeredCraft Ghost Services →</a></p>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[To truly make your Ghost blog stand out and reflect your unique style or brand, you may need to customize the theme your using. In this article, I'll guide you through the process of editing a Ghost theme, introduce the necessary tools, and show you how to upload the customized theme to your Ghost blog.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-ghost-editing.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-ghost-editing.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">The Complete Guide for Developing Ghost Themes with TailwindCSS</title><link href="https://layeredcraft.com/blog/the-complete-guide-for-developing-ghost-themes-with-tailwindcss/" rel="alternate" type="text/html" title="The Complete Guide for Developing Ghost Themes with TailwindCSS" /><published>2023-07-20T17:53:13+00:00</published><updated>2023-07-20T17:53:13+00:00</updated><id>https://layeredcraft.com/blog/the-complete-guide-for-developing-ghost-themes-with-tailwindcss</id><content type="html" xml:base="https://layeredcraft.com/blog/the-complete-guide-for-developing-ghost-themes-with-tailwindcss/"><![CDATA[<p><a href="https://tailwindcss.com/">TailwindCSS</a> is a highly customizable CSS framework, making it easy to tailor designs to any project. It offers a wide range of features, such as responsive breakpoints, custom color palettes, and more. Additionally, TailwindCSS provides a ton of resources to help developers get up and running quickly.</p>

<h2 id="installing-ghost">Installing Ghost</h2>

<p>Installing Ghost locally is quick and easy using the command line. To view the full list of prerequisites for installing Ghost, refer to <a href="https://ghost.org/docs/install/local/">this article</a>.</p>

<p>Once you’ve met those prerequisites, open up your terminal and run the following command:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>npm <span class="nb">install </span>ghost-cli@latest <span class="nt">-g</span>
</code></pre></div></div>

<p>This will install the <strong><a href="https://ghost.org/docs/ghost-cli/">Ghost-CLI</a></strong> command line tool to help you get Ghost installed and configured. Next, <code class="language-plaintext highlighter-rouge">cd</code> into an empty directory and run the install command:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ghost <span class="nb">install local</span>
</code></pre></div></div>

<p>This will download and install the latest version of Ghost in your local environment. Once the installation is complete, you’ll be able to access your new site at <code class="language-plaintext highlighter-rouge">http://localhost:2368</code>.</p>

<h2 id="creating-a-new-theme">Creating a New Theme</h2>

<p>Once your local Ghost site is up and running, let’s continue in the command line and install the official <a href="https://github.com/TryGhost/Starter">Starter Theme by Ghost</a>. This will provide the necessary structure as a starting point for our development.</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd </span>content/themes
git clone https://github.com/TryGhost/Starter.git ghost-starter-with-tailwind
</code></pre></div></div>

<p>With this command, Git will create a directory named <code class="language-plaintext highlighter-rouge">ghost-starter-with-tailwind</code> in your <code class="language-plaintext highlighter-rouge">themes</code> directory and clone all contents from the remote repository into that directory.</p>

<p>The Ghost Starter Theme uses <a href="https://npmjs.com/">npm</a> to manage its dependencies. To install these dependencies, <code class="language-plaintext highlighter-rouge">cd</code> into your new theme directory and then run the following command:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd </span>ghost-starter-with-tailwind
npm <span class="nb">install</span>
</code></pre></div></div>

<p>This will download and install the necessary packages for the theme.</p>

<h2 id="installing-tailwind">Installing Tailwind</h2>

<p>After your theme is created, you’ll be ready to install TailwindCSS and the <a href="https://tailwindcss.com/docs/typography-plugin">typography plugin</a> (needed for styling post content output) with the following commands:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>npm <span class="nb">install</span> <span class="nt">-D</span> tailwindcss @tailwindcss/typography concurrently
npx tailwindcss init
</code></pre></div></div>

<p>The first command installs the packages we need and the last command, <code class="language-plaintext highlighter-rouge">npx tailwindcss init</code> will create an initial <code class="language-plaintext highlighter-rouge">tailwind.config.js</code> file. This <a href="https://tailwindcss.com/docs/configuration">config file</a> is used to add extensions or customize Tailwind by adding new font sizes, colors, etc…</p>

<p>Now that Tailwind is installed, we need need to import the Tailwind CSS files. We can do this by adding the following three <code class="language-plaintext highlighter-rouge">@tailwind</code> lines at the very top of the <code class="language-plaintext highlighter-rouge">assets/css/index.css</code> file. Feel free to remove the other contents of this file.</p>

<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">@tailwind</span> <span class="n">base</span><span class="p">;</span>
<span class="k">@tailwind</span> <span class="n">components</span><span class="p">;</span>
<span class="k">@tailwind</span> <span class="n">utilities</span><span class="p">;</span>

<span class="o">/*</span>

<span class="nt">This</span> <span class="nt">is</span> <span class="nt">a</span> <span class="nt">development</span> <span class="nt">CSS</span> <span class="nt">file</span> <span class="nt">that</span> <span class="nt">is</span> <span class="nt">compiled</span> <span class="nt">to</span> <span class="nt">a</span> <span class="nt">minified</span>
<span class="nt">production</span> <span class="nt">stylesheet</span> <span class="nt">in</span> <span class="nt">assets</span><span class="o">/</span><span class="nt">built</span><span class="o">/</span><span class="nt">screen</span><span class="nc">.css</span> <span class="nt">using</span><span class="o">:</span> <span class="nt">npm</span> <span class="nt">run</span> <span class="nt">dev</span>

<span class="o">...</span>
</code></pre></div></div>

<p>The last step to config Tailwind is to modify the default <code class="language-plaintext highlighter-rouge">tailwind.config.js</code> file to ensure its compatibility with handlebar templates used by Ghost themes as well as enable the typography plugin we instead earlier. Open the <code class="language-plaintext highlighter-rouge">tailwind.config.js</code> file and <strong>replace</strong> it’s contents with the following:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cm">/** @type {import('tailwindcss').Config} */</span>
<span class="k">export</span> <span class="k">default</span> <span class="p">{</span>
  <span class="na">content</span><span class="p">:</span> <span class="p">[</span><span class="dl">"</span><span class="s2">./*.hbs</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">./**/*.hbs</span><span class="dl">"</span><span class="p">],</span>
  <span class="na">theme</span><span class="p">:</span> <span class="p">{</span>
      <span class="na">extend</span><span class="p">:</span> <span class="p">{}</span>
  <span class="p">},</span>
  <span class="na">plugins</span><span class="p">:</span> <span class="p">[</span>
      <span class="nx">require</span><span class="p">(</span><span class="dl">'</span><span class="s1">@tailwindcss/typography</span><span class="dl">'</span><span class="p">)</span>
  <span class="p">]</span>
<span class="p">}</span>
</code></pre></div></div>

<h2 id="adding-tailwind-to-the-build-process">Adding Tailwind to the Build Process</h2>

<p>The Ghost Starter Theme uses <a href="https://rollupjs.org/">Rollup</a> for managing build tasks. However, using the <code class="language-plaintext highlighter-rouge">rollup-plugin-postcss</code> included in the starter theme is not inherently compatible with Tailwind, but thanks to <a href="https://twitter.com/theroyalfig">Ryan Feigenbaum</a>, there’s an <a href="https://github.com/TryGhost/Starter/issues/61#issuecomment-1529841394">easy workaround</a>.</p>

<p>In order to get this working, let’s first <strong>remove</strong> the following lines from the <code class="language-plaintext highlighter-rouge">assets/js/index.js</code> file:</p>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Import CSS</span>
<span class="k">import</span> <span class="dl">"</span><span class="s2">../css/index.css</span><span class="dl">"</span><span class="p">;</span>
</code></pre></div></div>

<p>We’ll also need to modify the <code class="language-plaintext highlighter-rouge">rollup.config.js</code> file and <strong>remove</strong> the following blocks of code:</p>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// CSS</span>
<span class="c1">// Enable the PostCSS preprocessor</span>
<span class="k">import</span> <span class="nx">postcss</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">rollup-plugin-postcss</span><span class="dl">'</span><span class="p">;</span>
<span class="c1">// Use @import to include other CSS files</span>
<span class="k">import</span> <span class="nx">atImport</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">postcss-import</span><span class="dl">'</span><span class="p">;</span>
<span class="c1">// Use the latest CSS features in your Rollup bundle</span>
<span class="k">import</span> <span class="nx">postcssPresetEnv</span> <span class="k">from</span> <span class="dl">'</span><span class="s1">postcss-preset-env</span><span class="dl">'</span><span class="p">;</span>
</code></pre></div></div>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">postcss</span><span class="p">({</span>
    <span class="na">extract</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
    <span class="na">sourceMap</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
    <span class="na">plugins</span><span class="p">:</span> <span class="p">[</span>
        <span class="nx">atImport</span><span class="p">(),</span>
        <span class="nx">postcssPresetEnv</span><span class="p">({})</span>
    <span class="p">],</span> 
    <span class="na">minimize</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="p">}),</span>
</code></pre></div></div>

<p>Finally, open the <code class="language-plaintext highlighter-rouge">package.json</code> file and <strong>update</strong> the <code class="language-plaintext highlighter-rouge">dev</code> and <code class="language-plaintext highlighter-rouge">build</code> tasks:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nl">"dev"</span><span class="p">:</span><span class="w"> </span><span class="s2">"concurrently </span><span class="se">\"</span><span class="s2">rollup -c --environment BUILD:development -w</span><span class="se">\"</span><span class="s2"> </span><span class="se">\"</span><span class="s2">npx tailwindcss -i ./assets/css/index.css -o ./assets/built/index.css --watch</span><span class="se">\"</span><span class="s2"> "</span><span class="err">,</span><span class="w">
</span><span class="nl">"build"</span><span class="p">:</span><span class="w"> </span><span class="s2">"rollup -c --environment BUILD:production &amp;&amp; npx tailwindcss -i ./assets/css/index.css -o ./assets/built/index.css --minify"</span><span class="err">,</span><span class="w">
</span></code></pre></div></div>

<h2 id="tailwind-and-ghost-content">Tailwind and Ghost Content</h2>

<p>One caveat to using Tailwind and Ghost is the challenge with styling post <code class="language-plaintext highlighter-rouge">{{content}}</code>. Since this content is being generated by Ghost and we don’t have direct access to the output to apply Tailwind classes, the <a href="https://tailwindcss.com/docs/typography-plugin">Tailwind typography</a> plugin comes in handy. This allows us to apply a set of default Tailwind styles to HTML output that we don’t have control over.</p>

<p>Since we’ve already installed and enabled this plugin in earlier steps, to use it, open up the <code class="language-plaintext highlighter-rouge">post.hbs</code> template file and around line 34 add the <code class="language-plaintext highlighter-rouge">prose</code> class to the <code class="language-plaintext highlighter-rouge">div</code> surrounding the <code class="language-plaintext highlighter-rouge">{{content}}</code> output:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"gh-content gh-canvas prose"</span><span class="nt">&gt;</span>
  {{content}}
<span class="nt">&lt;/div&gt;</span>
</code></pre></div></div>

<p>There are a number of <a href="https://tailwindcss.com/docs/typography-plugin#element-modifiers">modifiers</a> available for you to customize the style of every outputted tag, so be sure to explore the documentation for the typography plugin for all the available options.</p>

<h2 id="tailwind-and-ghost-cards">Tailwind and Ghost Cards</h2>

<p>One of the highlights of Ghost is it’s extensive selection of <a href="https://ghost.org/docs/themes/content/">editor cards</a> you can use to pull in dynamic content. The Ghost Starter Theme includes default styling for these various cards, however, there may be cases where you’d like to override these styles in favor of your own.</p>

<p>For example, the default <strong>Button</strong> card features slightly rounded corners that I want to make fully rounded.</p>

<p><img src="/assets/img/uploads/screely-1674089169501.png" alt="" /></p>

<p>This can easily be done by first identifying the class name of the button card, which you can do by locating it on <a href="https://ghost.org/docs/themes/content/#button-card">this page</a>. Here we can see the button card is a container with the class <code class="language-plaintext highlighter-rouge">kg-card.kg-button-card</code> with the actual button being a link with the class of <code class="language-plaintext highlighter-rouge">kg-btn</code>.</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"kg-card kg-button-card kg-align-center"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"#"</span> <span class="na">class=</span><span class="s">"kg-btn kg-btn-accent"</span><span class="nt">&gt;</span>Checkout This Button<span class="nt">&lt;/a&gt;</span>
<span class="nt">&lt;/div&gt;</span>
</code></pre></div></div>

<p>Let’s open up our <code class="language-plaintext highlighter-rouge">assets/css/screen.css</code> file and at the bottom of the file add the following block of code:</p>

<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">.kg-card.kg-button-card</span> <span class="nt">a</span><span class="nc">.kg-btn</span> <span class="p">{</span>
  <span class="err">@apply</span> <span class="err">rounded-full;</span>
<span class="p">}</span>
</code></pre></div></div>

<p>By using the <a href="https://tailwindcss.com/docs/reusing-styles#extracting-classes-with-apply">@apply</a> function included with Tailwind, we can apply any Tailwind style to any CSS selector.</p>

<p><img src="/assets/img/uploads/screely-1674089629795.png" alt="" /></p>

<p>And voila! We have a rounded button that overrides the default Ghost style with Tailwind classes. Now you can free apply this same technique to any other Ghost card.</p>

<p>Are you using TailwindCSS for your <a href="https://layeredcraft.com/ghost">Ghost</a> blog? We’d love to know! Tweet us <a href="https://twitter.com/layeredcraft">@layeredcraft</a>!</p>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[In this guide, we’ll take an in-depth look at TailwindCSS, a powerful utility-first CSS framework that allows developers to quickly create custom, extensible, and beautiful Ghost themes without writing a line of CSS.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-tailwind.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-tailwind.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Writing Great Documentation For Your Product</title><link href="https://layeredcraft.com/blog/writing-great-documentation-for-your-product/" rel="alternate" type="text/html" title="Writing Great Documentation For Your Product" /><published>2023-07-20T16:30:23+00:00</published><updated>2023-07-20T16:30:23+00:00</updated><id>https://layeredcraft.com/blog/writing-great-documentation-for-your-product</id><content type="html" xml:base="https://layeredcraft.com/blog/writing-great-documentation-for-your-product/"><![CDATA[<p>Here are some helpful guidelines you can adopt when writing your documentation:</p>

<h2 id="start-by-defining-your-audience">Start by defining your audience</h2>

<p>Before you begin writing documentation, it’s important to define your target audience. Consider their level of technical expertise, their familiarity with your product, and their specific needs. This will help you tailor the content and tone of your documentation to suit their needs and ensure the content is accessible and relevant to them.</p>

<blockquote>
  <p>Consider you user’s level of technical expertise, their familiarity with your product, and their specific needs.</p>
</blockquote>

<h2 id="keep-it-organized">Keep it organized</h2>

<p>Clear organization is key to making your documentation easy to navigate. Start by creating a logical structure that allows users to find information quickly. Use headings, subheadings, and bullet points to break up content and make it scannable. Additionally, include a comprehensive table of contents and search to help users locate specific topics easily.</p>

<h3 id="example">Example</h3>

<p><img src="/assets/img/uploads/screely-1689897579989.jpeg" alt="" /></p>

<p>Notion is a great example of an organized, well laid out documentation site.</p>

<p><a href="https://www.notion.so/help/guides/category/documentation">Notion Docs →</a></p>

<h2 id="use-clear-concise-language">Use clear, concise language</h2>

<p>Avoid using complex sentence structures in your documentation. Instead, strive for simplicity and clarity. Even for the most technical products, the language surrounding examples and more technical explanations should be written in plain language that is easy to understand. Be mindful of your tone, and aim to be friendly, approachable, and helpful.</p>

<h3 id="example-1">Example</h3>

<p><img src="/assets/img/uploads/screely-1689899041732.jpeg" alt="" /></p>

<p>PlanetScale does a great job at writing approachable documentation for what is otherwise a very technical product built for developers.</p>

<p><a href="https://planetscale.com/docs">PlanetScale Docs →</a></p>

<h2 id="provide-step-by-step-instructions">Provide step-by-step instructions</h2>

<p>When explaining how to use your product, provide clear and concise step-by-step instructions. Break down complex tasks into smaller, manageable steps. Use numbered lists or bullet points to highlight each action users need to take. Including screenshots, GIFs or videos can also be helpful in illustrating the process visually.</p>

<h3 id="example-2">Example</h3>

<p><img src="/assets/img/uploads/screely-1689897783448.jpeg" alt="" /></p>

<p>Figma’s does an excellent job in guiding even the most novice users.</p>

<p><a href="https://help.figma.com/hc/en-us">Figma Docs →</a></p>

<h2 id="include-examples-and-visuals">Include examples and visuals</h2>

<p>To enhance understanding, provide real-world examples that demonstrate how to use your product effectively. Show practical scenarios or use cases that align with your target audience’s needs. Additionally, incorporate visuals such as screenshots, diagrams, or illustrations to complement the text and make complex concepts easier to grasp.</p>

<h3 id="example-3">Example</h3>

<p><img src="/assets/img/uploads/screely-1689897994326.jpeg" alt="" /></p>

<p>Lemon Squeezy has beautifully designed docs with plenty of videos and images to help compliment the various topics of getting your store up and running.</p>

<p><a href="https://docs.lemonsqueezy.com/help">Lemon Squeezy Docs →</a></p>

<h2 id="address-common-issues-and-troubleshooting">Address common issues and troubleshooting</h2>

<p>Anticipate potential challenges or questions that users may encounter while using your product. Provide troubleshooting tips, common error messages, and solutions to known issues. Including a dedicated FAQ section or troubleshooting guide can greatly assist users in resolving problems on their own.</p>

<h3 id="example-4">Example</h3>

<p><img src="/assets/img/uploads/screely-1689898668666.jpeg" alt="" /></p>

<p>MailerLite does an excellent job with it’s FAQ-style documentation addressing common issues.</p>

<p><a href="https://www.mailerlite.com/help">MailerLite Docs →</a></p>

<h2 id="ask-for-user-feedback">Ask for user feedback</h2>

<p>Actively seek feedback from users to continuously improve your documentation. Include a feedback feature where users can report any inaccuracies, suggest improvements, or ask questions. This engagement with users fosters a sense of community and allows you to address their needs more effectively.</p>

<h3 id="example-5">Example</h3>

<p><img src="/assets/img/uploads/screely-1689899501710.jpeg" alt="" /></p>

<p>CloudFlare docs make it easy for users to give feedback, request a feature, or ask a question.</p>

<p><a href="https://developers.cloudflare.com/">CloudFlare Docs →</a></p>

<h2 id="keep-it-up-to-date">Keep it up-to-date</h2>

<p>Documentation should reflect the current state of your product. Regularly review and update your documentation as you release new features, make changes, or receive feedback from users. Consider adding a changelog to your documentation to provide specific details on each product release.</p>

<hr />

<p>By following these best practices, you can create comprehensive yet user-friendly documentation that effectively supports your product. Remember that <strong>documentation is an ongoing process</strong>, and it should evolve alongside your product’s development. Engage with your users, gather feedback, and continuously improve your documentation to provide the best possible experience.</p>

<p>If you’re looking for a great theme to build your documentation site with, consider <a href="/themes/docuhub">DocuHub</a> or <a href="/themes/guidepost">GuidePost</a>. These themes provide a seamless user experience for presenting your product docs.</p>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[Writing effective documentation for your product is an essential part of the development process. Good documentation helps users understand how to use your product, troubleshoot any issues they may encounter, and even contribute to its development.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-documentation.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-documentation.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Self-Hosted Ghost Install: Fixing Failed to Restart Nginx Error</title><link href="https://layeredcraft.com/blog/self-hosted-ghost-install-fixing-failed-to-restart-nginx/" rel="alternate" type="text/html" title="Self-Hosted Ghost Install: Fixing Failed to Restart Nginx Error" /><published>2023-06-26T21:41:03+00:00</published><updated>2023-06-26T21:41:03+00:00</updated><id>https://layeredcraft.com/blog/self-hosted-ghost-install-fixing-failed-to-restart-nginx</id><content type="html" xml:base="https://layeredcraft.com/blog/self-hosted-ghost-install-fixing-failed-to-restart-nginx/"><![CDATA[<p>When installing a new instance of Ghost on a <a href="/digital-ocean">Digital Ocean</a> droplet (or other self-hosting), you may encounter the following error toward the end of the automated installation steps:</p>

<h2 id="the-error">The Error</h2>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>✖ Setting up SSL
One or more errors occurred.

1<span class="o">)</span> CliError

Message: Failed to restart Nginx.

Debug Information:
    OS: Ubuntu, v22.04.2 LTS
    ...
</code></pre></div></div>

<h2 id="debugging">Debugging</h2>

<p>To debug the issue, let’s look at the SSL certificate that Ghost has generated for our site. In the terminal for our server, running the following command will list the SSL certificates:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">ls</span> /etc/letsencrypt
</code></pre></div></div>

<p>You may notice that the folder with your certificate has been generated as <code class="language-plaintext highlighter-rouge">example.com_ecc</code> (where example.com is your domain name). ECC (elliptical curve cryptography) refers to the algorithm that the SSL certificate uses.</p>

<p>Due to a bug when the Ghost installer generates the Nginx config for your site, it does not include the <code class="language-plaintext highlighter-rouge">_ecc</code> part of the path to the certificate folder.</p>

<h2 id="the-solution">The Solution</h2>

<p>Not to fear, we can easily fix this with the following commands:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd</span> /etc/nginx/sites-available
</code></pre></div></div>

<p>Locate the file for your site: <code class="language-plaintext highlighter-rouge">example.com-ssl.conf</code> (where example.com is your domain name)</p>

<p>Update the paths on lines starting with: <strong>ssl_certificate</strong> by adding <code class="language-plaintext highlighter-rouge">_ecc</code>:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssl_certificate /etc/letsencrypt/example.com_ecc/fullchain.cer<span class="p">;</span>
ssl_certificate_key /etc/letsencrypt/example.com_ecc/vanthletic.com.key<span class="p">;</span>
</code></pre></div></div>

<p>Lastly, let’s restart Ngnix and we should be back in business:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>service ngnix restart
</code></pre></div></div>

<p>In a nutshell, if you come across the <strong>Failed to Restart Nginx</strong> error while installing Ghost on a self-hosted environment like Digital Ocean, don’t panic! Just follow these steps:</p>

<ol>
  <li>Check the SSL certificate Ghost generated for your site</li>
  <li>Locate the Nginx configuration file and add <code class="language-plaintext highlighter-rouge">_ecc</code> to the paths</li>
  <li>Restart Nginx.</li>
</ol>

<p>Voila! Your Ghost installation will be back up and running smoothly. Happy writing!</p>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[Setting up a self-hosted Ghost installation is a great option for many Ghost users. However, one common issue that may arise is the 'Failed to Restart Nginx' error. In this blog post, we'll explore the causes behind this error and the easy solution to fix it, allowing you to get your self-hosted Ghost installation up and running seamlessly.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-nginx-error.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-nginx-error.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">How to Open External Links in a New Tab in Ghost</title><link href="https://layeredcraft.com/blog/how-to-open-external-links-in-a-new-tab-in-ghost/" rel="alternate" type="text/html" title="How to Open External Links in a New Tab in Ghost" /><published>2023-01-17T18:03:38+00:00</published><updated>2023-01-17T18:03:38+00:00</updated><id>https://layeredcraft.com/blog/how-to-open-external-links-in-a-new-tab-in-ghost</id><content type="html" xml:base="https://layeredcraft.com/blog/how-to-open-external-links-in-a-new-tab-in-ghost/"><![CDATA[<h2 id="the-default-behavior">The Default Behavior</h2>

<p>By default, <a href="https://layeredcraft.com/ghost">Ghost</a> opens all links in the same tab, including external links. This behavior can be suboptimal as it can easily disrupt the user experience and make it harder for readers to return to the content they were just reading.</p>

<h2 id="the-solution">The Solution</h2>

<p>Instead of modifying the template files directly, we can use the <strong>Code Injection</strong> feature in Ghost to achieve the desired behavior. Follow these steps:</p>

<ol>
  <li>Log in to your Ghost admin panel.</li>
  <li>Navigate to the <strong>Code Injection</strong> section under the <strong>Settings</strong> menu.</li>
  <li>In the <strong>Site Header</strong> section, insert the following JavaScript code snippet:</li>
</ol>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&lt;</span><span class="nx">script</span><span class="o">&gt;</span>
  <span class="nb">document</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">"</span><span class="s2">DOMContentLoaded</span><span class="dl">"</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
    <span class="kd">const</span> <span class="nx">links</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelectorAll</span><span class="p">(</span><span class="dl">"</span><span class="s2">a</span><span class="dl">"</span><span class="p">);</span>
    <span class="nx">links</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">link</span><span class="p">)</span> <span class="p">{</span>
      <span class="k">if</span> <span class="p">(</span><span class="nx">link</span><span class="p">.</span><span class="nx">host</span> <span class="o">!==</span> <span class="nb">window</span><span class="p">.</span><span class="nx">location</span><span class="p">.</span><span class="nx">host</span><span class="p">)</span> <span class="p">{</span>
        <span class="nx">link</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">"</span><span class="s2">target</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">_blank</span><span class="dl">"</span><span class="p">);</span>
      <span class="p">}</span>
    <span class="p">});</span>
  <span class="p">});</span>
<span class="o">&lt;</span><span class="sr">/script</span><span class="err">&gt;
</span></code></pre></div></div>

<p>Now, all external links will automatically open in a new tab, you can test the behavior by clicking on an external link anywhere on your site to confirm that it opens in a new tab.</p>

<p>Happy Linking! 🔗</p>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[A good practice for enhancing the reading experience on any blog is to consider how external links are handled. By default, Ghost opens all links in the same tab, potentially diverting readers away from your website. In this article, we'll explore a simple JavaScript solution that allows you to open external links in a new tab without modifying any template files directly.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-external-links.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-external-links.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">5 Privacy-Friendly Analytics Platforms for Ghost</title><link href="https://layeredcraft.com/blog/5-privacy-friendly-analytics-platforms-for-ghost/" rel="alternate" type="text/html" title="5 Privacy-Friendly Analytics Platforms for Ghost" /><published>2022-09-21T01:30:00+00:00</published><updated>2022-09-21T01:30:00+00:00</updated><id>https://layeredcraft.com/blog/5-privacy-friendly-analytics-platforms-for-ghost</id><content type="html" xml:base="https://layeredcraft.com/blog/5-privacy-friendly-analytics-platforms-for-ghost/"><![CDATA[<h2 id="why-use-a-privacy-friendly-analytics-platform">Why Use A Privacy-Friendly Analytics Platform?</h2>

<p>Analytics tools are essential for understanding how much traffic your Ghost site is receiving and providing insights on how visitors are experiencing your site. Most analytics platforms (such as Google Analytics) collect a ton of personal data about visitors, leaving us all wondering if and when our data will be sold or exploited. Platforms like Google Analytics can also be frustrating to use and slow down your page load speeds.</p>

<p>You can get all of the valuable insights you need about your visitors without your analytics platform tracking, collecting and selling their data. Even better, the 5 platforms below feature beautiful dashboards that display your analytics in clear and concise way along with features that can help you improve the experience for your visitors.</p>

<h2 id="fathom-analytics"><a href="https://layeredcraft.com/fathom">Fathom Analytics</a></h2>

<p>Fathom Analytics is a lightweight analytics tool that promotes its commitment to privacy and simplicity. Fathom does not store any cookies for the visitors of your site and has a beautiful dashboard that displays all of the most important metrics and custom events.</p>

<p><img src="/assets/img/uploads/fathom.jpg" alt="" /></p>

<p>👉 <a href="https://app.usefathom.com/share/deasaicp/hilarious+platypus">View a live demo</a></p>

<h4 id="why-ghost-users-love-it">Why Ghost users love it:</h4>

<p>Fathom Analytics is easy to integrate with any Ghost site and is fully compliant with <a href="https://gdpr.eu/">GDPR</a>, <a href="https://oag.ca.gov/privacy/ccpa">CCPA</a>, <a href="https://www.eprivacy.eu/home/">ePrivacy</a>, <a href="https://ico.org.uk/for-organisations/guide-to-pecr/">PECR</a>, and <a href="https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule">COPPA</a>. Custom event tracking is also supported so you can track important events that happen on your site such as clicking specific buttons or submitting a <a href="https://layeredcraft.com/blog/5-contact-form-options-for-ghost-and-how-to-use-them/">contact form</a>. Fathom also offers the option to make your dashboard public which is great if you’re running an <a href="https://openstartuplist.com/">open startup</a> or just looking to be transparent about your analytics.</p>

<p>Fathom’s pricing starts at <strong>$11 per month</strong> for up to 100,000 page views per month and can be used on unlimited websites.</p>

<div class="hint-box">
⚡️ If you use our <a href="https://layeredcraft.com/fathom" target="_blank">referral link</a> to sign up to Fathom Analytics you’ll receive a $10 discount on your first month.
</div>

<h2 id="simple-analytics"><a href="https://www.simpleanalytics.com/">Simple Analytics</a></h2>

<p>Simple Analytics is another fully privacy-compliant analytics platform. It features a clean and powerful dashboard that clearly displays all of your essential metrics with the addition of enriched metrics for referral traffic from sources like Google (with screenshots of referring websites) and Twitter (with embedded previews of referring tweets).</p>

<p><img src="/assets/img/uploads/simple-analytics.jpg" alt="" /></p>

<p>👉 <a href="https://simpleanalytics.com/simpleanalytics.com">View a live demo</a></p>

<h4 id="why-ghost-users-love-it-1">Why Ghost users love it:</h4>

<p>Switching from Google Analytics is streamlined with Simple Analytics using their option to import all of your Google Analytics data with a few clicks. View your dashboard on the go with a fully mobile-friendly interface that’s also available in light and dark modes. In addition, you can set up automated email reports sent to you on a weekly or monthly basis.</p>

<p>Simple Analytics pricing starts at <strong>$9 per month</strong> for up to 100,000 page views per month and can be used with up to 10 websites.</p>

<h2 id="plausible-analytics"><a href="https://plausible.io/">Plausible Analytics</a></h2>

<p>Plausible is a fully open-source analytics platform built for ethically and privacy-conscious site owners. With unique features such as Slack notifications for traffic spikes, organic search query reports and a powerful API, makes Plausible a great choice for basic to advanced use cases.</p>

<p><img src="/assets/img/uploads/plausible-analytics.jpg" alt="" /></p>

<p>👉 <a href="https://plausible.io/plausible.io">View a live demo</a></p>

<h4 id="why-ghost-users-love-it-2">Why Ghost users love it:</h4>

<p>Like Ghost itself, Plausible Analytics is completely <a href="https://plausible.io/open-source-website-analytics">open source</a> with all of its code available on GitHub and can even be self-hosted on your own server. There is also a <a href="https://plausible.io/roadmap">public roadmap</a> driven by the features suggested by the community members.</p>

<p>Plausible Analytics pricing starts at <strong>$9 per month</strong> for up to 10,000 page views per month and can be used with up to 50 websites.</p>

<h2 id="splitbee"><a href="https://splitbee.io/">Splitbee</a></h2>

<p>Splitbee is an analytics &amp; conversion platform that helps you track visitors and optimize your site with a powerful set of tools and automation features. Not to mention it has a beautiful interface, cookie-free tracking code option for privacy and a very active development team that delivers new features and improvements regularly.</p>

<p><img src="/assets/img/uploads/splitbee.jpg" alt="" /></p>

<p>👉 <a href="https://app.splitbee.io/public/react-hot-toast.com">View a live demo</a></p>

<h4 id="why-ghost-users-love-it-3">Why Ghost users love it:</h4>

<p>The ability to create powerful automations such as <a href="https://splitbee.io/docs/collect-emails-in-notion-using-html-form">saving email signups to Notion</a> or run A/B testing by splitting traffic between multiple pages is especially useful to help extend the built-in functionality of Ghost.</p>

<p>Splitbee is free for up to 2,500 page views and events per month while pricing for a pro plan starts at <strong>$11 per month</strong> for 25,000 page views and events per month.</p>

<h2 id="pirsch-analytics"><a href="https://pirsch.io/">Pirsch Analytics</a></h2>

<p>Pirsch is another simple, cookie-free, and open-source web analytics solution that easily integrates into Ghost. It’s extremely lightweight at just under 2kb, which will have minimal effects on your site’s load time.</p>

<p><img src="/assets/img/uploads/pirsch-analytics.jpg" alt="" /></p>

<p>👉 <a href="https://pirsch.pirsch.io/?domain=pirsch.io&amp;interval=month&amp;scale=day">View a live demo</a></p>

<h4 id="why-ghost-users-love-it-4">Why Ghost users love it:</h4>

<p>Pirsch Analytics has a unique feature that lets you <a href="https://docs.pirsch.io/advanced/embedding">embed your analytics dashboard</a> anywhere, including a page within your Ghost site! This makes it super convenient to check up on your analytics without leaving your website.</p>

<p>Pirsch Analytics pricing starts at <strong>$5 per month</strong> for up to 10,000 page views per month and can be used on unlimited websites.</p>

<h2 id="head-to-head-comparison"><strong>Head-to-Head Comparison</strong></h2>

<table>
  <thead>
    <tr>
      <th> </th>
      <th>Fathom</th>
      <th>Simple Analytics</th>
      <th>Plausible</th>
      <th>Splitbee</th>
      <th>Pirsch</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Privacy Compliant</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
    </tr>
    <tr>
      <td>Open Source</td>
      <td>➖</td>
      <td>➖</td>
      <td>✔️</td>
      <td>➖</td>
      <td>✔️</td>
    </tr>
    <tr>
      <td>Event Tracking</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
    </tr>
    <tr>
      <td>Data Export Option</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>➖</td>
      <td>✔️</td>
    </tr>
    <tr>
      <td>Data Retention</td>
      <td>Forever</td>
      <td>Forever</td>
      <td>Forever</td>
      <td>2 years</td>
      <td>Forever</td>
    </tr>
    <tr>
      <td>Free Plan</td>
      <td>➖</td>
      <td>➖</td>
      <td>➖</td>
      <td>✔️</td>
      <td>➖</td>
    </tr>
    <tr>
      <td>Free Trial</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>✔️</td>
      <td>➖</td>
      <td>✔️</td>
    </tr>
    <tr>
      <td>Pricing</td>
      <td>$11/mo.</td>
      <td>$9/mo.</td>
      <td>$9/mo.</td>
      <td>$11/mo.</td>
      <td>$5/mo.</td>
    </tr>
  </tbody>
</table>

<ul>
  <li>Pricing is shown when billed yearly.</li>
</ul>

<p>How have you setup privacy-friendly analytics for your <a href="https://layeredcraft.com/ghost">Ghost</a> blog? Did we miss a platform that you’d like to see? Tweet us <a href="https://twitter.com/layeredcraft">@layeredcraft</a>!</p>]]></content><author><name>eric_alli</name></author><category term="analytics" /><summary type="html"><![CDATA[Looking to ditch those pesky cookie consent banners? Let's take a look at 5 lean and transparent analytics platforms to create a more privacy-friendly experience for your visitors.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-analytics-2x.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-analytics-2x.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Generate Stunning Social Media Images For Your Ghost Blog Posts with Placid</title><link href="https://layeredcraft.com/blog/generate-stunning-social-media-images-for-your-ghost-blog-posts-with-placid/" rel="alternate" type="text/html" title="Generate Stunning Social Media Images For Your Ghost Blog Posts with Placid" /><published>2022-09-13T00:56:51+00:00</published><updated>2022-09-13T00:56:51+00:00</updated><id>https://layeredcraft.com/blog/generate-stunning-social-media-images-for-your-ghost-blog-posts-with-placid</id><content type="html" xml:base="https://layeredcraft.com/blog/generate-stunning-social-media-images-for-your-ghost-blog-posts-with-placid/"><![CDATA[<p>We’ll be using a service called <a href="https://layeredcraft.com/placid">Placid</a>, a creative automation toolkit to generate beautiful and contextual open graph images.</p>

<h2 id="what-is-open-graph">What is Open Graph?</h2>

<p><a href="https://ogp.me/">Open Graph</a> is a standardized way of defining metadata within a webpage to represent the content of a page. Open Graph tags are defined in the <code class="language-plaintext highlighter-rouge">&lt;head&gt;</code> section of a page with four basic tags that are required, these tags are: <code class="language-plaintext highlighter-rouge">og:title</code>, <code class="language-plaintext highlighter-rouge">og:type</code>, <code class="language-plaintext highlighter-rouge">og:image</code>, and <code class="language-plaintext highlighter-rouge">og:url</code>.</p>

<p>When sharing your website on social media platforms, open graph tags are parsed and used to generate previews such as Twitter cards, Facebook link previews and many others. Most social networks adhere to the basics of open graph standards, while a few of them also include their own extra tags to help customize the look and feel within their ecosystem.</p>

<p>You can view what some of the generated previews for open graph tags look for any website by using a tool such as <a href="http://opentags.io">opentags.io</a>. For example, here’s what the open graph tags look like for <a href="https://opentags.io/url/http:%20%20layeredcraft.com">layeredcraft.com</a>:</p>

<p><img src="/assets/img/uploads/blog-og-1.jpg" alt="" title="LayeredCraft’s Meta Tags " /></p>

<h2 id="ghost-and-open-graph">Ghost and Open Graph</h2>

<p>When using Ghost, open graph tags are automatically generated for each of your posts using the post’s title, featured image and URL. These tags can be overridden using the following options found in the sidebar when editing a post:</p>

<p><img src="/assets/img/uploads/blog-og-2.jpg" alt="" /></p>

<p>Using <a href="http://opentags.io/">opentags.io</a>, we can enter the URL to this post and look at an example of what sharing this post on social media looks like with the default-generated open graph tags:</p>

<p><img src="/assets/img/uploads/blog-og-3.jpg" alt="" width="516" /></p>

<p>While this is a good start, It’s important to make your content distinguishable and typically featured images don’t provide much context about the post — in most cases, it’s just a plain image. Now here’s an example of that same post with a custom-generated open graph image using Placid:</p>

<p><img src="/assets/img/uploads/blog-og-4.jpg" alt="" width="519" /></p>

<p>Much better! This custom generated image shows not only the featured blog post image, but also the URL, post title, author and reading time. Sure, you could manually design a custom image for each of your blog posts manually, but that can be a tedious and time consuming process that we can fully automate using Placid. Let’s learn how to do that next.</p>

<h2 id="step-1-setting-up-placid">Step 1: Setting Up Placid</h2>

<p>Let’s get started by heading over to <a href="https://layeredcraft.com/placid">placid.app</a> and signing up for an account.</p>

<p>👉 <a href="https://placid.app/register?friend=layeredcraft">Create a Placid account</a></p>

<p>In the setup screen, enter the name of your Ghost website, select the <strong>Ghost</strong> option and then <strong>Create Project</strong>.</p>

<p><img src="/assets/img/uploads/blog-og-5.jpg" alt="" /></p>

<p>After that, you’ll be redirected to the Placid dashboard. Here is where you can design templates that auto-generated images will use, setup actions that will get triggered when you create a blog post in Ghost, manually generate images and view logs of past images generated.</p>

<p>Next, let’s setup our first template by clicking the <strong>+ Create Template</strong> button.</p>

<p>Here we can select from a library of pre-made templates (which can be edited) or create a custom one from scratch. using their editor. Let’s select the <strong>Open Graph</strong> filter from the sidebar and pick a pre-made template then click the <strong>+ Create</strong> button.</p>

<p><img src="/assets/img/uploads/blog-og-6.jpg" alt="" /></p>

<p>You’ll be redirected to the template editor where you can fully customize any template. If you’re familiar with any image editing or design software, the interface should feel quite familiar. But essentially click on any element in the design or select a layer from the <strong>Layers</strong> panel on the top right. All of the element’s properties will be displayed below the layers panel where you can fine-tune them.</p>

<p>Feel free to move elements around, resize text and change the font for starters. Here’s what mine looks like after a few edits:</p>

<div class="hint-box">
<b>Note:</b> Templates only represent the design and text/image elements can act as placeholders (such as the title, author, etc) that will get replaced by the content of a blog post once we setup the automation in later steps. Be mindful of layer names and feel free to hover and rename to help later identify them.
</div>

<p>Once you’re finished editing, click the Save button on the top right to save your design then the X to navigate back to the dashboard.</p>

<h2 id="step-2-placid-and-ghost-integration">Step 2: Placid and Ghost Integration</h2>

<p>Placid works by connecting to your Ghost blog so that each time you publish a post in Ghost, Placid will get notified about that post and use the template we just created to generate our open graph image. There will be a little back and forth between Placid and your Ghost blog, so i’d suggest having both your Ghost admin panel and Placid dashboard open in your browser.</p>

<p>Let’s start by navigating to the <strong>Project Settings</strong> page from your Placid dashboard and under the <strong>Integration Settings</strong> area select the <strong>Ghost</strong> tab.</p>

<p><img src="/assets/img/uploads/blog-og-7.jpg" alt="" /></p>

<p>Copy the Webhook URL then head over to your Ghost admin panel. From here navigate to <strong>Settings &gt; Integrations</strong> and click <strong>+ Add custom integration</strong> button at the bottom. Type in “Placid” as the name and click Create.</p>

<p><img src="/assets/img/uploads/blog-og-8.jpg" alt="" /></p>

<p>Next, on our Placid integration page, click the <strong>+ Add webhook</strong> button and set the following fields:</p>

<ul>
  <li><strong>Name:</strong> Post webhook</li>
  <li><strong>Event:</strong> Post updated</li>
  <li><strong>Target URL:</strong> Paste the Webhook URL you copied from the Placid integration page</li>
</ul>

<p><img src="/assets/img/uploads/blog-og-9.jpg" alt="" /></p>

<p>Click Create to finish up. Next, copy the Admin API key and API URL head back over the Placid integrations page and paste them into the Ghost Admin API Key field and Ghost API URL respectively.</p>

<video controls="">
  <source src="/assets/img/uploads/blog-og-10.mp4" type="video/mp4" />
</video>

<p>In the final step, we’ll setup the automation that generates a custom open graph image each time we create or update a post in Ghost. Let’s go!</p>

<h2 id="step-3-let-the-automation-begin">Step 3: Let The Automation Begin!</h2>

<p>From the Placid dashboard, click on <strong>Actions</strong> in the left sidebar then <strong>+ Add Action.</strong> You can start with the following settings:</p>

<ul>
  <li><strong>Action title:</strong> Blog Post - Open Graph Image</li>
  <li><strong>Action interval:</strong> Continuous</li>
  <li><strong>Content type:</strong> Post</li>
</ul>

<p><img src="/assets/img/uploads/blog-og-11.jpg" alt="" /></p>

<p>In step 3 for Set up template &amp; input fields, here is where we can map the values from our Ghost blog posts to the layers in our template that we need to replace. Here’s a short clip on how to do so:</p>

<video controls="">
  <source src="/assets/img/uploads/blog-og-12.mp4" type="video/mp4" />
</video>

<p><img src="/assets/img/uploads/blog-og-13.jpg" alt="" /></p>

<p>Click the Create Action button to finish up.</p>

<h2 id="step-4-test-it-all-out">Step 4: Test It All Out</h2>

<p>Let’s see how this all works by testing it out. The easiest way to test is to simply navigate to your Ghost admin panel and create a new post or edit any existing post.</p>

<p>Save or update any part of the post and after a few seconds refresh the page, open the <strong>Post settings sidebar</strong> and click on the <strong>Twitter card</strong> or <strong>Facebook card.</strong> You should see your shiny generated open graph image!</p>

<p><img src="/assets/img/uploads/blog-og-14.jpg" alt="" /></p>

<p>There are endless possibilities of what you can do with Placid and Ghost by generating all kinds of graphics from your blog posts. Hope this guide helps spark some ideas for you!</p>

<p>If you have any questions or if you’ve successfully setup Placid + Ghost integration, we’d love to hear about it! Tweet us <a href="https://twitter.com/layeredcraft">@layeredcraft</a>!</p>]]></content><author><name>eric_alli</name></author><category term="placid," /><category term="open" /><category term="graph," /><category term="social," /><category term="marketing" /><summary type="html"><![CDATA[In this guide, I’ll show you a fully automated way to generate eye-catching social media graphics and drive more traffic to your Ghost blog posts with absolutely no coding required.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-og-featured.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-og-featured.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Change Your Domain Name (URL) Without Affecting SEO Rankings (8 Steps + Checklist)</title><link href="https://layeredcraft.com/blog/change-domain-name-seo/" rel="alternate" type="text/html" title="Change Your Domain Name (URL) Without Affecting SEO Rankings (8 Steps + Checklist)" /><published>2022-06-30T17:27:26+00:00</published><updated>2022-06-30T17:27:26+00:00</updated><id>https://layeredcraft.com/blog/change-domain-name-seo</id><content type="html" xml:base="https://layeredcraft.com/blog/change-domain-name-seo/"><![CDATA[<p>But before we dive in, let’s consider a few reasons why someone would want a to change their domain name in the first place:</p>

<h2 id="why-change-your-domain-name">Why Change Your Domain Name</h2>

<h3 id="a-better-domain-name-becomes-available">A better domain name becomes available</h3>

<p>One of the main reasons to change a domain name is if a better one becomes available. For example, if you don’t have the top-level <strong>.com</strong> domain that exactly matches the name of your product, company or app this could be a good time to make a change.</p>

<h3 id="your-current-domain-name-doesnt-reflect-your-brand">Your current domain name doesn’t reflect your brand</h3>

<p>Another reason to make a change is that you pivoted your offerings/services and your domain name is no not as relevant or helpful in distinguishing your product and business in the marketplace.</p>

<h3 id="you-want-to-rebrand-your-company-or-app">You want to rebrand your company or app</h3>

<p>In some cases, you just may want to change your site’s entire name and branding in which changing your domain to match is a necessary step to complete the transition.</p>

<p><strong>If you do decide to change your domain name, you can keep your search engine rankings with these domain change best-practices:</strong></p>

<h2 id="steps-for-changing-your-domain-name">Steps for Changing Your Domain Name</h2>

<p>Once you’ve decided to change your domain name, here are my 8 essential steps for easing the transition and sparing your hard-earned SEO:</p>

<h3 id="step-1-prepare-your-new-domain">Step 1: Prepare your new domain</h3>

<p>The first step in transitioning to a new domain name is to prepare and deploy your website on your new domain name. If possible, maintain the same URL structure used on your old domain name as this will help streamline the redirection process.</p>

<p><img src="/assets/img/uploads/screen-shot-2022-07-01-at-1.20.05-am.png" alt="" /></p>

<h3 id="step-2-update-robotstxt-and-sitemapxml">Step 2: Update robots.txt and sitemap.xml</h3>

<p>Another crucial step when changing domains is to ensure your robots.txt and sitemap.xml files are updated with your new domain name. This helps search engines crawl all your pages and index your site properly.</p>

<p>For updating your robots.txt file, check out <a href="https://developers.google.com/search/docs/advanced/robots/submit-updated-robots-txt">this guide</a>.</p>

<p>For updating your sitemaps.xml file, check out <a href="https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap">this guide</a>.</p>

<h3 id="step-3-implement-redirects-from-the-old-domain-to-the-new-one">Step 3: Implement redirects from the old domain to the new one</h3>

<p>Implementing proper permanent (301) redirects from your old website URLs to new domain name is an essential step. Redirects help Google and other search engines to understand that your website content has moved to a different domain and to update its index accordingly.</p>

<p>Ideally, if you’ve kept the same URL structure you can use a “wild card” redirect which makes each page/post/file point to its new location on your new domain name. Here’s a helpful guide in doing so:</p>

<p>👉 <a href="https://developers.google.com/search/docs/advanced/crawling/301-redirects#serverside">Redirects and Google Search</a></p>

<p>After your redirects are setup you can use a tool such as <a href="https://httpstatus.io/">httpstatus.io</a> and test that everything is redirecting as expected:</p>

<p><img src="/assets/img/uploads/screen-shot-2022-06-30-at-8.02.17-pm.png" alt="" /></p>

<h3 id="step-4-tell-google-about-the-domain-change-using-gsc">Step 4: Tell Google about the domain change using GSC</h3>

<p>Use Google Search Console (GSC), a completely free SEO tool provided by Google to initiate a change of address. This helps Google know that you are updating your domain name:</p>

<p>👉 <a href="https://support.google.com/webmasters/answer/9370220">Google Search Console - Change of Address Tool</a></p>

<p><img src="/assets/img/uploads/screen-shot-2022-06-30-at-8.06.38-pm.png" alt="" /></p>

<h3 id="step-5-monitor-your-website-analytics">Step 5: Monitor your website analytics</h3>

<p>With the domain change complete, it’s time to double-check that everything is working as expected.</p>

<p>Monitor your website analytics for any errors on your new domain name and to confirm redirects are working correctly. I use (and highly) recommend <a href="https://layeredcraft.com/fathom">Fathom Analytics</a> for their privacy-focused approach to analytics that don’t require you to show any consent warnings on your website.</p>

<h3 id="step-6-update-backlinks">Step 6: Update backlinks</h3>

<p>Generate a backlink report using an SEO tool such as Ahrefs and contact any websites that link to your old domain name. Prioritize your backlink list by traffic volume and kindly contact the owners of other sites linking to your old domain and ask them to update the link to reflect your new domain name.</p>

<h3 id="step-7-inform-users-about-the-change">Step 7: Inform users about the change</h3>

<p>Last and most importantly, be sure to be transparent and inform customers during the transition to your new domain name.</p>

<p><img src="/assets/img/uploads/screen-shot-2022-06-30-at-4.29.21-pm.png" alt="" /></p>

<p>You can approach this in a few ways:</p>

<ol>
  <li>Create a temporary announcement bar the the top of your website</li>
  <li>Post on your social media accounts announcing the change</li>
  <li>Write a blog post detailing why you decided to change your name and how it may impact your users</li>
  <li>Send an email to your newsletter subscribers</li>
</ol>

<h3 id="step-8-post-migration-tasks-to-consider">Step 8: Post-migration tasks to consider</h3>

<ol>
  <li>Consider migrating your email address(es) from name@olddomain.com to name@newdomain.com for consistency</li>
  <li>Update the name and URLs in all of your social media account profiles</li>
  <li>Update any advertising campaigns you have running to reflect your new name</li>
  <li>Keep your old domain up for a least 2-3 months – just for the 301 redirects</li>
</ol>

<p>A month after changing domain names I’ve noticed almost zero loss in SEO traffic and sales. To make it even easier, I’ve created a free checklist you can use to ensure you’re doing things in the correct order without missing any steps.</p>

<h2 id="download-the-free-checklist">Download the Free Checklist</h2>

<p>Enter your email below and get an instant link to my free domain name change checklist in <a href="https://www.notion.so/">Notion</a>.</p>

<div class="lead-magnet">
<script>
    (function(w,d,e,u,f,l,n){w[f]=w[f]||function(){(w[f].q=w[f].q||[])
    .push(arguments);},l=d.createElement(e),l.async=1,l.src=u,
    n=d.getElementsByTagName(e)[0],n.parentNode.insertBefore(l,n);})
    (window,document,'script','https://assets.mailerlite.com/js/universal.js','ml');
    ml('account', '457103');
</script>

  <img src="/assets/img/uploads/screely-1656702458612.jpg" />
  <div class="ml-embedded" data-form="g5hUxp"></div>
</div>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[Changing the name of your website can be a complicated and stressful task, I recently went through this myself when changing this website’s name. But fear not, in this guide I’ll explore the 8 steps I’ve discovered to ease the transition.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-change-domain.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-change-domain.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">A New Beginning: T2Themes is now LayeredCraft</title><link href="https://layeredcraft.com/blog/a-new-beginning-t2themes-is-now-layeredcraft/" rel="alternate" type="text/html" title="A New Beginning: T2Themes is now LayeredCraft" /><published>2022-05-02T15:59:54+00:00</published><updated>2022-05-02T15:59:54+00:00</updated><id>https://layeredcraft.com/blog/a-new-beginning-t2themes-is-now-layeredcraft</id><content type="html" xml:base="https://layeredcraft.com/blog/a-new-beginning-t2themes-is-now-layeredcraft/"><![CDATA[<h2 id="where-ive-been">Where I’ve Been</h2>

<p>In 2008 I started building simple HTML themes and selling them on an up-and-coming marketplace called <a href="https://themeforest.net/user/layeredcraft">ThemeForest</a>. It was a slow but steady growth for the next four years, but shortly after venturing into making WordPress themes, in 2012 I hit the <strong>magical 100k ARR</strong> and sustained it for the next three years.</p>

<p><img src="/assets/img/uploads/arr_chart.png" alt="Annual Recurring Revenue (ARR)" title="Annual Recurring Revenue (ARR)" /></p>

<p>WordPress was been extremely good to me, offering immense opportunities for themes, client work and beyond. But as WordPress evolved, its alignment with my philosophy of minimal yet functional themes became at odds. The market demanded that WordPress themes have extensive 3rd party admin panels with endless configuration options that pushed WordPress beyond its limits.</p>

<p>So after being dormant and not producing any WordPress themes for the next several years, enter <a href="/ghost">Ghost</a>.</p>

<h2 id="what-im-up-to">What I’m Up To</h2>

<p>Ghost has been on my radar since it entered the scene on <a href="https://www.kickstarter.com/projects/johnonolan/ghost-just-a-blogging-platform">Kickstarter</a> back in 2013 – I was a backer since then and my fondness has only grown over the years. Ghost promised to go in the direction that I wish WordPress would have but never could, a simple vision with meticulous execution. But being so early on, there was little opportunity for growing a theme shop from just Ghost themes…yet.</p>

<blockquote>
  <p>Ghost promised to go in the direction that I wish WordPress would have but never could, a simple vision with meticulous execution</p>
</blockquote>

<p>In 2019, as Ghost hit a new level of growth, with an ARR of 1mil+, extensive developer guides and a thriving community – now was the time to strike. I released my <a href="/themes/dandelion">first Ghost theme</a> in May 2019 and it was off to the races from there.</p>

<h2 id="where-im-going">Where I’m Going</h2>

<p>Since releasing that first Ghost theme, I continued to put out three more <a href="/themes">themes</a> over the next year and began regaining some traction in sales and revenue, however, I still viewed it as a weekend project at best and did the bare minimum for marketing and new theme development.</p>

<p>Fast forward to the present, Ghost is continuing to grow exponentially and after my <a href="https://ericalli.com/about">15+ years</a> of working with startups, fortune 500 companies and building products for others, I’m more motivated than ever to pour my experience into a bootstrapped company of my own within the Ghost ecosystem.</p>

<p>Introducing <strong>LayeredCraft</strong>.</p>

<p>I’m building LayeredCraft from the ground up, including this shiny new website, updating all of my previously released Ghost themes and creating a roadmap of exciting things to come. My plan is to get back to that magical 100k ARR and beyond 🚀</p>

<p>So stick around for new Ghost themes, tutorials, and tons of free resources to help with all of your Ghost endeavors. In addition, I’ll be sharing the entire journey of building and scaling this bootstrapped company and I hope that you <a href="https://twitter.com/ericalli">join me</a> on this next phase!</p>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[After almost 15 years of making themes, T2Themes is getting an extensive revamp including a fresh new look, name and an exciting roadmap for the future.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-revamp@2x.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-revamp@2x.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">3 Ways to Integrate Disqus Comments with Ghost</title><link href="https://layeredcraft.com/blog/3-ways-to-integrate-disqus-comments-with-ghost/" rel="alternate" type="text/html" title="3 Ways to Integrate Disqus Comments with Ghost" /><published>2021-05-17T22:46:15+00:00</published><updated>2021-05-17T22:46:15+00:00</updated><id>https://layeredcraft.com/blog/3-ways-to-integrate-disqus-comments-with-ghost</id><content type="html" xml:base="https://layeredcraft.com/blog/3-ways-to-integrate-disqus-comments-with-ghost/"><![CDATA[<p>There’s a good chance you’ve come across <a href="https://disqus.com/">Disqus</a> when browsing your favorite blog. Disqus is a feature-rich and free comment system that can easily be integrated into <a href="/ghost">Ghost</a> and allows you to embed comments within posts and pages with functionality like upvoting and Emoji reactions.</p>

<p>Setting up Disqus with your Ghost theme will involve modifying some code, although no major technical knowledge is required.</p>

<h2 id="before-we-get-started">Before We Get Started</h2>

<p>Before implementing any of the integration methods in this article, we’ll first need to take care of a few basic steps:</p>

<ol>
  <li>Signup for a Disqus account using the link below:
<a href="https://disqus.com/profile/signup/">https://disqus.com/profile/signup/</a></li>
  <li>Create a new site using the link below:
<a href="https://disqus.com/admin/create/">https://disqus.com/admin/create/</a></li>
  <li>Navigate to the <strong>Settings</strong> page and make note of your <strong>Shortname</strong> – we’ll need this later on.</li>
</ol>

<h2 id="method-1-the-basic-integration">Method 1: The Basic Integration</h2>

<p>The basic integration of Disqus will allow you to embed comments into any post or page within your Ghost site. It will live exactly where you place the embed code and immediately load comments when the page loads.</p>

<figure class="kg-card kg-image-card"><img src="/assets/img/uploads/ezgif.com-gif-maker-2.gif" class="kg-image" alt="" loading="lazy" width="800" height="567" /></figure>

<h3 id="step-1-copy-the-code-below">Step 1: Copy the code below</h3>

<p>This code block is the embed code we’ll be pasting into your theme.</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"disqus_thread"</span><span class="nt">&gt;&lt;/div&gt;</span>
<span class="nt">&lt;script&gt;</span>
  <span class="kd">var</span> <span class="nx">disqus_config</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">url</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">{{url absolute=</span><span class="dl">"</span><span class="kc">true</span><span class="dl">"</span><span class="s2">}}</span><span class="dl">"</span><span class="p">;</span>
    <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">identifier</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">ghost-{{comment_id}}</span><span class="dl">"</span>
  <span class="p">};</span>
  <span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
  <span class="kd">var</span> <span class="nx">d</span> <span class="o">=</span> <span class="nb">document</span><span class="p">,</span> <span class="nx">s</span> <span class="o">=</span> <span class="nx">d</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">'</span><span class="s1">script</span><span class="dl">'</span><span class="p">);</span>
  <span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
  <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-timestamp</span><span class="dl">'</span><span class="p">,</span> <span class="o">+</span><span class="k">new</span> <span class="nb">Date</span><span class="p">());</span>
  <span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">head</span> <span class="o">||</span> <span class="nx">d</span><span class="p">.</span><span class="nx">body</span><span class="p">).</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
  <span class="p">})();</span>
<span class="nt">&lt;/script&gt;</span>
</code></pre></div></div>

<h3 id="step-2-insert-comments-code-into-your-theme">Step 2: Insert comments code into your theme</h3>

<p>In your Ghost theme, open the template file where you want to insert Disqus comments – this is usually in a file named <code class="language-plaintext highlighter-rouge">post.hbs</code>. In Ghost’s default theme, Casper, you’ll notice a space specifically meant for inserting comments right after the content area:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{{!--
<span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">"article-comments gh-canvas"</span><span class="nt">&gt;</span>
    If you want to embed comments, this is a good place to paste your code!
<span class="nt">&lt;/section&gt;</span>
--}}
</code></pre></div></div>

<p>Here is where you’ll want to paste the code from Step 1. So the result should look like:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">"article-comments gh-canvas"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"disqus_thread"</span><span class="nt">&gt;&lt;/div&gt;</span>
  <span class="nt">&lt;script&gt;</span>
    <span class="kd">var</span> <span class="nx">disqus_config</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
      <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">url</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">{{url absolute=</span><span class="dl">"</span><span class="kc">true</span><span class="dl">"</span><span class="s2">}}</span><span class="dl">"</span><span class="p">;</span>
      <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">identifier</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">ghost-{{comment_id}}</span><span class="dl">"</span>
    <span class="p">};</span>
    <span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
    <span class="kd">var</span> <span class="nx">d</span> <span class="o">=</span> <span class="nb">document</span><span class="p">,</span> <span class="nx">s</span> <span class="o">=</span> <span class="nx">d</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">'</span><span class="s1">script</span><span class="dl">'</span><span class="p">);</span>
    <span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
    <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-timestamp</span><span class="dl">'</span><span class="p">,</span> <span class="o">+</span><span class="k">new</span> <span class="nb">Date</span><span class="p">());</span>
    <span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">head</span> <span class="o">||</span> <span class="nx">d</span><span class="p">.</span><span class="nx">body</span><span class="p">).</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
    <span class="p">})();</span>
  <span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;/section&gt;</span>
</code></pre></div></div>

<p>Make sure to remove the opening <code class="language-plaintext highlighter-rouge">{{!-–</code> and closing <code class="language-plaintext highlighter-rouge">--}}</code> comment tags.</p>

<h3 id="step-3-insert-your-disqus-shortname-into-the-code">Step 3: Insert your Disqus shortname into the code</h3>

<p>The final step is to insert your Disqus Shortname (the one we made note of earlier) into this line from the above code:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
</code></pre></div></div>

<p>Replace <code class="language-plaintext highlighter-rouge">SHORTNAME</code> with your Disqus shortname. Then save the file, zip and upload a copy of your theme, and restart Ghost. Disqus Comments should now load on your Post pages.</p>

<h2 id="method-2-the-click-to-load-integration">Method 2: The Click-to-load Integration</h2>

<p>The click-to-load integration of Disqus will allow your users to load comments only after clicking a button. This is a great option for those looking to improve page load speed and mobile experience.</p>

<figure class="kg-card kg-image-card"><img src="/assets/img/uploads/ezgif.com-gif-maker--1-.gif" class="kg-image" alt="" loading="lazy" width="800" height="567" /></figure>
<h3 id="step-1-copy-the-code-below-1">Step 1: Copy the code below</h3>

<p>This code block is the embed code we’ll be pasting into your theme.</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"javascript:;"</span> <span class="na">class=</span><span class="s">"load-disqus"</span><span class="nt">&gt;</span>
  Load comments
<span class="nt">&lt;/a&gt;</span>
<span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"disqus_thread"</span><span class="nt">&gt;&lt;/div&gt;</span>
<span class="nt">&lt;script&gt;</span>
    <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">.load-disqus</span><span class="dl">'</span><span class="p">).</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">'</span><span class="s1">click</span><span class="dl">'</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
      <span class="k">this</span><span class="p">.</span><span class="nx">classList</span><span class="p">.</span><span class="nx">add</span><span class="p">(</span><span class="dl">'</span><span class="s1">hidden</span><span class="dl">'</span><span class="p">);</span>
      <span class="kd">var</span> <span class="nx">disqus_config</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">url</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">{{url absolute=</span><span class="dl">"</span><span class="kc">true</span><span class="dl">"</span><span class="s2">}}</span><span class="dl">"</span><span class="p">;</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">identifier</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">ghost-{{comment_id}}</span><span class="dl">"</span>
      <span class="p">};</span>
      <span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
        <span class="kd">var</span> <span class="nx">d</span> <span class="o">=</span> <span class="nb">document</span><span class="p">,</span> <span class="nx">s</span> <span class="o">=</span> <span class="nx">d</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">'</span><span class="s1">script</span><span class="dl">'</span><span class="p">);</span>
        <span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
        <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-timestamp</span><span class="dl">'</span><span class="p">,</span> <span class="o">+</span><span class="k">new</span> <span class="nb">Date</span><span class="p">());</span>
        <span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">head</span> <span class="o">||</span> <span class="nx">d</span><span class="p">.</span><span class="nx">body</span><span class="p">).</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
      <span class="p">})();</span>
    <span class="p">});</span>
<span class="nt">&lt;/script&gt;</span>
</code></pre></div></div>

<h3 id="step-2-insert-comments-code-into-your-theme-1">Step 2: Insert comments code into your theme</h3>

<p>In your Ghost theme, open the template file where you want to insert Disqus comments – this is usually in a file named <code class="language-plaintext highlighter-rouge">post.hbs</code>. In Ghost’s default theme, Casper, you’ll notice a space specifically meant for inserting comments right after the content area:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{{!--
<span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">"article-comments gh-canvas"</span><span class="nt">&gt;</span>
    If you want to embed comments, this is a good place to paste your code!
<span class="nt">&lt;/section&gt;</span>
--}}
</code></pre></div></div>

<p>Here is where you’ll want to paste the code from Step 1. So the result should look like:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">"article-comments gh-canvas"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;a</span> <span class="na">href=</span><span class="s">"javascript:;"</span> <span class="na">class=</span><span class="s">"load-disqus"</span><span class="nt">&gt;</span>
      Load comments
    <span class="nt">&lt;/a&gt;</span>
    <span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"disqus_thread"</span><span class="nt">&gt;&lt;/div&gt;</span>
    <span class="nt">&lt;script&gt;</span>
      <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">.load-disqus</span><span class="dl">'</span><span class="p">).</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">'</span><span class="s1">click</span><span class="dl">'</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">classList</span><span class="p">.</span><span class="nx">add</span><span class="p">(</span><span class="dl">'</span><span class="s1">hidden</span><span class="dl">'</span><span class="p">);</span>
        <span class="kd">var</span> <span class="nx">disqus_config</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
          <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">url</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">{{url absolute=</span><span class="dl">"</span><span class="kc">true</span><span class="dl">"</span><span class="s2">}}</span><span class="dl">"</span><span class="p">;</span>
          <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">identifier</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">ghost-{{comment_id}}</span><span class="dl">"</span>
        <span class="p">};</span>
        <span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
        <span class="kd">var</span> <span class="nx">d</span> <span class="o">=</span> <span class="nb">document</span><span class="p">,</span> <span class="nx">s</span> <span class="o">=</span> <span class="nx">d</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">'</span><span class="s1">script</span><span class="dl">'</span><span class="p">);</span>
        <span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
        <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-timestamp</span><span class="dl">'</span><span class="p">,</span> <span class="o">+</span><span class="k">new</span> <span class="nb">Date</span><span class="p">());</span>
        <span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">head</span> <span class="o">||</span> <span class="nx">d</span><span class="p">.</span><span class="nx">body</span><span class="p">).</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
        <span class="p">})();</span>
      <span class="p">});</span>
    <span class="nt">&lt;/script&gt;</span>
  <span class="nt">&lt;/section&gt;</span>
</code></pre></div></div>

<p>Make sure to remove the opening <code class="language-plaintext highlighter-rouge">{{!-–</code> and closing <code class="language-plaintext highlighter-rouge">--}}</code> comment tags.</p>

<h3 id="step-3-insert-your-disqus-shortname-into-the-code-1">Step 3: Insert your Disqus shortname into the code</h3>

<p>The next step is to insert your Disqus Shortname (the one we made note of earlier) into this line from the above code:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
</code></pre></div></div>

<p>Replace <code class="language-plaintext highlighter-rouge">SHORTNAME</code> with your Disqus shortname. Then save the file, zip and upload a copy of your theme, and restart Ghost.</p>

<h3 id="step-4-add-styles-for-loading-comments-on-click">Step 4: Add styles for loading comments on click</h3>

<p>The final step will be adding a few CSS styles to modify the look of the “Load comments” button as well as a few utility styles needed to hide the button after comments are loaded.</p>

<p>In your <strong>Ghost admin panel &gt; Settings &gt; Code Injection &gt; Site Header</strong> add the following block of CSS code:</p>

<div class="language-css highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">&lt;</span><span class="nt">style</span> <span class="nt">type</span><span class="o">=</span><span class="s1">"text/css"</span><span class="o">&gt;</span>
<span class="nc">.article-comments</span> <span class="p">{</span>
  <span class="nl">text-align</span><span class="p">:</span> <span class="nb">center</span><span class="p">;</span>
<span class="p">}</span>

<span class="nf">#disqus_thread</span> <span class="p">{</span>
  <span class="nl">width</span><span class="p">:</span> <span class="m">100%</span><span class="p">;</span>
<span class="p">}</span>

<span class="nc">.load-disqus</span> <span class="p">{</span>
  <span class="nl">border</span><span class="p">:</span> <span class="m">2px</span> <span class="nb">solid</span> <span class="m">#333</span><span class="p">;</span>
  <span class="nl">color</span><span class="p">:</span> <span class="m">#333</span><span class="p">;</span>
  <span class="nl">display</span><span class="p">:</span> <span class="n">inline-block</span><span class="p">;</span>
  <span class="nl">font-weight</span><span class="p">:</span> <span class="nb">bold</span><span class="p">;</span>
  <span class="nl">margin</span><span class="p">:</span> <span class="m">0</span> <span class="nb">auto</span><span class="p">;</span>
  <span class="nl">padding</span><span class="p">:</span> <span class="m">10px</span> <span class="m">20px</span><span class="p">;</span>
  <span class="nl">text-decoration</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
  <span class="nl">text-transform</span><span class="p">:</span> <span class="nb">uppercase</span><span class="p">;</span>
<span class="p">}</span>

<span class="nc">.load-disqus.hidden</span> <span class="p">{</span>
  <span class="nl">display</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
<span class="p">}</span>
<span class="o">&lt;/</span><span class="nt">style</span><span class="o">&gt;</span>
</code></pre></div></div>

<p>Feel free to modify the <code class="language-plaintext highlighter-rouge">.load-disqus</code> button styles to match your theme!</p>

<h2 id="method-3-the-lazy-load-integration">Method 3: The Lazy-load Integration</h2>

<p>The lazy-load integration of Disqus will allow your users to load comments only after scrolling to the comments section of your post. Like click-to-load, this is another great option for those looking to improve page load speed and mobile experience.</p>

<figure class="kg-card kg-image-card"><img src="/assets/img/uploads/ezgif.com-gif-maker-1.gif" class="kg-image" alt="" loading="lazy" width="800" height="567" /></figure>
<h3 id="step-1-copy-the-code-below-2">Step 1: Copy the code below</h3>

<p>This code block is the embed code we’ll be pasting into your theme.</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"disqus_thread"</span><span class="nt">&gt;</span>Loading comments...<span class="nt">&lt;/div&gt;</span>
<span class="nt">&lt;script&gt;</span>
  <span class="kd">var</span> <span class="nx">disqus_loaded</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
  <span class="kd">function</span> <span class="nx">disqus</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">disqus_loaded</span><span class="p">)</span> <span class="p">{</span>
      <span class="nx">disqus_loaded</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
      <span class="kd">var</span> <span class="nx">disqus_config</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">url</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">{{url absolute=</span><span class="dl">"</span><span class="kc">true</span><span class="dl">"</span><span class="s2">}}</span><span class="dl">"</span><span class="p">;</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">identifier</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">ghost-{{comment_id}}</span><span class="dl">"</span>
      <span class="p">};</span>
      <span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
        <span class="kd">var</span> <span class="nx">d</span> <span class="o">=</span> <span class="nb">document</span><span class="p">,</span> <span class="nx">s</span> <span class="o">=</span> <span class="nx">d</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">'</span><span class="s1">script</span><span class="dl">'</span><span class="p">);</span>
        <span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
        <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-timestamp</span><span class="dl">'</span><span class="p">,</span> <span class="o">+</span><span class="k">new</span> <span class="nb">Date</span><span class="p">());</span>
        <span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">head</span> <span class="o">||</span> <span class="nx">d</span><span class="p">.</span><span class="nx">body</span><span class="p">).</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
      <span class="p">})();</span>
    <span class="p">}</span>
  <span class="p">}</span>

  <span class="nb">window</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">'</span><span class="s1">scroll</span><span class="dl">'</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
    <span class="kd">var</span> <span class="nx">current_scroll</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">scrollingElement</span><span class="p">.</span><span class="nx">scrollTop</span><span class="p">;</span>
    <span class="kd">var</span> <span class="nx">disqus_target</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="dl">'</span><span class="s1">disqus_thread</span><span class="dl">'</span><span class="p">);</span>

    <span class="k">if</span><span class="p">(</span><span class="nx">disqus_target</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">current_scroll</span> <span class="o">&gt;</span> <span class="nx">disqus_target</span><span class="p">.</span><span class="nx">getBoundingClientRect</span><span class="p">().</span><span class="nx">top</span><span class="p">)</span> <span class="o">-</span> <span class="mi">50</span><span class="p">)</span> <span class="p">{</span>
      <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">disqus_loaded</span><span class="p">)</span> <span class="nx">disqus</span><span class="p">();</span>
    <span class="p">}</span>
  <span class="p">},</span> <span class="kc">false</span><span class="p">);</span>
<span class="nt">&lt;/script&gt;</span>
</code></pre></div></div>

<h3 id="step-2-insert-comments-code-into-your-theme-2">Step 2: Insert comments code into your theme</h3>

<p>In your Ghost theme, open the template file where you want to insert Disqus comments – this is usually in a file named <code class="language-plaintext highlighter-rouge">post.hbs</code>. In Ghost’s default theme, Casper, you’ll notice a space specifically meant for inserting comments right after the content area:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{{!--
<span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">"article-comments gh-canvas"</span><span class="nt">&gt;</span>
    If you want to embed comments, this is a good place to paste your code!
<span class="nt">&lt;/section&gt;</span>
--}}
</code></pre></div></div>

<p>Here is where you’ll want to paste the code from Step 1. So the result should look like:</p>

<p>{% raw %}</p>
<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;section</span> <span class="na">class=</span><span class="s">"article-comments gh-canvas"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"disqus_thread"</span><span class="nt">&gt;</span>Loading comments...<span class="nt">&lt;/div&gt;</span>
  <span class="nt">&lt;script&gt;</span>
    <span class="kd">var</span> <span class="nx">disqus_loaded</span> <span class="o">=</span> <span class="kc">false</span><span class="p">;</span>
    <span class="kd">function</span> <span class="nx">disqus</span><span class="p">()</span> <span class="p">{</span>
      <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">disqus_loaded</span><span class="p">)</span> <span class="p">{</span>
        <span class="nx">disqus_loaded</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
        <span class="kd">var</span> <span class="nx">disqus_config</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
            <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">url</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">{{url absolute=</span><span class="dl">"</span><span class="kc">true</span><span class="dl">"</span><span class="s2">}}</span><span class="dl">"</span><span class="p">;</span>
            <span class="k">this</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">identifier</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">ghost-{{comment_id}}</span><span class="dl">"</span>
        <span class="p">};</span>
        <span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
            <span class="kd">var</span> <span class="nx">d</span> <span class="o">=</span> <span class="nb">document</span><span class="p">,</span> <span class="nx">s</span> <span class="o">=</span> <span class="nx">d</span><span class="p">.</span><span class="nx">createElement</span><span class="p">(</span><span class="dl">'</span><span class="s1">script</span><span class="dl">'</span><span class="p">);</span>
            <span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
            <span class="nx">s</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="dl">'</span><span class="s1">data-timestamp</span><span class="dl">'</span><span class="p">,</span> <span class="o">+</span><span class="k">new</span> <span class="nb">Date</span><span class="p">());</span>
            <span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">head</span> <span class="o">||</span> <span class="nx">d</span><span class="p">.</span><span class="nx">body</span><span class="p">).</span><span class="nx">appendChild</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
        <span class="p">})();</span>
      <span class="p">}</span>
    <span class="p">}</span>

    <span class="nb">window</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">'</span><span class="s1">scroll</span><span class="dl">'</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span>
      <span class="kd">var</span> <span class="nx">current_scroll</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">scrollingElement</span><span class="p">.</span><span class="nx">scrollTop</span><span class="p">;</span>
      <span class="kd">var</span> <span class="nx">disqus_target</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="dl">'</span><span class="s1">disqus_thread</span><span class="dl">'</span><span class="p">);</span>

      <span class="k">if</span><span class="p">(</span><span class="nx">disqus_target</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">current_scroll</span> <span class="o">&gt;</span> <span class="nx">disqus_target</span><span class="p">.</span><span class="nx">getBoundingClientRect</span><span class="p">().</span><span class="nx">top</span><span class="p">)</span> <span class="o">-</span> <span class="mi">50</span><span class="p">)</span> <span class="p">{</span>
        <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">disqus_loaded</span><span class="p">)</span> <span class="nx">disqus</span><span class="p">();</span>
      <span class="p">}</span>
    <span class="p">},</span> <span class="kc">false</span><span class="p">);</span>
  <span class="nt">&lt;/script&gt;</span>
<span class="nt">&lt;/section&gt;</span>
</code></pre></div></div>

<p>Make sure to remove the opening <code class="language-plaintext highlighter-rouge">{{!-–</code> and closing <code class="language-plaintext highlighter-rouge">--}}</code> comment tags.</p>

<h3 id="step-3-insert-your-disqus-shortname-into-the-code-2">Step 3: Insert your Disqus shortname into the code</h3>

<p>The next step is to insert your Disqus Shortname (the one we made note of earlier) into this line from the above code:</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">s</span><span class="p">.</span><span class="nx">src</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://SHORTNAME.disqus.com/embed.js</span><span class="dl">'</span><span class="p">;</span>
</code></pre></div></div>

<p>Replace <code class="language-plaintext highlighter-rouge">SHORTNAME</code> with your Disqus shortname. Then save the file, zip and upload a copy of your theme, and restart Ghost.</p>

<p>If you have and questions or if you’ve successfully setup Disqus on your Ghost site, we’d love to hear about it! Tweet us <a href="https://twitter.com/layeredcraft">@layeredcraft</a>!</p>]]></content><author><name>eric_alli</name></author><summary type="html"><![CDATA[In this article I'll take you through three unique ways you can add Disqus comments to your Ghost site. We'll cover a basic setup that will get you up and running in a few minutes as well as a click-to-load and lazy-load setup for optimal performance.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://layeredcraft.com/assets/img/uploads/blog-disqus.jpg" /><media:content medium="image" url="https://layeredcraft.com/assets/img/uploads/blog-disqus.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>