SlideShare a Scribd company logo
Adding Disqus toGhost
After adding code high-lighting my next task is to add comments. For me there is only one
option, to use a comment hosting service, like Disqus. Which is used on numerous sites from
the Daily Telegraph to CNN and ABC News as well as 3.5 million other sites and blogs.
We gain many from using Discus like:
 Less Management
 Spamming Protection
 Social Logins
 No Database.
 Easy of migration to new platform/technology.
Which will goto reducing code and allow for greater scalability.
Registering for Disqus
The first step is to using Disqus is to sign up, this can be accomplished by a number of social
media logins like Facebook, twitter or google and alternatively via Email. Next we need
to register our website, this as simple as selecting a name and the category.
Updating Ghost
Disqus has installation guides that cover may multiple platforms. However for Ghost we will
need to select Universal Code
Which give use the following code, for us to drop on the blog entries.
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'csharpbrew';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type =
'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a
href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered
by Disqus.</a></noscript>
Firstly we can delete the comments then we need to add this code
between </article> and {{/posts}} int the post.hbs file, which can be found
here /content/themes/[your theme]/assets/CSS/ . I've chosen to add below
the <main> tag and also wrap it an aside <aside class="comments"> , click here for
more information on aside tag. This was done to ensure the content separation and is
especially useful for search engines.
It's important to understand that by changing the Casper theme we need to be careful with
future updates to ensure we don't lose these changes.
Restart Ghost
As i've made changes to a HandleBars file, *.hbs, i will also need to restart ghost. The
reason behind this is when starting up HandleBar are compiled into JavaScript. It is possible
to add a process to watch these files and recompile them when they've changes, however
this is beyond the scope of this article.
To restart blog you needed to login into the Azure portal, select the correct web app and the
click restart found on the bottom quick link bar.
Fixing the CSS
After restating ghost comments started working straight away, however there was an issue
with the comments streaking across the full width of the screen, which broke the design.
.
To fix this all i need to do was add some additional CSS to set the margin-leftand margin-
right properties to auto and target the disqus_thread id.
#disqus_thread {
background-color: #e8e8e8;
margin-left: auto;
margin-right: auto;
width: 80%;
max-width: 710px;
padding:20px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
-o-border-radius: 8px;
-ms-border-radius: 8px;
-khtml-border-radius: 8px;
border-radius: 8px;
}
Not only did i fix the width issue, I also update the style to include a background color and
rounded corners. This was to make sure the comments could be visual distinguished from
main blog content.
Thanks to these simply CSS changes the comment section is now clearly separated.
Comment counts
Finial I decided to add a link to my comments at the top of the page with a count of comments.
The code to perform this is part of the installation instruction and just two requires two steps.
First you need to add the JavaScript code.
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'csharpbrew';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] ||
document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
Its possible to only use the content inside the function and just add this to the previous
JavaScript Block. Next we add a link to the disqus_thread anchor. This is best placed just
below the title in the post-meta section.
<section class="post-meta">
<time class="post-date" datetime="{{date format='YYYY-MM-
DD'}}">{{date format="DD MMMM YYYY"}}</time> {{tags prefix=" on "}}
<a href="#disqus_thread"></a>
</section>
Finial Comment
While I did have an initial with styling, I found it was to add Disqus to my blog, however I will
need be careful in the future with updates.

More Related Content

What's hot

Html Server Anchor Control VB
Html Server Anchor Control VBHtml Server Anchor Control VB
Html Server Anchor Control VB
sunmitraeducation
 
How to Migrate from Blogger.com to Joomla: Instruction
How to Migrate from Blogger.com to Joomla: InstructionHow to Migrate from Blogger.com to Joomla: Instruction
How to Migrate from Blogger.com to Joomla: Instruction
CMS2CMS
 
How to display the total number of comments in word press
How to display the total number of comments in word pressHow to display the total number of comments in word press
How to display the total number of comments in word press
Hammad Maddy
 
How to download and install vTiger 6.x
How to download and install vTiger 6.xHow to download and install vTiger 6.x
How to download and install vTiger 6.x
VGS Global
 
Start a BLog: Module 3
Start a BLog: Module 3Start a BLog: Module 3
Start a BLog: Module 3
Merri Dennis
 
wpblazer review
wpblazer reviewwpblazer review
wpblazer review
Ta Hong
 
How to - Embed Content in a Widget on Netvibes
How to - Embed Content in a Widget on NetvibesHow to - Embed Content in a Widget on Netvibes
How to - Embed Content in a Widget on Netvibesmmoore17
 
Jolly_Justo_How To Automate Your Internet Using IFTTT.PDF
Jolly_Justo_How To Automate Your Internet Using IFTTT.PDFJolly_Justo_How To Automate Your Internet Using IFTTT.PDF
Jolly_Justo_How To Automate Your Internet Using IFTTT.PDF
Jolly Justo
 
Click tale wordpress integration_instructions
Click tale wordpress integration_instructionsClick tale wordpress integration_instructions
Click tale wordpress integration_instructionsCarlos Molina Guerrero
 
Hubspot to wordpress migration
Hubspot to wordpress migrationHubspot to wordpress migration
Hubspot to wordpress migration
Nikhil Jani
 
Blogs use CMS
Blogs use CMSBlogs use CMS
Blogs use CMS
Fairy Blog Mother
 
How To Get Started After Installing Wordpress ( Wordcamp, Delhi )
How To Get Started After Installing Wordpress ( Wordcamp, Delhi )How To Get Started After Installing Wordpress ( Wordcamp, Delhi )
How To Get Started After Installing Wordpress ( Wordcamp, Delhi )
abhim12
 
How to begin with Amazon EC2?
How to begin with Amazon EC2?How to begin with Amazon EC2?
How to begin with Amazon EC2?
Cuelogic Technologies Pvt. Ltd.
 
The Connected Blog
The Connected BlogThe Connected Blog
The Connected Blog
wordspring
 
Jolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDF
Jolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDFJolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDF
Jolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDF
Jolly Justo
 
Isocentre Help Links
Isocentre Help   LinksIsocentre Help   Links
Isocentre Help Linksisocentre
 
How to embed an editable document in a twinspace page
How to embed an editable document in a  twinspace pageHow to embed an editable document in a  twinspace page
How to embed an editable document in a twinspace page
Petros Michailidis
 
e107 to WordPress Migration Plugin: How It Works
e107 to WordPress Migration Plugin: How It Workse107 to WordPress Migration Plugin: How It Works
e107 to WordPress Migration Plugin: How It WorksCMS2CMS
 

What's hot (20)

Alcim wp training 26 may
Alcim wp training 26 mayAlcim wp training 26 may
Alcim wp training 26 may
 
Html Server Anchor Control VB
Html Server Anchor Control VBHtml Server Anchor Control VB
Html Server Anchor Control VB
 
Self Hosting 3
Self Hosting 3Self Hosting 3
Self Hosting 3
 
How to Migrate from Blogger.com to Joomla: Instruction
How to Migrate from Blogger.com to Joomla: InstructionHow to Migrate from Blogger.com to Joomla: Instruction
How to Migrate from Blogger.com to Joomla: Instruction
 
How to display the total number of comments in word press
How to display the total number of comments in word pressHow to display the total number of comments in word press
How to display the total number of comments in word press
 
How to download and install vTiger 6.x
How to download and install vTiger 6.xHow to download and install vTiger 6.x
How to download and install vTiger 6.x
 
Start a BLog: Module 3
Start a BLog: Module 3Start a BLog: Module 3
Start a BLog: Module 3
 
wpblazer review
wpblazer reviewwpblazer review
wpblazer review
 
How to - Embed Content in a Widget on Netvibes
How to - Embed Content in a Widget on NetvibesHow to - Embed Content in a Widget on Netvibes
How to - Embed Content in a Widget on Netvibes
 
Jolly_Justo_How To Automate Your Internet Using IFTTT.PDF
Jolly_Justo_How To Automate Your Internet Using IFTTT.PDFJolly_Justo_How To Automate Your Internet Using IFTTT.PDF
Jolly_Justo_How To Automate Your Internet Using IFTTT.PDF
 
Click tale wordpress integration_instructions
Click tale wordpress integration_instructionsClick tale wordpress integration_instructions
Click tale wordpress integration_instructions
 
Hubspot to wordpress migration
Hubspot to wordpress migrationHubspot to wordpress migration
Hubspot to wordpress migration
 
Blogs use CMS
Blogs use CMSBlogs use CMS
Blogs use CMS
 
How To Get Started After Installing Wordpress ( Wordcamp, Delhi )
How To Get Started After Installing Wordpress ( Wordcamp, Delhi )How To Get Started After Installing Wordpress ( Wordcamp, Delhi )
How To Get Started After Installing Wordpress ( Wordcamp, Delhi )
 
How to begin with Amazon EC2?
How to begin with Amazon EC2?How to begin with Amazon EC2?
How to begin with Amazon EC2?
 
The Connected Blog
The Connected BlogThe Connected Blog
The Connected Blog
 
Jolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDF
Jolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDFJolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDF
Jolly_Justo_How To Use Buffer To Manage Your Social Media Accounts.PDF
 
Isocentre Help Links
Isocentre Help   LinksIsocentre Help   Links
Isocentre Help Links
 
How to embed an editable document in a twinspace page
How to embed an editable document in a  twinspace pageHow to embed an editable document in a  twinspace page
How to embed an editable document in a twinspace page
 
e107 to WordPress Migration Plugin: How It Works
e107 to WordPress Migration Plugin: How It Workse107 to WordPress Migration Plugin: How It Works
e107 to WordPress Migration Plugin: How It Works
 

Viewers also liked

Mapas El Conocimiento
Mapas El ConocimientoMapas El Conocimiento
Mapas El Conocimiento
Maggy Gualli
 
3. case study 1 ag
3. case study 1 ag3. case study 1 ag
3. case study 1 ag
khanh-itims
 
Actuadores hidraulicos
Actuadores hidraulicos Actuadores hidraulicos
Actuadores hidraulicos viktorzape
 
Ccleaner
CcleanerCcleaner
Prezi
PreziPrezi
Historia tic paviattovalazza
Historia tic paviattovalazzaHistoria tic paviattovalazza
Historia tic paviattovalazza
María Belén Paviatto
 
Home Automation System
Home Automation SystemHome Automation System
Home Automation System
Mphasis
 
World of Watson 2016 - For your Boss - Panel discussions
World of Watson 2016 - For your Boss - Panel discussionsWorld of Watson 2016 - For your Boss - Panel discussions
World of Watson 2016 - For your Boss - Panel discussions
Keith Redman
 
InfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom Anfragen
InfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom AnfragenInfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom Anfragen
InfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom Anfragen
corma GmbH
 
The New Auto Insurance Ecosystem: Telematics, Mobility and the Connected Car
The New Auto Insurance Ecosystem: Telematics, Mobility and the Connected CarThe New Auto Insurance Ecosystem: Telematics, Mobility and the Connected Car
The New Auto Insurance Ecosystem: Telematics, Mobility and the Connected Car
Cognizant
 
Understanding Atrial Fibrillation
Understanding Atrial Fibrillation Understanding Atrial Fibrillation
Understanding Atrial Fibrillation
Elizabeth J Morse
 
Presentación navidad
Presentación navidadPresentación navidad
Presentación navidad
María Luisa Caravaca
 
Introduction to Realm Mobile Platform
Introduction to Realm Mobile PlatformIntroduction to Realm Mobile Platform
Introduction to Realm Mobile Platform
Christian Melchior
 
Chương 4 Lý thuyết hành vi của người sản xuất
Chương 4 Lý thuyết hành vi của người sản xuấtChương 4 Lý thuyết hành vi của người sản xuất
Chương 4 Lý thuyết hành vi của người sản xuất
Nguyễn Ngọc Phan Văn
 
Anatomía dental y oclusión / Práctica: Instrumentales y Materiales
Anatomía dental y oclusión / Práctica: Instrumentales y MaterialesAnatomía dental y oclusión / Práctica: Instrumentales y Materiales
Anatomía dental y oclusión / Práctica: Instrumentales y Materiales
Christian Buleje
 
Administración de cuentas por cobrar2
Administración de cuentas por cobrar2Administración de cuentas por cobrar2
Administración de cuentas por cobrar2enoc2050
 
Historia dl computador
Historia dl computadorHistoria dl computador
Historia dl computador
Jennifer53
 
