You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Agastya Chandrakant e1d7f84a39 update name 1 year ago
blogs/zealots-against-zomato add scripts, tag img, update readme, rmv twtr, tag to topic and move blogs 1 year ago
src update name 1 year ago
.gitignore Adding MomentJS in cards 2 years ago
.prettierignore Initial commit from gatsby: (https://github.com/gatsbyjs/gatsby-starter-default.git) 2 years ago
.prettierrc done with the home page 2 years ago
LICENSE update license, readme, package.json 2 years ago
README.md add scripts, tag img, update readme, rmv twtr, tag to topic and move blogs 1 year ago
gatsby-browser.js Initial commit from gatsby: (https://github.com/gatsbyjs/gatsby-starter-default.git) 2 years ago
gatsby-config.js add scripts, tag img, update readme, rmv twtr, tag to topic and move blogs 1 year ago
gatsby-node.js add scripts, tag img, update readme, rmv twtr, tag to topic and move blogs 1 year ago
gatsby-ssr.js Initial commit from gatsby: (https://github.com/gatsbyjs/gatsby-starter-default.git) 2 years ago
package.json update name 1 year ago

README.md

First things first

For updating the website (assuming you have the repo locally):

yarn depoly
  1. Go to GitHub repo Settings.
  2. Look for "GitHub Pages" from bottom.
  3. Update "Custom domain" accordingly.

Usage note

Getting the repo

# Run the following commands
git clone https://github.com/cognitive137/sana137.in
cd path/to/cloned/repo
yarn # to install dependencies

Adding new blogs

  1. Create a folder in blogs, say newBlogPost.
  2. In the folder newBlogPost, create a markdown file index.md.
  3. Put the content of the blog in the index.md file.

Adding background to tags

Adding cover to tags is handled via an array of objects. That array is located at ./src/tagData/index.js.

That file contains an array tagData. Each element of tagData, must be an object, with two keys, tag and cover.

Each object should match:

{
  tag: 'unique tag here',
  cover: 'www.example.com/path/to/cover'
}

Make sure you don't repeat tags in array in ./src/tagData/index.js, else none will be chosen.

Frontmatter

In every blog post, it is necessary to start the blog post with the following content:

---
cover: 'www.example.com/path/to/cover/img'
date: 'yyyy-mm-dd'
excerpt: 'Add excerpt here'
page: 'true/false'
path: '/uri-to-blog-post'
tags: ['some', 'tags', 'in', 'lowercase']
title: 'Blog Post’s Title'

---

Note

  1. All except the excerpt are necessary fields. Make sure you would not be able to escape the single or double quotes in excerpt, so make use of enclosing alternatives.

  2. In case if you do not wish to have any tags, keep that parameter to [''].

  3. Use the yyyy-mm-dd date format.

  4. Make sure path starts with /, and is unique.

Testing your addition renders perfectly

Run the following commands to test if the site works fine locally.

yarn clean
yarn start
# Look in the terminal on which port the site is live.
# navigate to localhost:port/path-to-new-blog

Updating the website

Run the following commands to update the website:

yarn clean
yarn build
yarn deploy

Run the following commands to push the local changes to remote:

git add .
git commit -m "Added new blog (or) made some changes"
git push

Note about styling

Only the Footer functional component (src/components/footer.js) imports layout.css.