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.
Ad

More Related Content

What's hot (20)

Alcim wp training 26 may
Alcim wp training 26 mayAlcim wp training 26 may
Alcim wp training 26 may
surfaddict catzer
 
Html Server Anchor Control VB
Html Server Anchor Control VBHtml Server Anchor Control VB
Html Server Anchor Control VB
sunmitraeducation
 
Self Hosting 3
Self Hosting 3Self Hosting 3
Self Hosting 3
Margaret Vass
 
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 Netvibes
mmoore17
 
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_instructions
Carlos 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 Links
isocentre
 
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 Works
CMS2CMS
 
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 Netvibes
mmoore17
 
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_instructions
Carlos Molina Guerrero
 
Hubspot to wordpress migration
Hubspot to wordpress migrationHubspot to wordpress migration
Hubspot to wordpress migration
Nikhil Jani
 
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
 
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 Links
isocentre
 
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 Works
CMS2CMS
 

Viewers also liked (20)

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
Ccleaner
karen sarahi garfias miranda
 
Prezi
PreziPrezi
Prezi
Luisa Castillo
 
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 cobrar2
enoc2050
 
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
 
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
 
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
 
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 cobrar2
enoc2050
 
Historia dl computador
Historia dl computadorHistoria dl computador
Historia dl computador
Jennifer53
 
Ad

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
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
 
ARTICULOENINGLES
ARTICULOENINGLESARTICULOENINGLES
ARTICULOENINGLES
Mónica Sánchez Crisostomo
 
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
Ketan Raval
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
ketanraval
 
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 view
Nhan Do
 
Master page
Master pageMaster page
Master page
Paneliya Prince
 
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
 
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
 
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
 
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
Ketan Raval
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
ketanraval
 
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
 
Adding a view
Adding a viewAdding a view
Adding a view
Nhan 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
 
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
 
Ad

More from Paul Graham (7)

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
 
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
 
Entity framework (EF) 7
Entity framework (EF) 7Entity framework (EF) 7
Entity framework (EF) 7
Paul Graham
 

Recently uploaded (20)

ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 

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.