Einladung+Rückantwort_SpotonRuhr.pdf
Einladung+Rückantwort_SpotonRuhr.pdfEinladung+Rückantwort_SpotonRuhr.pdf
Einladung+Rückantwort_SpotonRuhr.pdf
unn | UNITED NEWS NETWORK GmbH
 

Viewers also liked (20)

Mapas El Conocimiento
Mapas El ConocimientoMapas El Conocimiento
Mapas El Conocimiento
 
ERM - Certificate
ERM - CertificateERM - Certificate
ERM - Certificate
 
3. case study 1 ag
3. case study 1 ag3. case study 1 ag
3. case study 1 ag
 
Presentatie1
Presentatie1Presentatie1
Presentatie1
 
Actuadores hidraulicos
Actuadores hidraulicos Actuadores hidraulicos
Actuadores hidraulicos
 
Ccleaner
CcleanerCcleaner
Ccleaner
 
Prezi
PreziPrezi
Prezi
 
Historia tic paviattovalazza
Historia tic paviattovalazzaHistoria tic paviattovalazza
Historia tic paviattovalazza
 
Home Automation System
Home Automation SystemHome Automation System
Home Automation System
 
World of Watson 2016 - For your Boss - Panel discussions
World of Watson 2016 - For your Boss - Panel discussionsWorld of Watson 2016 - For your Boss - Panel discussions
World of Watson 2016 - For your Boss - Panel discussions
 
InfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom Anfragen
InfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom AnfragenInfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom Anfragen
InfoZoom Tipps & Tricks – Teil 2 Reporterstellung mittels InfoZoom Anfragen
 
The New Auto Insurance Ecosystem: Telematics, Mobility and the Connected Car
The New Auto Insurance Ecosystem: Telematics, Mobility and the Connected CarThe New Auto Insurance Ecosystem: Telematics, Mobility and the Connected Car
The New Auto Insurance Ecosystem: Telematics, Mobility and the Connected Car
 
Understanding Atrial Fibrillation
Understanding Atrial Fibrillation Understanding Atrial Fibrillation
Understanding Atrial Fibrillation
 
Presentación navidad
Presentación navidadPresentación navidad
Presentación navidad
 
Introduction to Realm Mobile Platform
Introduction to Realm Mobile PlatformIntroduction to Realm Mobile Platform
Introduction to Realm Mobile Platform
 
Chương 4 Lý thuyết hành vi của người sản xuất
Chương 4 Lý thuyết hành vi của người sản xuấtChương 4 Lý thuyết hành vi của người sản xuất
Chương 4 Lý thuyết hành vi của người sản xuất
 
Anatomía dental y oclusión / Práctica: Instrumentales y Materiales
Anatomía dental y oclusión / Práctica: Instrumentales y MaterialesAnatomía dental y oclusión / Práctica: Instrumentales y Materiales
Anatomía dental y oclusión / Práctica: Instrumentales y Materiales
 
Administración de cuentas por cobrar2
Administración de cuentas por cobrar2Administración de cuentas por cobrar2
Administración de cuentas por cobrar2
 
Historia dl computador
Historia dl computadorHistoria dl computador
Historia dl computador
 
Einladung+Rückantwort_SpotonRuhr.pdf
Einladung+Rückantwort_SpotonRuhr.pdfEinladung+Rückantwort_SpotonRuhr.pdf
Einladung+Rückantwort_SpotonRuhr.pdf
 

Similar to Adding disqus to ghost blog

Code syntax highlighting in ghost
Code syntax highlighting in ghostCode syntax highlighting in ghost
Code syntax highlighting in ghost
Paul Graham
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Sean Burgess
 
Top 8 hidden handy features of word press
Top 8 hidden handy features of word pressTop 8 hidden handy features of word press
Top 8 hidden handy features of word press
John057
 
Intro to CSS Presentation
Intro to CSS PresentationIntro to CSS Presentation
Intro to CSS Presentation
WP Pittsburgh Meetup Group
 
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress ThemesPhilip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore
 
How to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScriptHow to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScript
Katy Slemon
 
An Analysis Of Practical wordpress Programs
An Analysis Of Practical wordpress ProgramsAn Analysis Of Practical wordpress Programs
An Analysis Of Practical wordpress Programs
toweringspeed960
 
