IoT Shaman

Create a Blog Website in 5 Easy Steps

by Kyle Brown, August 15th 2020

There are lots of website building solutions out there, with heavy-hitting CMS's (content management systems) like Wordpress and Wix leading the field. For many projects, a CMS is the exact product you want to use; they have lots of features built-in and they have many templates to choose from. However, these solutions have a tendency to be bulky, akward, and difficult for non-technical users to manage (for larger websites). There are several cirucumstances wherein a developer may wish to have all the benefits of a CMS, but without all the bloat:

  • Tech-savvy developers who do not like being constrained by bulky abstractions of simple processes (just show me the javascript damn it!).
  • Less tech-savvy individuals who do not want to take the time to learn potentially complicated management portals.
  • Teams that build high-end, sophisticated websites that require a higher-degree of search engine optimization (SEO).
  • Anyone who is doing online marketing in a highly-competitive industry, requiring professional SEO.
  • Countless more scenarios

Great news, there is a CMS out there that has many of the benefits of typical CMS's, but is extremely light-weight, fast, and encourages developers to use best-practices when writing websites (without adding any complexity). This product is called Shaman Factory and is available for free, for anyone to use!

In this blog we will introduce you to the Shaman Factory, and show you how to use it to build a simple blog website, including an admin panel (with user authentication / management) and a blog writing interface. While Shaman Factory does require you to type a couple things into a command line, dont let this discourage you, the commands are REALLY easy, even for less-technical users, and are not error-prone.

Getting Started with Shaman Factory

Shaman factory is a type of application called a CLI (command line interface) and allows users to create an entire starter website, with 1 simple command. Before you get started, you will need to install Node JS and the Shaman Factory CLI. Most website developers will already have Node JS installed on their machine, but if you do not already have it, no worries, it is really easy to install.

Click here to navigate to the Node JS download page.

Once you have installed node JS, open a command line terminal (type"cmd" into windows search box) and enter the following command to install Shaman Factory:

npm i -g shaman-factory

Once the install command is complete you are ready to start building your website. Follow the steps below to get started!

Step 1 - Create the starter website

In the same command line terminal you previously opened, enter the following command, replacing my-website with the name of your website:

factory create my-website blog

The above command tells Shaman Factory to create a starter website, called 'my-website', using the 'blog' template as a starter base. The command may take a few seconds to a few minutes, depending on your internet connection and processor speed. Once the installation is complete, you will notice a new folder in your "C:\Users\[Username]" folder called "my-website".

Step 2 - Start the website

In the same terminal from the above step, enter the following two commands:

cd my-website
npm start

The above commands open the folder with your starter website content, then start the application using Node JS, respectively. Once the command is done running (should only take a few seconds) your website is now available! Open a web browser (Chrome, Safari, Edge, Firefox, etc.) and navigate to the following link:

http://localhost:3000

You should notice a landing page with a couple of blogs already available. In the next two steps you will learn how to get access to the admin panel, change your password, and manage your blogs.

Step 3 - Setup your user account

Open the file "my-website\data\db.json" in a text editor; at the top of the file you should see a data-element that looks like this:

"users":[
    {
      "key":"contact@iotshaman.com",
      "value":{
        "email":"contact@iotshaman.com",
        "name":"Kyle Brown",
        "passwordHash":"$2a$08$wuawCXHSyJbs7UgE/oE8dOvZ1ek2nojcFDMZhfqBmTmvOrRFZpzb2",
        "primary": true,
        "temporaryPass": true
      }
    }
]

Change both instances of "contact@iotshaman.com" to your email address, then save and exit the file. Then, in your web browser, open your website and click the login button in the top right; this will take you to a log in screen. Enter your email address in the top box, enter 'test' (without quotes) into the password box, then press the submit button. You will now be asked to change your password; folllow the instructions on the screen to create a new password, then press the submit button. Once complete, you should now see the blog manager panel.

Step 4 - Write your first blog

In the blog manager panel, click the delete button on both sample blogs (you dont need these!). In the top left of the manager panel, click the button that says 'Add Blog'; once the dialog appears, enter the name of the blog then click "Save changes". You will be redirected a page where you can enter some basic information (description, tags, image, etc). Fill out the form, then click the Menu button in the top right of the panel, and press Save.

Important Note The blog editor page allows you to write blogs in a format called "Markdown". This is a format that is universally used by developers (and in other industries, like online marketing) to create rich-content (headings, lists, bold, italics, etc) with minimal knowledge and minimal effort. Markdown format can be plain-text, with no markdown syntax at all, but if you want to spice up your blog's apperance, click here to learn more.

Step 5 - Preview and publish your blog

Once you have written your blog, you probably want to see what it will look like before publishing, right? No problem, just click Menu -> Preview and a new page (tab) containing your completed blog will be opened in your browser.

If you are happy with the content and appearance, you are ready to publish. Back in the editor page, change the form option "Status" to "Published", then click Menu -> Save; once complete, you should see a confirmation message. Congratulations, your blog is now published! Click the "Shaman Factory" heading in the top left to navigate back to the home page, and you should be able to see your blog.

Additional Notes

While this blog template is a great place to start, and contains all the tools necessary to start writing blogs, there are still a couple things you need to do before its available to the public.

  • Customize the website: The starter has a clean look and feel to it, but there is very little content. You will definitely want to add some more content to the index.html page, and maybe even add some more pages.
  • Deploy the code: While your website works just fine on your local computer, the rest of the world can't access it yet. You will need to find somewhere to host your code. IoT Shaman provides extremely high-performance web hosting for the price of entry level hosting from other providers. For $96 a year (plus domain name fees, potentially) you get blazing fast web hosting, with 500 MB of free storage. Click here to contact us to get started. Alternatively, Heroku is a great free hosting playform, for small, sample websites; use the node js template and deploy your code in seconds.