Configuring Samskara

Vasanth Developer edited this page Dec 5, 2018 · 1 revision

Samskara

This page will guide you to add the necessary JavaScript configuration for running Samskara Ghost Theme.

The functionality of Samskara Ghost theme can be extended by adding certain JavaScript code into the Code Injection section of your Ghost blog like showing tweets on the sidebar.

Basic Configuration

Samskara Ghost theme requires some basic information to be declared before you can extend the functionality:

<script type="text/javascript">
    var admin_info = {
        name: '[name of the site admin to be shown in the admin card]',
        profile: '[image URL of the profile picture of the site admin]',
        description: '[a small description of the site admin]',
        address: '[physical address of the site admin]',
        social: {
            email: '[email of the site admin]',
            twitter: '[complete URL of the Twitter profile of the site admin]',
            facebook: '[complete URL of the Facebook profile of the site admin]'
        }
    }
</script>

After adding the above snippet in the blog header section of the Code Injection page in your Ghost blog, please replace the following fields without [ or ] accordingly. Please note that this configuration is necessary for proper functioning of certain features of Samskara Ghost blog.

Adding Additional Sidebar Cards

Admin Card

A card shown on the home page in the sidebar can be added to Samskara by adding the following JavaScript code:

<script type="text/javascript">
    var showAdmin = true;
</script>

Twitter Tweets

A card showing the latest Twitter tweets made from the admin's twitter account will be added to the sidebar.

<script type="text/javascript">
    var showTweets = true;
</script>

Disqus Comments

Unlike some other Ghost themes, Samskara comes with built-in Disqus support. You can enable the comments by just adding the following code:

<script type="text/javascript">
    var DISQUS_USERNAME = "[disqus_username]";
</script>

Replace the text [disqus_username] with your actual username from Disqus.

Overall Code

Below is the complete JavaScript code that can be added to Samskara Ghost Theme to increase its functionality:

<script type="text/javascript">
    var showAdmin = true;
    var showTweets = true;
    var DISQUS_USERNAME = "[disqus_username]";
    var admin_info = {
        name: 'Vasanth Developer',
        profile: 'https://avatars1.githubusercontent.com/u/24322511',
        description: 'Web Designer',
        address: 'Vijayawada, India',
        social: {
            email: 'vasanthdevelopers@gmail.com',
            twitter: 'https://www.twitter.com/vasanthdevelope',
            facebook: 'https://www.facebook.com/vasanthdeveloper'
        }
    }
</script>
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.