Fewd week7 slides
Fewd week7 slidesFewd week7 slides
Fewd week7 slides
William Myers
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Sean Burgess
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
ketanraval
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
Ketan Raval
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web
MahmoudOHassouna
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
SURYANARAYANBISWAL1
 
Adding a view
Adding a viewAdding a view
Adding a viewNhan Do
 
Adding Schema Markup (Structured Data) to WordPress – Free & Premium Plugins
Adding Schema Markup (Structured Data) to WordPress – Free & Premium PluginsAdding Schema Markup (Structured Data) to WordPress – Free & Premium Plugins
Adding Schema Markup (Structured Data) to WordPress – Free & Premium Plugins
Marshall Reyher
 
TopicHero Descriptions Tutorial
TopicHero Descriptions TutorialTopicHero Descriptions Tutorial
TopicHero Descriptions Tutorial
Justin Coven, Ph.D.
 
SEO Audit Report | Analyze Website Free 2023
SEO Audit Report | Analyze Website Free 2023SEO Audit Report | Analyze Website Free 2023
SEO Audit Report | Analyze Website Free 2023
SEO Expert
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
imdurgesh
 

Similar to Adding disqus to ghost blog (20)

Code syntax highlighting in ghost
Code syntax highlighting in ghostCode syntax highlighting in ghost
Code syntax highlighting in ghost
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Top 8 hidden handy features of word press
Top 8 hidden handy features of word pressTop 8 hidden handy features of word press
Top 8 hidden handy features of word press
 
Intro to CSS Presentation
Intro to CSS PresentationIntro to CSS Presentation
Intro to CSS Presentation
 
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress ThemesPhilip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
 
ARTICULOENINGLES
ARTICULOENINGLESARTICULOENINGLES
ARTICULOENINGLES
 
How to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScriptHow to Build ToDo App with Vue 3 + TypeScript
How to Build ToDo App with Vue 3 + TypeScript
 
An Analysis Of Practical wordpress Programs
An Analysis Of Practical wordpress ProgramsAn Analysis Of Practical wordpress Programs
An Analysis Of Practical wordpress Programs
 
Fewd week7 slides
Fewd week7 slidesFewd week7 slides
Fewd week7 slides
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
 
Adding a view
Adding a viewAdding a view
Adding a view
 
Master page
Master pageMaster page
Master page
 
Adding Schema Markup (Structured Data) to WordPress – Free & Premium Plugins
Adding Schema Markup (Structured Data) to WordPress – Free & Premium PluginsAdding Schema Markup (Structured Data) to WordPress – Free & Premium Plugins
Adding Schema Markup (Structured Data) to WordPress – Free & Premium Plugins
 
TopicHero Descriptions Tutorial
TopicHero Descriptions TutorialTopicHero Descriptions Tutorial
TopicHero Descriptions Tutorial
 
SEO Audit Report | Analyze Website Free 2023
SEO Audit Report | Analyze Website Free 2023SEO Audit Report | Analyze Website Free 2023
SEO Audit Report | Analyze Website Free 2023
 
ViA Bootstrap 4
ViA Bootstrap 4ViA Bootstrap 4
ViA Bootstrap 4
 

More from Paul Graham

Publising a nuget package
Publising a nuget packagePublising a nuget package
Publising a nuget package
Paul Graham
 
EPiServer report generation
EPiServer report generationEPiServer report generation
EPiServer report generation
Paul Graham
 
A guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled JobA guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled Job
Paul Graham
 
Creating an nuget package for EPiServer
Creating an nuget package for EPiServerCreating an nuget package for EPiServer
Creating an nuget package for EPiServer
Paul Graham
 
Creating EPiServer Usage Reports
Creating EPiServer Usage ReportsCreating EPiServer Usage Reports
Creating EPiServer Usage Reports
Paul Graham
 
C# 6.0
C# 6.0C# 6.0
C# 6.0
Paul Graham
 
Entity framework (EF) 7
Entity framework (EF) 7Entity framework (EF) 7
Entity framework (EF) 7
Paul Graham
 

More from Paul Graham (7)

Publising a nuget package
Publising a nuget packagePublising a nuget package
Publising a nuget package
 
EPiServer report generation
EPiServer report generationEPiServer report generation
EPiServer report generation
 
A guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled JobA guide to EPiServer CMS Scheduled Job
A guide to EPiServer CMS Scheduled Job
 
Creating an nuget package for EPiServer
Creating an nuget package for EPiServerCreating an nuget package for EPiServer
Creating an nuget package for EPiServer
 
Creating EPiServer Usage Reports
Creating EPiServer Usage ReportsCreating EPiServer Usage Reports
Creating EPiServer Usage Reports
 
C# 6.0
C# 6.0C# 6.0
C# 6.0
 
Entity framework (EF) 7
Entity framework (EF) 7Entity framework (EF) 7
Entity framework (EF) 7
 

Recently uploaded

Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 

Recently uploaded (20)

Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

Adding disqus to ghost blog

  • 1. Adding Disqus toGhost After adding code high-lighting my next task is to add comments. For me there is only one option, to use a comment hosting service, like Disqus. Which is used on numerous sites from the Daily Telegraph to CNN and ABC News as well as 3.5 million other sites and blogs. We gain many from using Discus like:  Less Management  Spamming Protection  Social Logins  No Database.  Easy of migration to new platform/technology. Which will goto reducing code and allow for greater scalability.
  • 2. Registering for Disqus The first step is to using Disqus is to sign up, this can be accomplished by a number of social media logins like Facebook, twitter or google and alternatively via Email. Next we need to register our website, this as simple as selecting a name and the category.
  • 3. Updating Ghost Disqus has installation guides that cover may multiple platforms. However for Ghost we will need to select Universal Code
  • 4. Which give use the following code, for us to drop on the blog entries. <div id="disqus_thread"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES * * */ var disqus_shortname = 'csharpbrew'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
  • 5. Firstly we can delete the comments then we need to add this code between </article> and {{/posts}} int the post.hbs file, which can be found here /content/themes/[your theme]/assets/CSS/ . I've chosen to add below the <main> tag and also wrap it an aside <aside class="comments"> , click here for more information on aside tag. This was done to ensure the content separation and is especially useful for search engines. It's important to understand that by changing the Casper theme we need to be careful with future updates to ensure we don't lose these changes.
  • 6. Restart Ghost As i've made changes to a HandleBars file, *.hbs, i will also need to restart ghost. The reason behind this is when starting up HandleBar are compiled into JavaScript. It is possible to add a process to watch these files and recompile them when they've changes, however this is beyond the scope of this article. To restart blog you needed to login into the Azure portal, select the correct web app and the click restart found on the bottom quick link bar.
  • 7. Fixing the CSS After restating ghost comments started working straight away, however there was an issue with the comments streaking across the full width of the screen, which broke the design. . To fix this all i need to do was add some additional CSS to set the margin-leftand margin- right properties to auto and target the disqus_thread id.
  • 8. #disqus_thread { background-color: #e8e8e8; margin-left: auto; margin-right: auto; width: 80%; max-width: 710px; padding:20px; -moz-border-radius: 8px; -webkit-border-radius: 8px; -o-border-radius: 8px; -ms-border-radius: 8px; -khtml-border-radius: 8px; border-radius: 8px; } Not only did i fix the width issue, I also update the style to include a background color and rounded corners. This was to make sure the comments could be visual distinguished from main blog content.
  • 9. Thanks to these simply CSS changes the comment section is now clearly separated.
  • 10. Comment counts Finial I decided to add a link to my comments at the top of the page with a count of comments. The code to perform this is part of the installation instruction and just two requires two steps. First you need to add the JavaScript code. <script type="text/javascript"> /* * * CONFIGURATION VARIABLES * * */ var disqus_shortname = 'csharpbrew'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function () { var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = '//' + disqus_shortname + '.disqus.com/count.js'; (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); }()); </script>
  • 11. Its possible to only use the content inside the function and just add this to the previous JavaScript Block. Next we add a link to the disqus_thread anchor. This is best placed just below the title in the post-meta section. <section class="post-meta"> <time class="post-date" datetime="{{date format='YYYY-MM- DD'}}">{{date format="DD MMMM YYYY"}}</time> {{tags prefix=" on "}} <a href="#disqus_thread"></a> </section> Finial Comment While I did have an initial with styling, I found it was to add Disqus to my blog, however I will need be careful in the future with updates.