customize your jekyll blog with disqus comments, analytics and customized theme
Customizing your Jekyll theme’s CSS
- Create a file /css/style.scss
- Add the following content to the top of the file
- Add custom CSS below the import
---
---
@import "SITE_THEME";
Customizing your Jekyll theme’s HTML layout
- Create a file /_layouts/custom.html
- Customize the layout as you’d like
- Change the front matter of the page or post to use the custom template
---
layout: custom
title: blogging like a pro
---
Comments
I chose Disqus for adding commenting functionality to my blog. The integration was simple and quick to understand.
- Register on Disqus
- Create a file _includes/disqus.html
- Add the code provided by Disqus after registration
- Modify the file _layouts/post.html to include
include disqus.html
Analytics
- Create an account through Google Analytics Admin
- Google will provide a JavaScript tracking snippet”. Add it to _includes/head.html so that it will be added to every page.
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-106746652-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXXXX);
</script>
References
Customizing CSS and HTML in your Jekyll theme
Personal page and blog using Github pages and Jekyll