I started playing up with jekyll in local using the minima theme with the following commands:
$ gem install jekyll bundler $ jekyll new my-awesome-site
I can build the site by running
jekyll serve inside my site directory. This
command launches a web server and auto-generate the site when a file is updated.
I can easily add a new post by putting a file in the
following the date convention (
To customize the default structure and style, I copied the files that define the theme.
They can by found with the command
bundle show minima.
Then, I can modify the footer of my page with the file
add new icons and accounts.
I can also use Google analytics to track the traffic of my website (They are watching us!). Login to Google Analytics and create a new property to receive a Tracking ID for your website. You will find your Universal Analytics tracking code under Admin > Property > Tracking Info > Tracking Code.
Now you need to reference your Tracking ID in your
Replace UA—XXXXXXXX-X with your own unique Tracking ID:
# Google services google_analytics: UA—XXXXXXXX-X
Finally I can add comments inside the blog using disqus comment system. I create an account at disqus and then I can obtain a disqus_shorname. Remember to add your site to the trusted domains feature in your settings.
Then I open
config.yml and add the following code. Remember to change
my_disqus_shortname to your own Disqus shortname.
# Disqus Comments disqus: # Leave shortname blank to disable comments site-wide. # Disable comments for any post by adding `comments: false` to that post's YAML Front Matter. shortname: my_disqus_shortname
Comments and analytics are not enable by default in local because it is a development environment. They are only available in production environment. To run Jekyll in production environment use the following command to view your site.
JEKYLL_ENV=production bundle exec jekyll serve
I started using Emping theme. It offers a more aesthetic design and also includes Amp Page implementation to improve charging time, Pagination for the blog, a nice 404 Error Page, SEO Gems and the Share Button with different social networks.