Sharing Buttons in ↓markdown↓ CMS
Once a website gets built it is useful to let visitors share something they like on the site with their social network. This helps them interact with the site and helps the site get promoted. It can be a chore to add social media sharing to a web page manually. However, for a ↓markdown↓ CMS based website sharing buttons can be added automatically to the bottom of each article. This is done through a simple change to the configuration file (site-config.php
). The social media sharing buttons then appear at the end of each web page. Here is what the individual buttons look like when the web page loads with sharing buttons configured:
Clicking on the button for the appropriate social media platform will load its share link page. Depending upon the social media site the share page will automatically have the web page's address and, in some cases, the web page title.
Enabling the Social Media Sharing Buttons
In a ↓markdown↓ CMS website the sharing buttons are disabled by default. To enable them remove the commented out line containing SHARE_BUTTONS
in the settings file site-config.php
. The settings file is created in the root install directory at installation (see configuring the Website Home Page for ↓markdown↓ CMS). To enable the line remove the two forward slashes before the SHARE_BUTTONS
, i.e. the line //"SHARE_BUTTONS" => "",
becomes "SHARE_BUTTONS" => "",
.
To stop the display of the social sharing buttons disable the SHARE_BUTTONS
line again. Do the reverse, comment out (add the two forward slashes before) the entry SHARE_BUTTONS
so it looks like //"SHARE_BUTTONS" => "",
again.
See Also
For other articles on using ↓markdown↓ CMS see the post Build a Website from Scratch with ↓markdown↓ CMS.
Author:Daniel S. Fowler Published: Updated: