Skip to main content

Setting up writting a blog

After you have followed the process of setting up your machine for dev, the next step is to clone the repository that holds the code for the blog to your machine. You then can start making changes and creating new blog posts and deploying them to the GitHub repository. There are two different pushes to the repositories.

But first you need to clone the repository

  • create a directory and open that folder with VS Code.

  • open a terminal in VSCode

    VSCodeTerminal

git clone https://github.com/SadSumo-Studios/blogcode.git

Creating and deploying a new blog#

Installation#

yarn install

Local Development#

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Create the blog#

create an MD file in the blog folder. Follow the naming convention you see in the folder where the file is named: 'yy-mm-dd-shortName.md'

you can find out more about the MarkDown Syntax -> MarkDown Documentation

---
slug: [text] # this is a short name for the blog that serves as a reference marker
title: [text] # this is a longer title. This title will appear in the side bar and back/next buttons at the bottom
author: [your name]
author_title: [your title]
author_url: https://sadsumo.com
author_image_url: https://sadsumo.com/img/team/[replace with your image from team folder].jpg]
tags: [text, text] #these serve to find the blog in searches and filters.
---

Build#

Once you are happy with your blog you will need to build it.

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Pushing Changes To Update The Blog Site#

Now you need to push your changes so they will appear in the blog.

This command is different depending if you are on a Windows or Linux platform. In either you can use Visual Studio Code. In a terminal run the command below.

cmd /C 'set "GIT_USER=MY_GIT_USERNAME" && yarn deploy'

Visual Studio Code should open your default browser and have you authenticate

Pushing Changes To The Blog Repository To Save Your Changes.#

The commands should be the same in either windows or linux. make sure to save your changes. Then stage and commit your changes and push it to the repository.

Markdown Documentation#

MarkDown Documentation